aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-04-25 03:00:10 +0000
committerYang Tse <yangsita@gmail.com>2007-04-25 03:00:10 +0000
commit94b253fde793a7419f0eafe16b24f440d344a1c9 (patch)
tree535b51278396773021d65c7df0a81dd7a359d7a0 /lib/hostip.c
parent61d7e720a58bef33e46b300c70ad88793801e077 (diff)
Steve Little's fixes to allow compilation on VMS 64-bit mode
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 399ac53e5..9fb157fd3 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -598,6 +598,14 @@ struct namebuf {
Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port)
{
Curl_addrinfo *ai;
+
+#if defined(VMS) && \
+ defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
+#pragma pointer_size save
+#pragma pointer_size short
+#pragma message disable PTRMISMATCH
+#endif
+
struct hostent *h;
struct in_addr *addrentry;
struct namebuf buffer;
@@ -624,10 +632,16 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port)
/* Now store the dotted version of the address */
snprintf((char *)h->h_name, 16, "%s", hostname);
+#if defined(VMS) && \
+ defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
+#pragma pointer_size restore
+#pragma message enable PTRMISMATCH
+#endif
+
ai = Curl_he2ai(h, port);
return ai;
}
-#endif
+#endif /* CURLRES_IPV4 || CURLRES_ARES */