]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/tdb.h
compiler: use everywhere.
[ccan] / ccan / tdb / tdb.h
index 070f09b4e19075e05f7bdfebff634d93fddcc89d..01ff905ae2af29a8ff4e6e2d4ea7872b4013def5 100644 (file)
@@ -38,6 +38,7 @@ extern "C" {
 /* For sig_atomic_t. */
 #include <signal.h>
 #endif
 /* For sig_atomic_t. */
 #include <signal.h>
 #endif
+#include <ccan/compiler/compiler.h>
 
 /* flags to tdb_store() */
 #define TDB_REPLACE 1          /* Unused */
 
 /* flags to tdb_store() */
 #define TDB_REPLACE 1          /* Unused */
@@ -77,18 +78,6 @@ typedef struct TDB_DATA {
        size_t dsize;
 } TDB_DATA;
 
        size_t dsize;
 } TDB_DATA;
 
-#ifndef PRINTF_ATTRIBUTE
-#if (__GNUC__ >= 3)
-/** Use gcc attribute to check printf fns.  a1 is the 1-based index of
- * the parameter containing the format, and a2 the index of the first
- * argument. Note that some gcc 2.x versions don't handle this
- * properly **/
-#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
-#else
-#define PRINTF_ATTRIBUTE(a1, a2)
-#endif
-#endif
-
 /* this is the context structure that is returned from a db open */
 typedef struct tdb_context TDB_CONTEXT;
 
 /* this is the context structure that is returned from a db open */
 typedef struct tdb_context TDB_CONTEXT;