Steve Little's fixes to allow compilation on VMS 64-bit mode
This commit is contained in:
parent
61d7e720a5
commit
94b253fde7
3
CHANGES
3
CHANGES
@ -6,6 +6,9 @@
|
||||
|
||||
Changelog
|
||||
|
||||
Yang Tse (25 April 2007)
|
||||
- Steve Little fixed compilation on VMS 64-bit mode
|
||||
|
||||
Daniel S (24 April 2007)
|
||||
- Robert Iakobashvili made the 'master_buffer' get allocated first once it is
|
||||
can/will be used as it then makes the common cases save 16KB of data for each
|
||||
|
@ -28,6 +28,7 @@ This release includes the following bugfixes:
|
||||
o GnuTLS free of NULL credentials
|
||||
o NSS-fix for closing down SSL
|
||||
o bad warning from configure when gnutls was selected
|
||||
o compilation on VMS 64-bit mode
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@ -49,6 +50,6 @@ This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Song Ma, Dan Fandrich, Yang Tse, Jay Austin, Robert Iakobashvil,
|
||||
James Housley, Daniel Black
|
||||
James Housley, Daniel Black, Steve Little
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
@ -337,5 +337,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 */
|
||||
|
||||
|
@ -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;
|
||||
|
16
lib/hostip.c
16
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 */
|
||||
|
||||
|
||||
|
@ -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]="";
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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];
|
||||
|
@ -21,7 +21,9 @@ $!
|
||||
$! Parameter(s):
|
||||
$!
|
||||
$! P1 - LISTING will create .lis files during the C compile
|
||||
$! DEBUG will compile and link with debug
|
||||
$! DEBUG will compile and link with debug; also will create
|
||||
$! compiler listings and linker map files
|
||||
$! 64 will compile and link with 64-bit pointers
|
||||
$!
|
||||
$! Revisions:
|
||||
$!
|
||||
@ -44,6 +46,7 @@ $! USE_SSLEAY to define if the target has SSL support built
|
||||
$! in. Changed the cc/define parameter accordingly.
|
||||
$! 11-FEB-2005, MSK, If [--.LIB]AMIGAOS.C and NWLIB.C are there, rename them
|
||||
$! 23-MAR-2005, MSK, relocated cc_qual define so that DEBUG option would work
|
||||
$! 25-APR-2007, STL, allow compilation in 64-bit mode.
|
||||
$!
|
||||
$ on control_y then goto Common_Exit
|
||||
$ ctrl_y = 1556
|
||||
@ -75,25 +78,27 @@ $ set def 'thisdir'
|
||||
$!
|
||||
$ hpssl = 0
|
||||
$ openssl = 0
|
||||
$ cc_qual = "/define=HAVE_CONFIG_H=1/OBJ=OBJDIR:"
|
||||
$ cc_qual = "/define=HAVE_CONFIG_H=1"
|
||||
$ link_qual = ""
|
||||
$ if f$trnlnm( "CURL_BUILD_NOSSL") .eqs. ""
|
||||
$ then
|
||||
$ if f$trnlnm( "OPENSSL") .nes. ""
|
||||
$ then
|
||||
$ openssl = 1
|
||||
$ cc_qual = "/define=(HAVE_CONFIG_H=1,USE_SSLEAY=1)/OBJ=OBJDIR:"
|
||||
$ cc_qual = "/define=(HAVE_CONFIG_H=1,USE_SSLEAY=1)"
|
||||
$ if ( f$trnlnm( "SSL$INCLUDE") .nes. "") .and. -
|
||||
( f$trnlnm( "CURL_BUILD_NOHPSSL") .eqs. "")
|
||||
$ then hpssl = 1
|
||||
$ endif
|
||||
$ endif
|
||||
$ endif
|
||||
$ if p1 .eqs. "LISTING" then cc_qual = cc_qual + "/LIST/MACHINE"
|
||||
$ cc_qual = cc_qual + "/OBJ=OBJDIR:"
|
||||
$ if p1 .eqs. "64" then cc_qual = cc_qual + "/POINTER=64"
|
||||
$ if p1 .eqs. "LISTING" then cc_qual = cc_qual + "/LIST/SHOW=ALL"
|
||||
$ if p1 .eqs. "DEBUG"
|
||||
$ then
|
||||
$ cc_qual = cc_qual + "/LIST/MACHINE/DEBUG/NOOPT"
|
||||
$ link_qual = "/DEBUG"
|
||||
$ cc_qual = cc_qual + "/LIST/SHOW=ALL/DEBUG/NOOPT"
|
||||
$ link_qual = "/DEBUG/MAP"
|
||||
$ endif
|
||||
$ msg_qual = "/OBJ=OBJDIR:"
|
||||
$!
|
||||
|
@ -3482,7 +3482,7 @@ static void dumpeasycode(struct Configurable *config)
|
||||
}
|
||||
|
||||
static int
|
||||
operate(struct Configurable *config, int argc, char *argv[])
|
||||
operate(struct Configurable *config, int argc, argv_item_t argv[])
|
||||
{
|
||||
char errorbuffer[CURL_ERROR_SIZE];
|
||||
char useragent[128]; /* buah, we don't want a larger default user agent */
|
||||
|
Loading…
Reference in New Issue
Block a user