diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2004-08-20 13:45:26 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2004-08-20 13:45:26 +0000 |
commit | 6deb40acac246489db7c6021f7432d83a867670d (patch) | |
tree | 48fe529bed68f3b197e8e39fd60d70453d5551ce /setup.h | |
parent | 5133b2b6b9755497bf2cc6c58f40fbebc24b47f6 (diff) | |
download | c-ares-6deb40acac246489db7c6021f7432d83a867670d.tar.gz c-ares-6deb40acac246489db7c6021f7432d83a867670d.tar.bz2 c-ares-6deb40acac246489db7c6021f7432d83a867670d.zip |
Changes for Watt-32 on Windows. I've assumed Configure
sets the required HAVE_xx defines for non-DOS/Win targets.
Diffstat (limited to 'setup.h')
-rw-r--r-- | setup.h | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -19,6 +19,12 @@ #else /* simple work-around for now, for systems without configure support */ #define ssize_t int + +#ifdef __MINGW32__ +#define HAVE_SYS_TIME_H +#define HAVE_UNISTD_H +#endif + #endif /* Recent autoconf versions define these symbols in config.h. We don't want @@ -33,7 +39,7 @@ #undef PACKAGE /* now typedef our socket type */ -#ifdef WIN32 +#if defined(WIN32) && !defined(WATT32) #include <winsock.h> typedef SOCKET ares_socket_t; #define ARES_SOCKET_BAD INVALID_SOCKET @@ -42,4 +48,31 @@ typedef int ares_socket_t; #define ARES_SOCKET_BAD -1 #endif +/* Assume a few thing unless they're set by configure + */ +#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) +#define HAVE_SYS_TIME_H +#endif + +#if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER) +#define HAVE_UNISTD_H +#endif + +#if !defined(HAVE_SYS_UIO_H) && !defined(WIN32) +#define HAVE_SYS_UIO_H +#endif + +#if (defined(WIN32) || defined(WATT32)) && \ + !(defined(__MINGW32__) || defined(NETWARE)) +/* protos for the functions we provide in windows_port.c */ +int ares_strncasecmp(const char *s1, const char *s2, int n); +int ares_strcasecmp(const char *s1, const char *s2); + +/* use this define magic to prevent us from adding symbol names to the library + that is a high-risk to collide with another libraries' attempts to do the + same */ +#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c) +#define strcasecmp(a,b) ares_strcasecmp(a,b) +#endif + #endif /* ARES_SETUP_H */ |