diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-09-06 00:06:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:17:18 -0500 |
commit | e906cb59664d1c71b681f525f67617865152c46b (patch) | |
tree | e1a1ad9bbd33a49e83e43e676d8a39443ac07c05 /source4/lib | |
parent | bbb725a8b6ac412c44495f59bea4afdefef885f4 (diff) | |
download | samba-e906cb59664d1c71b681f525f67617865152c46b.tar.gz samba-e906cb59664d1c71b681f525f67617865152c46b.tar.bz2 samba-e906cb59664d1c71b681f525f67617865152c46b.zip |
r18111: base inclusion of replacement printf fns on function existance, not
declaration. Otherwise _GNU_SOURCE and _BSD_SOURCE stuffs things up
(possibly fixable, but not now)
(This used to be commit 68caf1bba73fe68f452c7db2ac3895a451645dec)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/replace/replace.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h index 631488bbf8..566be225be 100644 --- a/source4/lib/replace/replace.h +++ b/source4/lib/replace/replace.h @@ -139,11 +139,6 @@ unsigned long long int rep_strtoull(const char *str, char **endptr, int base); int rep_ftruncate(int f,long l); #endif -#ifndef HAVE_VASPRINTF_DECL -#define vasprintf rep_vasprintf -int rep_vasprintf(char **ptr, const char *format, va_list ap); -#endif - #if !defined(HAVE_BZERO) && defined(HAVE_MEMSET) #define bzero(a,b) memset((a),'\0',(b)) #endif @@ -161,12 +156,22 @@ int rep_vasprintf(char **ptr, const char *format, va_list ap); #endif #endif -/* add varargs prototypes with printf checking */ -#ifndef HAVE_SNPRINTF_DECL +#ifndef HAVE_VASPRINTF +#define vasprintf rep_vasprintf +int rep_vasprintf(char **ptr, const char *format, va_list ap); +#endif + +#ifndef HAVE_SNPRINTF #define snprintf rep_snprintf int rep_snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); #endif -#ifndef HAVE_ASPRINTF_DECL + +#ifndef HAVE_VSNPRINTF +#define vsnprintf rep_vsnprintf +int rep_vsnprintf(char *,size_t ,const char *, va_list ap); +#endif + +#ifndef HAVE_ASPRINTF #define asprintf rep_asprintf int rep_asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif |