summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2003-05-07 01:18:06 +0000
committerMartin Pool <mbp@samba.org>2003-05-07 01:18:06 +0000
commitb1f3d0e2c3a08f0a6d79848f326bb6e3f50e0fb6 (patch)
tree98ac833866a7d0325c8fcaa0d4794ceca2949428 /source3/lib
parent5601a2b7ccef98b65b127884432776fd19b0b8e4 (diff)
downloadsamba-b1f3d0e2c3a08f0a6d79848f326bb6e3f50e0fb6.tar.gz
samba-b1f3d0e2c3a08f0a6d79848f326bb6e3f50e0fb6.tar.bz2
samba-b1f3d0e2c3a08f0a6d79848f326bb6e3f50e0fb6.zip
Merge from distcc:
Put in a prototype for dummy_snprintf() to quiet compiler warnings. Move #endif to make sure VA_COPY, LDOUBLE, etc are defined even if the C library has some snprintf functions already. (This used to be commit c49cfe1677b8daba4e2e73813ee712b2d0ec92cd)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/snprintf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c
index 02cf782520..4aef82c7d8 100644
--- a/source3/lib/snprintf.c
+++ b/source3/lib/snprintf.c
@@ -83,6 +83,12 @@
* Remove NO_CONFIG_H so that the test case can be built within a source
* tree with less trouble.
* Remove unnecessary SAFE_FREE() definition.
+ *
+ * Martin Pool (mbp@samba.org) May 2003
+ * Put in a prototype for dummy_snprintf() to quiet compiler warnings.
+ *
+ * Move #endif to make sure VA_COPY, LDOUBLE, etc are defined even
+ * if the C library has some snprintf functions already.
**************************************************************/
#ifndef NO_CONFIG_H
@@ -123,8 +129,9 @@
/* only include stdio.h if we are not re-defining snprintf or vsnprintf */
#include <stdio.h>
/* make the compiler happy with an empty file */
+ void dummy_snprintf(void);
void dummy_snprintf(void) {}
-#else
+#endif /* HAVE_SNPRINTF, etc */
#ifdef HAVE_LONG_DOUBLE
#define LDOUBLE long double
@@ -144,7 +151,6 @@
#else
#define VA_COPY(dest, src) (dest) = (src)
#endif
-#endif
static size_t dopr(char *buffer, size_t maxlen, const char *format,
va_list args_in);