From 63602d15afe96206e1fdcea4d2b9014582aa41aa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 28 Apr 2001 14:01:02 +0000 Subject: - fixed some compiler warnings - fixed slprintf and vsprintf macros (This used to be commit c986a3c51e8cdbc1230edbe0f4a91138c4ada29d) --- source3/include/includes.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'source3/include/includes.h') 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 /* * 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 */ -- cgit