]> sjero.net Git - wget/commitdiff
[svn] Don't #define __STDC__ against the compiler's will.
authorhniksic <devnull@localhost>
Mon, 20 May 2002 00:38:14 +0000 (17:38 -0700)
committerhniksic <devnull@localhost>
Mon, 20 May 2002 00:38:14 +0000 (17:38 -0700)
Published in <sxsptzr64ea.fsf@florida.munich.redhat.com>.

ChangeLog
src/ChangeLog
src/log.c
src/mswindows.h
windows/config.h.bor
windows/config.h.ms

index e40a4e783c655c979f5da17d9f172f73f3ba36af..3b6e00b73d15f3a33e8ef7a22d0a4ff592d6c389 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-20  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * windows/config.h.ms: Ditto.
+
+       * windows/config.h.bor: Don't #define __STDC__.
+
 2002-05-18  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * ALL: Update the license to reflect the OpenSSL exception.
index c0fd1664ef2c03d247c2ad4f3d2b50ae34a36cb3..22fd418dba172bed753b3a3328463d9722989451 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-20  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * log.c: Don't #undef WGET_USE_STDARG.
+
 2002-05-16  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * hash.c (prime_size): Store the offset of the prime number in the
index e3e697b0b66d9614733920599e86bc09a9956ae4..0ac45b76ece43822635b07f709a1b5e676dd0fbd 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -29,15 +29,18 @@ so, delete this exception statement from your version.  */
 
 #include <config.h>
 
+/* This allows the architecture-specific .h files to specify the use
+   of stdargs regardless of __STDC__.  */
+#ifndef WGET_USE_STDARG
 /* 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
+# ifdef __STDC__
+#  ifdef HAVE_STDARG_H
+#   define WGET_USE_STDARG
+#  endif
 # endif
-#endif
+#endif /* not WGET_USE_STDARG */
 
 #include <stdio.h>
 #ifdef HAVE_STRING_H
index 52a42e593abd2b5b1ab11b13f5e8eb1a5dcc23ea..9a7a97f064a99890145a05eded2fbe534144132d 100644 (file)
@@ -65,6 +65,10 @@ so, delete this exception statement from your version.  */
 #endif
 #endif
 
+/* Use ANSI-style stdargs regardless of whether the compiler bothers
+   to define __STDC__.  (Many don't when extensions are enabled.)  */
+#define WGET_USE_STDARG
+
 #define REALCLOSE(x) closesocket (x)
 
 /* read & write don't work with sockets on Windows 95.  */
index ce2fb025c750b019db836d114cc32546cde3dff3..53e6075329b4cec71ffa1aecf85aa64b0391105d 100644 (file)
 #ifndef CONFIG_H
 #define CONFIG_H
 
-/* Borland C does not define __STDC__ when the Borland extensions are
-   enabled, but you need those extensions to compile <windows.h>.  */
-#if !defined(__STDC__) && defined(__BORLANDC__)
-# define __STDC__ 1
-#endif
-
 #define HAVE_MEMMOVE
 #define ftruncate chsize
 #define inline __inline
index 27aba5874fadc6227e6b52c4dc45e86450cf8413..32e94dfe55e541df7d24ea294c4dc7cb16bb1f69 100644 (file)
 #ifndef CONFIG_H
 #define CONFIG_H
 
-/* MS Visual C does not define __STDC__ when the MSC extensions are
-   enabled, but you need those extensions to compile <windows.h>.  */
-#if !defined(__STDC__) && defined(_MSC_EXTENSIONS)
-# define __STDC__ 1
-#endif
-
-/* Setting __STDC__ causes MSVC to break other stuff... */
-#if __STDC__ && defined(_MSC_VER)
-# define utimbuf _utimbuf
-# define O_RDONLY _O_RDONLY
-# define alloca _alloca
-#endif
-
 /* Define if you have the <alloca.h> header file.  */
 #undef HAVE_ALLOCA_H