summaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-07-01 13:55:13 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-07-01 13:55:13 +0000
commit60af1cbcc2a8c8782e8ec7c73995d009effea742 (patch)
tree3e366f110ff6796217e48ed45a3f09f5fc6d0b3e /ares
parent8952ef933b89e59c3729694bac971e9f4aa3db30 (diff)
downloadcurl-60af1cbcc2a8c8782e8ec7c73995d009effea742.tar.gz
djgpp fixes by Gisle
Diffstat (limited to 'ares')
-rw-r--r--ares/CHANGES4
-rw-r--r--ares/ares_gethostbyaddr.c6
-rw-r--r--ares/ares_gethostbyname.c6
-rw-r--r--ares/ares_private.h7
-rw-r--r--ares/nameser.h1
5 files changed, 22 insertions, 2 deletions
diff --git a/ares/CHANGES b/ares/CHANGES
index e597ed94a..cd0c451d5 100644
--- a/ares/CHANGES
+++ b/ares/CHANGES
@@ -1,5 +1,9 @@
Changelog for the c-ares project
+* July 1
+- Gisle Vanem provided Makefile.dj to build with djgpp, added a few more djgpp
+ fixes and made ares not use 'errno' to provide further info on Windows.
+
* June 30
- Gisle Vanem made it build with djgpp and run fine with the Watt-32 stack.
diff --git a/ares/ares_gethostbyaddr.c b/ares/ares_gethostbyaddr.c
index 7e91dce19..5652145d9 100644
--- a/ares/ares_gethostbyaddr.c
+++ b/ares/ares_gethostbyaddr.c
@@ -151,6 +151,12 @@ static int file_lookup(struct in_addr *addr, struct hostent **host)
strcat(PATH_HOSTS, PATH_HOSTS_9X);
}
+#elif defined(WATT32)
+ extern const char *_w32_GetHostsFile (void);
+ const char *PATH_HOSTS = _w32_GetHostsFile();
+
+ if (!PATH_HOSTS)
+ return ARES_ENOTFOUND;
#endif
fp = fopen(PATH_HOSTS, "r");
diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c
index accf962cf..0d06dfe93 100644
--- a/ares/ares_gethostbyname.c
+++ b/ares/ares_gethostbyname.c
@@ -224,6 +224,12 @@ static int file_lookup(const char *name, struct hostent **host)
strcat(PATH_HOSTS, PATH_HOSTS_9X);
}
+#elif defined(WATT32)
+ extern const char *_w32_GetHostsFile (void);
+ const char *PATH_HOSTS = _w32_GetHostsFile();
+
+ if (!PATH_HOSTS)
+ return ARES_ENOTFOUND;
#endif
fp = fopen(PATH_HOSTS, "r");
diff --git a/ares/ares_private.h b/ares/ares_private.h
index caff53b34..d8b7fd1d4 100644
--- a/ares/ares_private.h
+++ b/ares/ares_private.h
@@ -32,7 +32,6 @@
#include <sys/ioctl.h>
#undef closesocket
#define closesocket(s) close_s(s)
-#define select(n,r,w,x,t) select_s(n,r,w,x,t)
#define writev(s,v,c) writev_s(s,v,c)
#endif
@@ -51,7 +50,11 @@
#define DHCPNAMESERVER "DhcpNameServer"
#define PATH_HOSTS_NT "\\drivers\\etc\\hosts"
#define PATH_HOSTS_9X "\\hosts"
-
+
+#elif defined(WATT32)
+
+#define PATH_RESOLV_CONF "/dev/ENV/etc/resolv.conf"
+
#else
#define PATH_RESOLV_CONF "/etc/resolv.conf"
diff --git a/ares/nameser.h b/ares/nameser.h
index b6c78aa6d..0311c7e6e 100644
--- a/ares/nameser.h
+++ b/ares/nameser.h
@@ -11,6 +11,7 @@
#define MAXHOSTNAMELEN 256
#define EINPROGRESS WSAEINPROGRESS
+#define EWOULDBLOCK WSAEWOULDBLOCK
/* Structure for scatter/gather I/O. */
struct iovec