#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
#include <inet.h>
#include <stdlib.h>
#endif
-#endif
#ifdef HAVE_SETJMP_H
#include <setjmp.h>
#endif
-#ifdef WIN32
+#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
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)
#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
#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
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
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