From: abbotti Date: Tue, 23 Apr 2002 20:25:52 +0000 (-0700) Subject: [svn] Fix broken MSVC compile. X-Git-Tag: v1.13~1766 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=7a6bf2477da09a59bd139aa9e848e7a4c2b94dc4 [svn] Fix broken MSVC compile. Submitted by Ian Abbott in <3CC5D023.4305.2F710A@localhost>. --- diff --git a/ChangeLog b/ChangeLog index c9d3cb0c..2950336a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-04-23 Ian Abbott + + * 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 * po/de.po: Updated from the TP. diff --git a/windows/config.h.ms b/windows/config.h.ms index 89c01a52..aedbdf40 100644 --- a/windows/config.h.ms +++ b/windows/config.h.ms @@ -19,6 +19,19 @@ #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 . */ +#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 header file. */ #undef HAVE_ALLOCA_H