From 65fc05826e42985a2fcc394c14a1dc0ed434f502 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 25 Nov 2006 01:02:52 +0000 Subject: [PATCH] Make sure RETSIGTYPE is properly defined --- Makefile.dj | 2 +- config-win32.h | 23 +++++++++++++++++++++++ configure.ac | 2 ++ setup_once.h | 9 +++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Makefile.dj b/Makefile.dj index 58ff9c6a..23a9ecad 100644 --- a/Makefile.dj +++ b/Makefile.dj @@ -11,7 +11,7 @@ include Makefile.inc CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \ -DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \ -DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \ - -DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T \ + -DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' \ -DHAVE_ARPA_NAMESER_H -DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND \ -DSEND_TYPE_ARG1='int' -DSEND_QUAL_ARG2='const' \ -DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \ diff --git a/config-win32.h b/config-win32.h index 4b802e13..6fd81181 100644 --- a/config-win32.h +++ b/config-win32.h @@ -125,6 +125,29 @@ #undef HAVE_WS2TCPIP_H #endif +/* ---------------------------------------------------------------- */ +/* TYPEDEF REPLACEMENTS */ +/* ---------------------------------------------------------------- */ + +/* Define this if in_addr_t is not an available 'typedefed' type */ +#define in_addr_t unsigned long + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +/* Define ssize_t if it is not an available 'typedefed' type */ +#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) +#elif defined(_WIN64) +#define ssize_t __int64 +#else +#define ssize_t int +#endif + +/* Define to 'int' if socklen_t is not an available 'typedefed' type */ +#ifndef HAVE_WS2TCPIP_H +#define socklen_t int +#endif + /* ---------------------------------------------------------------- */ /* STRUCT RELATED */ /* ---------------------------------------------------------------- */ diff --git a/configure.ac b/configure.ac index 71d4a015..05262b96 100644 --- a/configure.ac +++ b/configure.ac @@ -299,6 +299,8 @@ TYPE_SOCKADDR_STORAGE TYPE_SIG_ATOMIC_T +AC_TYPE_SIGNAL + CURL_CHECK_FUNC_RECV CURL_CHECK_FUNC_SEND diff --git a/setup_once.h b/setup_once.h index 23d75ca0..7c22b2aa 100644 --- a/setup_once.h +++ b/setup_once.h @@ -133,5 +133,14 @@ typedef int sig_atomic_t; #endif +/* + * Default return type for signal handlers. + */ + +#ifndef RETSIGTYPE +#define RETSIGTYPE void +#endif + + #endif /* __SETUP_ONCE_H */