]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Make vsnprintf() portab function more portable tmp/solaris3
authorAlexander Barton <alex@barton.de>
Wed, 20 Sep 2017 22:51:03 +0000 (00:51 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 25 Feb 2018 02:17:21 +0000 (03:17 +0100)
src/portab/portab.h
src/portab/vsnprintf.c

index 70d5ed3ed26327fb14722df062b2a6b834bb6d93..ee353eb1ef9f6ee275b8fbada3ec92316659a197 100644 (file)
@@ -159,9 +159,11 @@ extern char * strtok_r PARAMS((char *str, const char *delim, char **saveptr));
 #endif
 
 #ifndef HAVE_VSNPRINTF
+#ifdef PROTOTYPES
 #include <stdarg.h>
 extern int vsnprintf PARAMS(( char *str, size_t count, const char *fmt, va_list args ));
 #endif
+#endif
 
 #ifndef HAVE_GAI_STRERROR
 # define gai_strerror(r) "unknown error"
index 4c65db1febd5c30008f421a0a6d1e45b28f8e11c..b740eca562c136962c18665b310655b303891d3c 100644 (file)
 #include <ctype.h>
 #endif
 #include <sys/types.h>
+#ifdef PROTOTYPES
 #include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif