summaryrefslogtreecommitdiff
path: root/misc.c
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 /misc.c
parentfafeb870272fd3b3623d8eb8241c915af39f5855 (diff)
downloadgunmake-be8c3dbc974c35fac33c8392b89482c10e4f8650.tar.gz
Numerous fixes: patches for OS/2; core for -f ''; makefile updates.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/misc.c b/misc.c
index 9e5a516..0832042 100644
--- a/misc.c
+++ b/misc.c
@@ -30,9 +30,8 @@ Boston, MA 02111-1307, USA. */
This fancy stuff all came from GNU fileutils, except for the VA_PRINTF and
VA_END macros used here since we have multiple print functions. */
-#if HAVE_VPRINTF || HAVE_DOPRNT
-# define HAVE_STDVARARGS 1
-# if __STDC__
+#if USE_VARIADIC
+# if HAVE_STDARG_H
# include <stdarg.h>
# define VA_START(args, lastarg) va_start(args, lastarg)
# else
@@ -46,7 +45,7 @@ Boston, MA 02111-1307, USA. */
# endif
# define VA_END(args) va_end(args)
#else
-/* # undef HAVE_STDVARARGS */
+/* We can't use any variadic interface! */
# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
# define VA_START(args, lastarg)
@@ -206,7 +205,7 @@ concat (const char *s1, const char *s2, const char *s3)
/* Print a message on stdout. */
void
-#if __STDC__ && HAVE_STDVARARGS
+#if USE_VARIADIC
message (int prefix, const char *fmt, ...)
#else
message (prefix, fmt, va_alist)
@@ -215,7 +214,7 @@ message (prefix, fmt, va_alist)
va_dcl
#endif
{
-#if HAVE_STDVARARGS
+#if USE_VARIADIC
va_list args;
#endif
@@ -242,7 +241,7 @@ message (prefix, fmt, va_alist)
/* Print an error message. */
void
-#if __STDC__ && HAVE_STDVARARGS
+#if USE_VARIADIC
error (const struct floc *flocp, const char *fmt, ...)
#else
error (flocp, fmt, va_alist)
@@ -251,7 +250,7 @@ error (flocp, fmt, va_alist)
va_dcl
#endif
{
-#if HAVE_STDVARARGS
+#if USE_VARIADIC
va_list args;
#endif
@@ -275,7 +274,7 @@ error (flocp, fmt, va_alist)
/* Print an error message and exit. */
void
-#if __STDC__ && HAVE_STDVARARGS
+#if USE_VARIADIC
fatal (const struct floc *flocp, const char *fmt, ...)
#else
fatal (flocp, fmt, va_alist)
@@ -284,7 +283,7 @@ fatal (flocp, fmt, va_alist)
va_dcl
#endif
{
-#if HAVE_STDVARARGS
+#if USE_VARIADIC
va_list args;
#endif