Browse Source

2004-11-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

	* zebra.h: If not C99 and there's no va_copy macro and there is
	  a __va_copy macro, define va_copy as __va_copy.
ajs 16 years ago
parent
commit
4cf0d0df23
2 changed files with 11 additions and 0 deletions
  1. 5 0
      lib/ChangeLog
  2. 6 0
      lib/zebra.h

+ 5 - 0
lib/ChangeLog

@@ -1,5 +1,10 @@
 2004-11-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
+	* zebra.h: If not C99 and there's no va_copy macro and there is
+	  a __va_copy macro, define va_copy as __va_copy.
+
+2004-11-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
 	* pid_output.c: (pid_output_lock) Fix 2 bugs: when locking, should
 	  set l_whence to SEEK_SET, not SEEK_END.  And after writing new
 	  pid to file, must ftruncate to eliminate any extraneous bytes left

+ 6 - 0
lib/zebra.h

@@ -95,6 +95,12 @@ typedef int socklen_t;
 
 /* misc include group */
 #include <stdarg.h>
+#if !(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+/* Not C99; do we need to define va_copy? */
+#if !defined(va_copy) && defined(__va_copy)
+#define va_copy(DST,SRC) __va_copy(DST,SRC)
+#endif /* need va_copy */
+#endif /* !C99 */
 #include "zassert.h"
 
 #ifdef HAVE_LCAPS