aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hostares.c7
-rw-r--r--lib/hostasyn.c7
-rw-r--r--lib/hostip.c7
-rw-r--r--lib/hostip4.c7
-rw-r--r--lib/hostip6.c15
-rw-r--r--lib/hostsyn.c7
-rw-r--r--lib/hostthre.c12
-rw-r--r--lib/ldap.c4
8 files changed, 30 insertions, 36 deletions
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 <string.h>
#include <errno.h>
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
+#ifdef HAVE_MALLOC_H /* Win32 */
#include <malloc.h>
-#else
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -55,13 +55,12 @@
#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
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 <string.h>
#include <errno.h>
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
+#ifdef HAVE_MALLOC_H /* Win32 */
#include <malloc.h>
-#else
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -55,13 +55,12 @@
#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
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 <string.h>
#include <errno.h>
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
+#ifdef HAVE_MALLOC_H /* Win32 */
#include <malloc.h>
-#else
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -55,13 +55,12 @@
#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
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 <string.h>
#include <errno.h>
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
+#ifdef HAVE_MALLOC_H /* Win32 */
#include <malloc.h>
-#else
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -55,13 +55,12 @@
#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
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 <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,13 +55,12 @@
#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
@@ -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 <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,13 +55,12 @@
#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
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
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 <sys/stat.h>
#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
#include <errno.h>
#if defined(WIN32)
-# include <malloc.h>
# include <winldap.h>
#endif