#include <sys/types.h>
+#include "utils.h"
+
/* this is only needed for compatibility with the old talloc */
typedef void TALLOC_CTX;
#define talloc_destroy(ctx) talloc_free(ctx)
#endif
-#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
-
-
/* The following definitions come from talloc.c */
void *_talloc(const void *context, size_t size);
void talloc_set_destructor(const void *ptr, int (*destructor)(void *));
#ifndef __TDB_H__
#define __TDB_H__
+#include "utils.h"
+
/*
Unix SMB/CIFS implementation.
uint32_t hash;
};
-#ifndef PRINTF_ATTRIBUTE
-#define PRINTF_ATTRIBUTE(a,b)
-#endif
-
/* this is the context structure that is returned from a db open */
typedef struct tdb_context {
char *name; /* the name of the database */
*/
const char *dump_state_align(FILE *fp);
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__((format (printf, a1, a2)))
+
void barf(const char *fmt, ...) __attribute__((noreturn));
void barf_perror(const char *fmt, ...) __attribute__((noreturn));