#ifdef HAVE_INET_NTOA
-#ifndef INADDR_NONE
-#define INADDR_NONE (in_addr_t) ~0
-#endif
-
struct SessionHandle *data = conn->data;
/*************************************************************
/* First check if the given name is an IP address */
in=inet_addr(data->set.device);
- if((in == INADDR_NONE) &&
+ if((in == CURL_INADDR_NONE) &&
Curl_if2ip(data->set.device, myhost, sizeof(myhost))) {
/*
* We now have the numerical IPv4-style x.y.z.w in the 'myhost' buffer
infof(data, "We bind local end to %s\n", myhost);
in=inet_addr(myhost);
- if (INADDR_NONE != in) {
+ if (CURL_INADDR_NONE != in) {
if ( h ) {
Curl_addrinfo *addr = h->addr;
return (addr);
}
-#ifndef INADDR_NONE
-#define INADDR_NONE (in_addr_t) ~0
-#endif
-
static void hostcache_fixoffset(struct hostent *h, int offset)
{
int i=0;
port=0; /* unused in IPv4 code */
ret = 0; /* to prevent the compiler warning */
- if ( (in=inet_addr(hostname)) != INADDR_NONE ) {
+ in=inet_addr(hostname);
+ if (in != CURL_INADDR_NONE) {
struct in_addr *addrentry;
struct namebuf {
struct hostent hostentry;
int line, const char *source);
#endif
+#ifndef INADDR_NONE
+#define CURL_INADDR_NONE (in_addr_t) ~0
+#else
+#define CURL_INADDR_NONE INADDR_NONE
+#endif
+
+
#endif