More Windows patches
Gisle Vanem <[email protected]> Wed, 13 Dec 2006 15:30:24 +0100
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--Boundary_(ID_Z/4cZGhHdwLpKsarRny/YQ)
Content-type: text/plain; format=flowed; charset=iso-8859-1; reply-type=original
Content-transfer-encoding: 7BIT
The attached file has patches for:
* windows/config.h: Added 'HAVE_SYS_UTIME_H 1' which gets
undef-ed as needed in config-compiler.h.
* windows/config-compiler.h: Added '_WIN32_WINNT=0x0501'
as needed to pull in the prototype of getaddrinfo() etc. Digital Mars
do have 'uintptr_t' and 'intptr_t'. Watcom do have <stdbol.h>, but
the file canot be used since the '_Bool' builtin is missing in the
compiler!.
* src/mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
Tested with the following compilers:
Visual-C 6+7, MingW 3.7/gcc 3.4.5, Digital Mars 8.39 and
Open Watcom 1.6.
--gv
--Boundary_(ID_Z/4cZGhHdwLpKsarRny/YQ)
Content-type: text/plain; format=flowed; name=diffs-3.txt; reply-type=original
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=diffs-3.txt
diff -u3 -Hb -r SVN-Latest/src/mswindows.c ./src/mswindows.c
--- SVN-Latest/src/mswindows.c Tue Sep 05 09:53:08 2006
+++ ./src/mswindows.c Wed Dec 13 14:48:11 2006
@@ -90,6 +90,7 @@
WSACleanup ();
}
+#if defined(CTRLBREAK_BACKGND) || defined(CTRLC_BACKGND)
static void
ws_hangup (const char *reason)
{
@@ -103,6 +104,7 @@
gesture as the parent will wait for us to terminate before resuming. */
FreeConsole ();
}
+#endif
/* Construct the name for a named section (a.k.a. `file mapping') object.
The returned string is dynamically allocated and needs to be xfree()'d. */
diff -u3 -Hb -r SVN-Latest/windows/config-compiler.h ./windows/config-compiler.h
--- SVN-Latest/windows/config-compiler.h Wed Nov 01 15:31:42 2006
+++ ./windows/config-compiler.h Wed Dec 13 14:59:05 2006
@@ -89,9 +89,17 @@
#define SIZEOF_LONG_LONG 8
#define HAVE_INTPTR_T 1
#define HAVE_UINTPTR_T 1
-
#define HAVE_STRTOLL 1
+/* MingW needs _WIN32_WINNT==0x0501 defined to pull in getaddrinfo()
+ * and freeaddrinfo() etc.
+ */
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501)
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+
/* -------------------- */
/* MS Visual C section. */
/* -------------------- */
@@ -115,10 +123,11 @@
#if _MSC_VER >= 1400
#pragma warning ( disable : 4996 )
#define _CRT_SECURE_NO_DEPRECATE
-#define HAVE_SYS_UTIME_H 1
-#undef HAVE_UTIME_H
#endif
+#undef HAVE_UTIME_H /* no <utime.h> */
+
+
/* ------------------ */
/* Borland C section. */
/* ------------------ */
@@ -158,12 +167,16 @@
#define HAVE_STDBOOL_H 1
#define HAVE_UINT32_T 1
+#define HAVE_UINTPTR_T 1
+#define HAVE_INTPTR_T 1
+
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#define HAVE__BOOL 1
#define HAVE_USLEEP 1
#define HAVE_STRTOLL 1
+#undef HAVE_UTIME_H /* no <utime.h> */
/* -------------------- */
@@ -186,15 +199,25 @@
#define HAVE_STDINT_H 1
#define HAVE_INTTYPES_H 1
-#define HAVE_STDBOOL_H 1
+
+/* Watcom 1.6 do have <stdbool.h>, but definition of '_Bool' is missing! */
+/* #define HAVE_STDBOOL_H 1 */
#define HAVE_STRTOLL 1
#define HAVE_UINT32_T 1
-#define HAVE_SYS_UTIME_H 1
#undef HAVE_UTIME_H
#undef socklen_t /* avoid clash with <ws2tcpip.h> */
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
+
+/* OpenWatcom needs _WIN32_WINNT==0x0501 defined to pull in getaddrinfo()
+ * and freeaddrinfo() etc.
+ */
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501)
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
#else
# error Your compiler is not supported.
diff -u3 -Hb -r SVN-Latest/windows/config.h ./windows/config.h
--- SVN-Latest/windows/config.h Tue Dec 12 12:42:11 2006
+++ ./windows/config.h Wed Dec 13 14:52:37 2006
@@ -139,6 +139,9 @@
/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
+/* Define to 1 if you have the <sys/utime.h> header file. */
+#define HAVE_SYS_UTIME_H 1
+
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
--Boundary_(ID_Z/4cZGhHdwLpKsarRny/YQ)--