From 3cbb1b2b64453c5504df5696ffbf72cb08e43f9c Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Wed, 26 Apr 2006 17:23:28 +0000 Subject: Use the HAVE_MALLOC_H and HAVE_PROCESS_H defines (more logical). --- lib/hostares.c | 7 +++---- lib/hostasyn.c | 7 +++---- lib/hostip.c | 7 +++---- lib/hostip4.c | 7 +++---- lib/hostip6.c | 15 +++++++-------- lib/hostsyn.c | 7 +++---- lib/hostthre.c | 12 +++++------- lib/ldap.c | 4 +++- 8 files changed, 30 insertions(+), 36 deletions(-) (limited to 'lib') diff --git a/lib/hostares.c b/lib/hostares.c index baaa4b0fb..6ea6e51d5 100644 --- a/lib/hostares.c +++ b/lib/hostares.c @@ -26,9 +26,9 @@ #include #include -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H /* Win32 */ #include -#else +#endif #ifdef HAVE_SYS_TYPES_H #include #endif @@ -55,13 +55,12 @@ #include #include #endif -#endif #ifdef HAVE_SETJMP_H #include #endif -#ifdef WIN32 +#ifdef HAVE_PROCESS_H #include #endif diff --git a/lib/hostasyn.c b/lib/hostasyn.c index d1b7cdd18..f9e9edbef 100644 --- a/lib/hostasyn.c +++ b/lib/hostasyn.c @@ -26,9 +26,9 @@ #include #include -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H /* Win32 */ #include -#else +#endif #ifdef HAVE_SYS_TYPES_H #include #endif @@ -55,13 +55,12 @@ #include #include #endif -#endif #ifdef HAVE_SETJMP_H #include #endif -#ifdef WIN32 +#ifdef HAVE_PROCESS_H #include #endif diff --git a/lib/hostip.c b/lib/hostip.c index 6cf652f87..407c6b2f8 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -26,9 +26,9 @@ #include #include -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H /* Win32 */ #include -#else +#endif #ifdef HAVE_SYS_TYPES_H #include #endif @@ -55,13 +55,12 @@ #include #include #endif -#endif #ifdef HAVE_SETJMP_H #include #endif -#ifdef WIN32 +#ifdef HAVE_PROCESS_H #include #endif diff --git a/lib/hostip4.c b/lib/hostip4.c index c7bdb6dc9..4e57d3e80 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -26,9 +26,9 @@ #include #include -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H /* Win32 */ #include -#else +#endif #ifdef HAVE_SYS_TYPES_H #include #endif @@ -55,13 +55,12 @@ #include #include #endif -#endif #ifdef HAVE_SETJMP_H #include #endif -#ifdef WIN32 +#ifdef HAVE_PROCESS_H #include #endif diff --git a/lib/hostip6.c b/lib/hostip6.c index ae36ad738..693b98e4c 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -26,9 +26,9 @@ #include #include -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H #include -#else +#endif #ifdef HAVE_SYS_TYPES_H #include #endif @@ -55,13 +55,12 @@ #include #include #endif -#endif #ifdef HAVE_SETJMP_H #include #endif -#ifdef WIN32 +#ifdef HAVE_PROCESS_H #include #endif @@ -143,10 +142,10 @@ int curl_dogetnameinfo(const struct sockaddr *sa, socklen_t salen, char *serv, size_t servlen, int flags, int line, const char *source) { - int res = (getnameinfo)(sa, salen, - host, hostlen, - serv, servlen, - flags); + int res = (getnameinfo)(sa, salen, + host, hostlen, + serv, servlen, + flags); if(0 == res) { /* success */ if(logfile) diff --git a/lib/hostsyn.c b/lib/hostsyn.c index fac78f11f..30dc4963a 100644 --- a/lib/hostsyn.c +++ b/lib/hostsyn.c @@ -26,9 +26,9 @@ #include #include -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H #include -#else +#endif #ifdef HAVE_SYS_TYPES_H #include #endif @@ -55,13 +55,12 @@ #include #include #endif -#endif #ifdef HAVE_SETJMP_H #include #endif -#ifdef WIN32 +#ifdef HAVE_PROCESS_H #include #endif diff --git a/lib/hostthre.c b/lib/hostthre.c index 32d212f14..504af41b6 100644 --- a/lib/hostthre.c +++ b/lib/hostthre.c @@ -26,9 +26,9 @@ #include #include -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H #include -#else +#endif #ifdef HAVE_SYS_TYPES_H #include #endif @@ -55,14 +55,12 @@ #include #include #endif -#endif #ifdef HAVE_SETJMP_H #include #endif -#ifdef WIN32 -#include +#ifdef HAVE_PROCESS_H #include #endif @@ -301,7 +299,7 @@ static unsigned __stdcall gethostbyname_thread (void *arg) struct thread_sync_data tsd = { 0,0,0,NULL }; if (!init_thread_sync_data(td, conn->async.hostname, &tsd)) { /* thread synchronization data initialization failed */ - return -1; + return (unsigned)-1; } /* Sharing the same _iob[] element with our parent thread should @@ -570,7 +568,7 @@ static bool init_resolve_thread (struct connectdata *conn, thread_and_event[1] = td->event_thread_started; if (WaitForMultipleObjects(sizeof(thread_and_event) / sizeof(thread_and_event[0]), - thread_and_event, FALSE, + (const HANDLE*)thread_and_event, FALSE, INFINITE) == WAIT_FAILED) { /* The resolver thread has been created, * most probably it works now - ignoring this "minor" error diff --git a/lib/ldap.c b/lib/ldap.c index 47b5fdefd..558d6f40f 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -36,10 +36,12 @@ #ifdef HAVE_SYS_STAT_H #include #endif +#ifdef HAVE_MALLOC_H +#include +#endif #include #if defined(WIN32) -# include # include #endif -- cgit v1.2.3