summaryrefslogtreecommitdiff
path: root/source3/include/includes.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-04-28 13:49:34 +0000
committerAndrew Tridgell <tridge@samba.org>2001-04-28 13:49:34 +0000
commitd095b5249cf9e1496ad5a3d6b5acb77af2c587a7 (patch)
treecc944131907e5244c9f72c80adb6e478ed36bbb8 /source3/include/includes.h
parent944aeb7de472e0654561f7d8f37a5703487a973e (diff)
downloadsamba-d095b5249cf9e1496ad5a3d6b5acb77af2c587a7.tar.gz
samba-d095b5249cf9e1496ad5a3d6b5acb77af2c587a7.tar.bz2
samba-d095b5249cf9e1496ad5a3d6b5acb77af2c587a7.zip
- added test for vasprintf
- cleaned up GNUC printf attribute macros - added enum handling in mkproto - removed non-vararg code - made slprintf and vslprintf just macros for snprintf and vsnprintf - don't need slprintf code any more (This used to be commit c7aeb2254dfc3cd0aa0b6c0bdd426f9323be0ddf)
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r--source3/include/includes.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index f27d2f564f..a5fa555058 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -994,5 +994,20 @@ extern int DEBUGLEVEL;
#define RTLD_NOW 0
#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);
+#endif
+#ifndef HAVE_ASPRINTF
+int asprintf(char **,char *, ...) PRINTF_ATTRIBUTE(2,3);
+#endif
+
#endif /* _INCLUDES_H */