]> sjero.net Git - wget/blobdiff - windows/config.h.ms
[svn] Fix broken MSVC compile.
[wget] / windows / config.h.ms
index 89c01a52ed7c3aaa79a43ce6647666727a8d3ad9..aedbdf404daaa94f6a71481ef527921c1de36fde 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