summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-10-10 05:40:32 +0000
committerAndrew Tridgell <tridge@samba.org>2003-10-10 05:40:32 +0000
commit4e73a3c0feb47c761fdcded9e6c2ac6d32534d9b (patch)
tree567ab5fc754a3df597d07e2e5870fa0a35e2bf77 /source4/lib
parentb382acea72c8cc8325142b4dc8e182c75f5e476b (diff)
downloadsamba-4e73a3c0feb47c761fdcded9e6c2ac6d32534d9b.tar.gz
samba-4e73a3c0feb47c761fdcded9e6c2ac6d32534d9b.tar.bz2
samba-4e73a3c0feb47c761fdcded9e6c2ac6d32534d9b.zip
fixed snprintf.c for systems that have only some of the *printf() family of functions
cope with servers that return bogus (too large) values in max_xmit cope with a couple more error conditions in RAW-SFILEINFO better startup time heuristics in NBENCH (This used to be commit 89f7261ba589e5760b3cf9c3594eab9d7198dd7e)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/snprintf.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/lib/snprintf.c b/source4/lib/snprintf.c
index 1eae2f09b9..fd31870162 100644
--- a/source4/lib/snprintf.c
+++ b/source4/lib/snprintf.c
@@ -81,6 +81,15 @@
#include <stdlib.h>
#endif
+#ifndef VA_COPY
+#ifdef HAVE_VA_COPY
+#define VA_COPY(dest, src) __va_copy(dest, src)
+#else
+#define VA_COPY(dest, src) (dest) = (src)
+#endif
+#endif
+
+
#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF)
/* only include stdio.h if we are not re-defining snprintf or vsnprintf */
#include <stdio.h>
@@ -105,14 +114,6 @@
#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0)
#endif
-#ifndef VA_COPY
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) __va_copy(dest, src)
-#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);
static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,