summaryrefslogtreecommitdiff
path: root/make.h
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2004-02-23 06:25:54 +0000
committerPaul Smith <psmith@gnu.org>2004-02-23 06:25:54 +0000
commitbe8c3dbc974c35fac33c8392b89482c10e4f8650 (patch)
treee410b51327e62cb0dbc0a1bf2ed89fb14fd14904 /make.h
parentfafeb870272fd3b3623d8eb8241c915af39f5855 (diff)
downloadgunmake-be8c3dbc974c35fac33c8392b89482c10e4f8650.tar.gz
Numerous fixes: patches for OS/2; core for -f ''; makefile updates.
Diffstat (limited to 'make.h')
-rw-r--r--make.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/make.h b/make.h
index 3fae1bf..fcd0e75 100644
--- a/make.h
+++ b/make.h
@@ -388,7 +388,29 @@ struct floc
/* Fancy processing for variadic functions in both ANSI and pre-ANSI
compilers. */
-#if defined __STDC__ && __STDC__
+#if HAVE_STDARG_H
+# include <stdarg.h>
+# define VA_START(a, f) va_start(a, f)
+#else
+# if HAVE_VARARGS_H
+# include <varargs.h>
+# define VA_START(a, f) va_start(a)
+# endif
+#endif
+#ifndef VA_START
+ error no variadic api
+#endif
+
+/* We have to have both stdarg.h or varargs.h AND v*printf or doprnt to use
+ variadic versions of these functions. */
+
+#if HAVE_STDARG_H || HAVE_VARARGS_H
+# if HAVE_VPRINTF || HAVE_DOPRNT
+# define USE_VARIADIC 1
+# endif
+#endif
+
+#if __STDC__ && USE_VARIADIC
extern void message (int prefix, const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern void error (const struct floc *flocp, const char *fmt, ...)