]> sjero.net Git - wget/commitdiff
[svn] Fix broken MSVC compile.
authorabbotti <devnull@localhost>
Tue, 23 Apr 2002 20:25:52 +0000 (13:25 -0700)
committerabbotti <devnull@localhost>
Tue, 23 Apr 2002 20:25:52 +0000 (13:25 -0700)
Submitted by Ian Abbott in <3CC5D023.4305.2F710A@localhost>.

ChangeLog
windows/config.h.ms

index c9d3cb0c1f6612ade698363236f21697d2f28961..2950336a4675d8d2f21444cf5b829b1bd4ef5c50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-23  Ian Abbott  <abbotti@mev.co.uk>
+
+       * windows/config.h.ms: Accounted for MSVC not defining `__STDC__' when
+       Microsoft's extensions are enabled and define it anyway (set to `1').
+       Defined some things that broke as a result of this.
+
 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * po/de.po: Updated from the TP.
 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * po/de.po: Updated from the TP.
index 89c01a52ed7c3aaa79a43ce6647666727a8d3ad9..aedbdf404daaa94f6a71481ef527921c1de36fde 100644 (file)
 #ifndef CONFIG_H
 #define CONFIG_H
 
 #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
 
 /* Define if you have the <alloca.h> header file.  */
 #undef HAVE_ALLOCA_H