]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Use the HAVE_MALLOC_H and HAVE_PROCESS_H defines
authorGisle Vanem <gvanem@broadpark.no>
Wed, 26 Apr 2006 17:23:28 +0000 (17:23 +0000)
committerGisle Vanem <gvanem@broadpark.no>
Wed, 26 Apr 2006 17:23:28 +0000 (17:23 +0000)
(more logical).

lib/hostares.c
lib/hostasyn.c
lib/hostip.c
lib/hostip4.c
lib/hostip6.c
lib/hostsyn.c
lib/hostthre.c
lib/ldap.c

index baaa4b0fbf348fba0c6c2e4986b11aae990d46a2..6ea6e51d5df7d6bcb0f0f852fd5a91d296c499ff 100644 (file)
@@ -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
 #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
 
index d1b7cdd186fe07ef8f975cb7beb6e81c5814dd4f..f9e9edbefb79a9531be5ce1d7a055d9dce2b2cce 100644 (file)
@@ -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
 #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
 
index 6cf652f87a9a7752daab9d73660510829caa7a09..407c6b2f8927a063ddaed554271f3ede3135fda0 100644 (file)
@@ -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
 #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
 
index c7bdb6dc9346fb917909075319c4b7d17c2d7428..4e57d3e80cbcbbf9f7f26924e5c8f239e4f697b7 100644 (file)
@@ -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
 #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
 
index ae36ad7381aac1ce1570a91170a2675df38fdf1d..693b98e4c18ccd747f6b56134a726316edacabcd 100644 (file)
@@ -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
 #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)
index fac78f11fe8403d3e2522e92fefc95ab8925d2d7..30dc4963a3165b442f7164d798bc26fb6ed853c0 100644 (file)
@@ -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
 #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
 
index 32d212f14857e2f3745b479f4310c0970f149d7a..504af41b665aa84af321a35a7d4ace2cddb26c1a 100644 (file)
@@ -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
 #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
index 47b5fdefda91b2497914d1ab34c5ac7b65c8deef..558d6f40f6671358be58657a01a3b30008ab45bb 100644 (file)
 #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