diff options
author | Yang Tse <yangsita@gmail.com> | 2007-04-25 03:00:10 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-04-25 03:00:10 +0000 |
commit | 94b253fde793a7419f0eafe16b24f440d344a1c9 (patch) | |
tree | 535b51278396773021d65c7df0a81dd7a359d7a0 /lib | |
parent | 61d7e720a58bef33e46b300c70ad88793801e077 (diff) |
Steve Little's fixes to allow compilation on VMS 64-bit mode
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base64.c | 4 | ||||
-rw-r--r-- | lib/hostip.c | 16 | ||||
-rw-r--r-- | lib/netrc.c | 4 | ||||
-rw-r--r-- | lib/setup_once.h | 21 | ||||
-rw-r--r-- | lib/splay.c | 4 |
5 files changed, 43 insertions, 6 deletions
diff --git a/lib/base64.c b/lib/base64.c index a46d1f762..302d49885 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -252,7 +252,7 @@ size_t Curl_base64_encode(struct SessionHandle *data, #define TEST_NEED_SUCK void *suck(int *); -int main(int argc, char **argv, char **envp) +int main(int argc, argv_item_t argv[], char **envp) { char *base64; size_t base64Len; @@ -293,7 +293,7 @@ int main(int argc, char **argv, char **envp) #define TEST_NEED_SUCK void *suck(int *); -int main(int argc, char **argv, char **envp) +int main(int argc, argv_item_t argv[], char **envp) { char *base64; int base64Len; 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 */ diff --git a/lib/netrc.c b/lib/netrc.c index da366fb6b..dc2e04294 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -227,7 +227,7 @@ int Curl_parsenetrc(char *host, } #ifdef _NETRC_DEBUG -int main(int argc, char **argv) +int main(int argc, argv_item_t argv[]) { char login[64]=""; char password[64]=""; diff --git a/lib/setup_once.h b/lib/setup_once.h index 4bbde0ec8..585faed8d 100644 --- a/lib/setup_once.h +++ b/lib/setup_once.h @@ -344,5 +344,26 @@ typedef int sig_atomic_t; #endif +/* + * Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid() + */ + +#if defined(VMS) && \ + defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64) +#define getpwuid __32_getpwuid +#endif + + +/* + * Macro argv_item_t hides platform details to code using it. + */ + +#ifdef VMS +#define argv_item_t __char_ptr32 +#else +#define argv_item_t char * +#endif + + #endif /* __SETUP_ONCE_H */ diff --git a/lib/splay.c b/lib/splay.c index 9fb66c76a..acfa373e2 100644 --- a/lib/splay.c +++ b/lib/splay.c @@ -21,6 +21,8 @@ * $Id$ ***************************************************************************/ +#include "setup.h" + #include <stdio.h> #include <stdlib.h> @@ -364,7 +366,7 @@ void Curl_splayprint(struct Curl_tree * t, int d, char output) /* A sample use of these functions. Start with the empty tree, insert some stuff into it, and then delete it */ -int main(int argc, char **argv) +int main(int argc, argv_item_t argv[]) { struct Curl_tree *root, *t; void *ptrs[MAX]; |