mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
Use the HAVE_MALLOC_H and HAVE_PROCESS_H defines
(more logical).
This commit is contained in:
parent
d75e587613
commit
3cbb1b2b64
@ -26,9 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#ifdef HAVE_MALLOC_H /* Win32 */
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -55,13 +55,12 @@
|
|||||||
#include <inet.h>
|
#include <inet.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SETJMP_H
|
#ifdef HAVE_SETJMP_H
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef HAVE_PROCESS_H
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#ifdef HAVE_MALLOC_H /* Win32 */
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -55,13 +55,12 @@
|
|||||||
#include <inet.h>
|
#include <inet.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SETJMP_H
|
#ifdef HAVE_SETJMP_H
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef HAVE_PROCESS_H
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#ifdef HAVE_MALLOC_H /* Win32 */
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -55,13 +55,12 @@
|
|||||||
#include <inet.h>
|
#include <inet.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SETJMP_H
|
#ifdef HAVE_SETJMP_H
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef HAVE_PROCESS_H
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#ifdef HAVE_MALLOC_H /* Win32 */
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -55,13 +55,12 @@
|
|||||||
#include <inet.h>
|
#include <inet.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SETJMP_H
|
#ifdef HAVE_SETJMP_H
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef HAVE_PROCESS_H
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#ifdef HAVE_MALLOC_H
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -55,13 +55,12 @@
|
|||||||
#include <inet.h>
|
#include <inet.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SETJMP_H
|
#ifdef HAVE_SETJMP_H
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef HAVE_PROCESS_H
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -143,10 +142,10 @@ int curl_dogetnameinfo(const struct sockaddr *sa, socklen_t salen,
|
|||||||
char *serv, size_t servlen, int flags,
|
char *serv, size_t servlen, int flags,
|
||||||
int line, const char *source)
|
int line, const char *source)
|
||||||
{
|
{
|
||||||
int res = (getnameinfo)(sa, salen,
|
int res = (getnameinfo)(sa, salen,
|
||||||
host, hostlen,
|
host, hostlen,
|
||||||
serv, servlen,
|
serv, servlen,
|
||||||
flags);
|
flags);
|
||||||
if(0 == res) {
|
if(0 == res) {
|
||||||
/* success */
|
/* success */
|
||||||
if(logfile)
|
if(logfile)
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#ifdef HAVE_MALLOC_H
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -55,13 +55,12 @@
|
|||||||
#include <inet.h>
|
#include <inet.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SETJMP_H
|
#ifdef HAVE_SETJMP_H
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef HAVE_PROCESS_H
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#ifdef HAVE_MALLOC_H
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -55,14 +55,12 @@
|
|||||||
#include <inet.h>
|
#include <inet.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SETJMP_H
|
#ifdef HAVE_SETJMP_H
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef HAVE_PROCESS_H
|
||||||
#include <stdlib.h>
|
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -301,7 +299,7 @@ static unsigned __stdcall gethostbyname_thread (void *arg)
|
|||||||
struct thread_sync_data tsd = { 0,0,0,NULL };
|
struct thread_sync_data tsd = { 0,0,0,NULL };
|
||||||
if (!init_thread_sync_data(td, conn->async.hostname, &tsd)) {
|
if (!init_thread_sync_data(td, conn->async.hostname, &tsd)) {
|
||||||
/* thread synchronization data initialization failed */
|
/* thread synchronization data initialization failed */
|
||||||
return -1;
|
return (unsigned)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sharing the same _iob[] element with our parent thread should
|
/* 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;
|
thread_and_event[1] = td->event_thread_started;
|
||||||
if (WaitForMultipleObjects(sizeof(thread_and_event) /
|
if (WaitForMultipleObjects(sizeof(thread_and_event) /
|
||||||
sizeof(thread_and_event[0]),
|
sizeof(thread_and_event[0]),
|
||||||
thread_and_event, FALSE,
|
(const HANDLE*)thread_and_event, FALSE,
|
||||||
INFINITE) == WAIT_FAILED) {
|
INFINITE) == WAIT_FAILED) {
|
||||||
/* The resolver thread has been created,
|
/* The resolver thread has been created,
|
||||||
* most probably it works now - ignoring this "minor" error
|
* most probably it works now - ignoring this "minor" error
|
||||||
|
@ -36,10 +36,12 @@
|
|||||||
#ifdef HAVE_SYS_STAT_H
|
#ifdef HAVE_SYS_STAT_H
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_MALLOC_H
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
# include <malloc.h>
|
|
||||||
# include <winldap.h>
|
# include <winldap.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user