Things that apply to *all* compilers, as well as things that are
specific to Wget, belong in src/mswindows.h. */
+
+/* For all compilers: must include <sys/stat.h> before redefining
+ stat. */
+
+#include <sys/stat.h>
\f
/* -------------------- */
/* MinGW (GCC) section. */
/* -------------------- */
#if defined __GNUC__
+#define OS_TYPE "Windows-MinGW"
+
#define LL(n) n##LL
/* Transparently support statting large files, like POSIX's LFS API
from all import libraries. */
#ifdef ENABLE_IPV6
# undef gai_strerror
-# define gai_strerror windows_strerror
-# endif
+# define gai_strerror windows_strerror
#endif
\f
/* -------------------- */
/* -------------------- */
#elif defined _MSC_VER
+#define OS_TYPE "Windows-MSVC"
+
#define LL(n) n##I64
#define stat(fname, buf) _stati64 (fname, buf)
#define struct_fstat struct _stati64
#define isatty _isatty
+
+#if _MSC_VER >= 1300
+# define HAVE__STRTOI64
+#endif
\f
/* ------------------ */
/* Borland C section. */
/* ------------------ */
#elif defined __BORLANDC__
+#define OS_TYPE "Windows-Borland"
+
#define LL(n) n##I64
#define stat(fname, buf) _stati64 (fname, buf)
#define struct_stat struct stati64
/* ------------------------------ */
#elif defined __DMC__
+#define OS_TYPE "Windows-DMC"
+
#define LL(n) n##LL
#undef stat
#undef struct_stat
#undef struct_fstat
/* DMC's runtime supports some POSIX and C99 features we use. */
-#define HAVE_USLEEP 1
+
+#define HAVE_STDINT_H
+#define HAVE_INTTYPES_H
#define HAVE_STDBOOL_H 1
+
+#define HAVE_UINT32_T
+#undef SIZEOF_LONG_LONG
+#define SIZEOF_LONG_LONG 8
#define HAVE__BOOL 1
+
+#define HAVE_USLEEP 1
+#define HAVE_STRTOLL
+
\f
#else
# error Your compiler is not supported.