summaryrefslogtreecommitdiff
path: root/source3/include/includes.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r--source3/include/includes.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index a5fa555058..e2edb512ae 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -54,6 +54,13 @@
#endif
#endif
+/* use gcc attribute to check printf fns */
+#ifdef __GNUC__
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
+#else
+#define PRINTF_ATTRIBUTE(a1, a2)
+#endif
+
#ifdef RELIANTUNIX
/*
* <unistd.h> has to be included before any other to get
@@ -995,12 +1002,6 @@ extern int DEBUGLEVEL;
#endif
/* add varargs prototypes with printf checking */
-#ifdef __GNUC__
-#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
-#else
-#define PRINTF_ATTRIBUTE(a1, a2)
-#endif
-
int fdprintf(int , char *, ...) PRINTF_ATTRIBUTE(2,3);
#ifndef HAVE_SNPRINTF
int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
@@ -1009,5 +1010,10 @@ int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
int asprintf(char **,char *, ...) PRINTF_ATTRIBUTE(2,3);
#endif
+/* we used to use these fns, but now we have good replacements
+ for snprintf and vsnprintf */
+#define slprintf snprintf
+#define vslprintf vsnprintf
+
#endif /* _INCLUDES_H */