1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Steve Little's fixes to allow compilation on VMS 64-bit mode

This commit is contained in:
Yang Tse 2007-04-25 03:00:10 +00:00
parent 61d7e720a5
commit 94b253fde7
10 changed files with 81 additions and 14 deletions

View File

@ -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

View File

@ -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)

View File

@ -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 */

View File

@ -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;

View File

@ -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 */

View File

@ -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]="";

View File

@ -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 */

View File

@ -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];

View File

@ -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:"
$!

View File

@ -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 */