summaryrefslogtreecommitdiff
path: root/source3/include/includes.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-04-28 14:01:02 +0000
committerAndrew Tridgell <tridge@samba.org>2001-04-28 14:01:02 +0000
commit63602d15afe96206e1fdcea4d2b9014582aa41aa (patch)
tree47e1baa898afbf0f8894d0daef768367c942f271 /source3/include/includes.h
parent3c71214d47313e96baedf7b9a27507bc21eed01a (diff)
downloadsamba-63602d15afe96206e1fdcea4d2b9014582aa41aa.tar.gz
samba-63602d15afe96206e1fdcea4d2b9014582aa41aa.tar.bz2
samba-63602d15afe96206e1fdcea4d2b9014582aa41aa.zip
- fixed some compiler warnings
- fixed slprintf and vsprintf macros (This used to be commit c986a3c51e8cdbc1230edbe0f4a91138c4ada29d)
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 */