summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-13 10:58:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:23:00 -0500
commit12ed349f9025a4ca27f7399bb352c674af284ac4 (patch)
tree503bc9a37d961447441ac846f8fbef9ae9d70eed /source4
parent72fbfff1a7c11ac96ef3e7f80691f51856a87478 (diff)
downloadsamba-12ed349f9025a4ca27f7399bb352c674af284ac4.tar.gz
samba-12ed349f9025a4ca27f7399bb352c674af284ac4.tar.bz2
samba-12ed349f9025a4ca27f7399bb352c674af284ac4.zip
r8418: PRINTF_ATTRIBUTE declaration has to come before it is used :-)
(This used to be commit a1ca8352f48cf1942e5a060c79ae1cc78b8a3668)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/replace/replace.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h
index b67e629aa0..8062c4c683 100644
--- a/source4/lib/replace/replace.h
+++ b/source4/lib/replace/replace.h
@@ -75,6 +75,18 @@ int vasprintf(char **ptr, const char *format, va_list ap);
#define bzero(a,b) memset((a),'\0',(b))
#endif
+#ifndef PRINTF_ATTRIBUTE
+#if !defined(NO_PRINTF_ATTRIBUTE) && (__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
+
/* add varargs prototypes with printf checking */
#ifndef HAVE_SNPRINTF_DECL
int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
@@ -111,16 +123,4 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
typedef int (*comparison_fn_t)(const void *, const void *);
#endif
-#ifndef PRINTF_ATTRIBUTE
-#if !defined(NO_PRINTF_ATTRIBUTE) && (__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
-
#endif