From 336c0de30166c540bd744c6faacf10a3c5373cfb Mon Sep 17 00:00:00 2001 From: mtortonesi Date: Fri, 29 Dec 2006 09:23:20 -0800 Subject: [PATCH] [svn] Several Windows-related changes. --- src/ChangeLog | 4 ++++ src/mswindows.c | 2 ++ windows/ChangeLog | 12 ++++++++++++ windows/config-compiler.h | 33 ++++++++++++++++++++++++++++----- windows/config.h | 3 +++ 5 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bafe2228..5f137171 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-12-29 Gisle Vanem + + * mswindows.c: Avoid a warning if 'ws_hangup()' is unused. + 2006-12-27 Mauro Tortonesi * http.c (parse_content_disposition): Consider directory prefix, if diff --git a/src/mswindows.c b/src/mswindows.c index ab31e73d..64a9eb95 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -90,6 +90,7 @@ ws_cleanup (void) WSACleanup (); } +#if defined(CTRLBREAK_BACKGND) || defined(CTRLC_BACKGND) static void ws_hangup (const char *reason) { @@ -103,6 +104,7 @@ ws_hangup (const char *reason) 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 --git a/windows/ChangeLog b/windows/ChangeLog index e4dc749c..659a2075 100644 --- a/windows/ChangeLog +++ b/windows/ChangeLog @@ -1,3 +1,15 @@ +2006-12-29 Gisle Vanem + + * config.h: Added 'HAVE_SYS_UTIME_H 1' which gets undefined as needed + in config-compiler.h. + + * config-compiler.h: Added '_WIN32_WINNT=0x0501' as needed to pull in + the prototype of getaddrinfo() and other library functions. Defined + HAVE_UINTPTR_T and HAVE_INTPTR_T for Digital Mars, which supports + 'uintptr_t' and 'intptr_t'. Undefined HAVE_STDBOOL_H for Watcom, which + has but the file cannot be used since the '_Bool' builtin + is missing in the compiler! + 2006-10-12 Gisle Vanem * config-compiler.h (HAVE_INTPTR_T): Define to 1 under MinGW. diff --git a/windows/config-compiler.h b/windows/config-compiler.h index a4435ef9..033f470d 100644 --- a/windows/config-compiler.h +++ b/windows/config-compiler.h @@ -89,8 +89,16 @@ so, delete this exception statement from your version. */ #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,9 +123,10 @@ so, delete this exception statement from your version. */ #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 */ + /* ------------------ */ /* Borland C section. */ @@ -158,12 +167,16 @@ so, delete this exception statement from your version. */ #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 */ /* -------------------- */ @@ -186,15 +199,25 @@ so, delete this exception statement from your version. */ #define HAVE_STDINT_H 1 #define HAVE_INTTYPES_H 1 -#define HAVE_STDBOOL_H 1 + +/* Watcom 1.6 do have , 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 */ #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 --git a/windows/config.h b/windows/config.h index b518a82b..9736b196 100644 --- a/windows/config.h +++ b/windows/config.h @@ -139,6 +139,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UTIME_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UTIME_H 1 + /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 -- 2.39.2