From fca8dcf8294cfe239c33a1cd909a5aee0851e1cb Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 11 Apr 2002 12:13:57 -0700 Subject: [PATCH] [svn] Use stdarg only if compiling with an ANSI C compiler. --- src/ChangeLog | 5 +++++ src/log.c | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 590f3861..9b0c2005 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-04-11 Hrvoje Niksic + + * log.c: Set WGET_USE_STDARG if __STDC__ is defined and stdarg.h + is present. + 2002-04-11 Hrvoje Niksic * progress.c (bar_create): If INITIAL is larger than TOTAL, fix diff --git a/src/log.c b/src/log.c index 85a8b5ed..89e46d9a 100644 --- a/src/log.c +++ b/src/log.c @@ -19,6 +19,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +/* Use stdarg only if the compiler supports ANSI C and stdarg.h is + present. We check for both because there are configurations where + stdarg.h exists, but doesn't work. */ +#undef WGET_USE_STDARG +#ifdef __STDC__ +# ifdef HAVE_STDARG_H +# define WGET_USE_STDARG +# endif +#endif + #include #ifdef HAVE_STRING_H # include @@ -26,8 +36,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ # include #endif #include -#ifdef HAVE_STDARG_H -# define WGET_USE_STDARG +#ifdef WGET_USE_STDARG # include #else # include -- 2.39.2