svn commit: samba r8418 - in branches/SAMBA_4_0/source/lib/replace:
.
tridge at samba.org
tridge at samba.org
Wed Jul 13 10:58:43 GMT 2005
Author: tridge
Date: 2005-07-13 10:58:43 +0000 (Wed, 13 Jul 2005)
New Revision: 8418
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8418
Log:
PRINTF_ATTRIBUTE declaration has to come before it is used :-)
Modified:
branches/SAMBA_4_0/source/lib/replace/replace.h
Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2005-07-13 10:22:13 UTC (rev 8417)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2005-07-13 10:58:43 UTC (rev 8418)
@@ -75,6 +75,18 @@
#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 @@
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
More information about the samba-cvs
mailing list