On linux use a iso C (89) stdarg variable argument function.
authorPeter Howkins <flibble@users.sourceforge.net>
Mon, 12 Mar 2012 00:18:13 +0000 (00:18 +0000)
committerPeter Howkins <flibble@users.sourceforge.net>
Mon, 12 Mar 2012 00:18:13 +0000 (00:18 +0000)
Gcc no longer supports old style varargs.h

cde/lib/tt/mini_isam/iscntl.c

index a5ee70371dbfd90ababbc71a3eeb7e9f3f841a44..80a9e23ea96cc1a5673856392a62a7d1e5daf0d0 100644 (file)
@@ -39,7 +39,11 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17";
  *     Generic control function
  */
 
+#if defined(linux)
+#include <stdarg.h>
+#else
 #include <varargs.h>
+#endif
 #include "isam_impl.h"
 
 
@@ -75,17 +79,26 @@ static char sccsid[] = "@(#)iscntl.c        1.8 94/11/17";
 
 typedef int (* intfunc)();
 
+#if defined(linux)
+int 
+iscntl(int isfd, int func, ...)
+#else
 int 
 iscntl(isfd, func, va_alist)
     int                        isfd;
     int                        func;
     va_dcl
+#endif
 {
     extern int         (*_isfatal_error_set_func())();
     va_list            pvar;
     int                        ret;
 
+#if defined(linux)
+    va_start(pvar, func);
+#else
     va_start(pvar);
+#endif
     switch (func) {
 
          case ISCNTL_MASKSIGNALS: