From 7509ef6b4ea41680526ab71c9d71aec09209538e Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Tue, 3 Jul 2007 16:00:36 +0000 Subject: few minor changes to make ares compile for NetWare CLIB architecture. --- ares/Makefile.netware | 7 ++++--- ares/ares.h | 2 +- ares/ares_getnameinfo.c | 4 ++++ ares/ares_init.c | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'ares') diff --git a/ares/Makefile.netware b/ares/Makefile.netware index d5bfe7c06..c8e91c6d4 100644 --- a/ares/Makefile.netware +++ b/ares/Makefile.netware @@ -281,8 +281,8 @@ config.h: Makefile.netware @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@ ifeq ($(LIBARCH),CLIB) @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@ + @echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@ @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@ @@ -294,9 +294,10 @@ ifeq ($(LIBARCH),CLIB) @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@ @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@ - @echo $(DL)#define socklen_t int$(DL) >> $@ @echo $(DL)#define DL_LDAP_FILE "ldapsdk.nlm"$(DL) >> $@ - @echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@ + @echo $(DL)#define socklen_t int$(DL) >> $@ + @echo $(DL)#define strncasecmp strnicmp$(DL) >> $@ + @echo $(DL)#define strcasecmp stricmp$(DL) >> $@ else @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@ @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@ diff --git a/ares/ares.h b/ares/ares.h index 6b942951f..04b17ed62 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -20,7 +20,7 @@ #include -#if defined(_AIX) || defined(NETWARE) +#if defined(_AIX) || (defined(NETWARE) && defined(__NOVELL_LIBC__)) /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish libc5-based Linux systems. Only include it on system that are known to require it! */ diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c index 8d10cfc11..2c28cebf6 100644 --- a/ares/ares_getnameinfo.c +++ b/ares/ares_getnameinfo.c @@ -295,7 +295,11 @@ static char *lookup_service(unsigned short port, int flags, #endif #else /* Lets just hope the OS uses TLS! */ +#if (defined(NETWARE) && !defined(__NOVELL_LIBC__)) + sep = getservbyport(port, (char*)proto); +#else sep = getservbyport(port, proto); +#endif #endif } if (sep && sep->s_name) diff --git a/ares/ares_init.c b/ares/ares_init.c index c9faf45a0..f6018c90c 100644 --- a/ares/ares_init.c +++ b/ares/ares_init.c @@ -23,7 +23,10 @@ #include #else +#ifdef HAVE_SYS_PARAM_H #include +#endif + #ifdef HAVE_SYS_TIME_H #include #endif -- cgit v1.2.3