diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2006-04-26 17:23:28 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2006-04-26 17:23:28 +0000 |
commit | 3cbb1b2b64453c5504df5696ffbf72cb08e43f9c (patch) | |
tree | cd7d78df702dff218b638b7a614d796c20129b1b /lib/hostthre.c | |
parent | d75e58761370e4f4c5d496252509a3f2c98e6fd6 (diff) |
Use the HAVE_MALLOC_H and HAVE_PROCESS_H defines
(more logical).
Diffstat (limited to 'lib/hostthre.c')
-rw-r--r-- | lib/hostthre.c | 12 |
1 files changed, 5 insertions, 7 deletions
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 <string.h> #include <errno.h> -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef HAVE_MALLOC_H #include <malloc.h> -#else +#endif #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif @@ -55,14 +55,12 @@ #include <inet.h> #include <stdlib.h> #endif -#endif #ifdef HAVE_SETJMP_H #include <setjmp.h> #endif -#ifdef WIN32 -#include <stdlib.h> +#ifdef HAVE_PROCESS_H #include <process.h> #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 |