VMS specific preprocessor symbol checking adjustments

This commit is contained in:
Yang Tse 2009-12-30 17:59:56 +00:00
parent 0dde9056d7
commit 3184a91ec8
27 changed files with 47 additions and 47 deletions

View File

@ -415,7 +415,7 @@ typedef int sig_atomic_t;
* Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
*/
#if defined(VMS) && \
#if defined(__VMS) && \
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
#define getpwuid __32_getpwuid
#endif
@ -425,7 +425,7 @@ typedef int sig_atomic_t;
* Macro argv_item_t hides platform details to code using it.
*/
#ifdef VMS
#ifdef __VMS
#define argv_item_t __char_ptr32
#else
#define argv_item_t char *

View File

@ -370,16 +370,7 @@
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__VMS)
# if defined(__alpha) || defined(__ia64)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# else
# if defined(__VAX)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
@ -388,6 +379,15 @@
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# else
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4

View File

@ -64,7 +64,7 @@
#undef in_addr_t
#define in_addr_t unsigned long
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -38,7 +38,7 @@
# include <arpa/inet.h>
#endif
#ifdef VMS
#ifdef __VMS
# include <in.h>
# include <inet.h>
# include <stdlib.h>
@ -365,7 +365,7 @@ Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port)
{
Curl_addrinfo *ai;
#if defined(VMS) && \
#if defined(__VMS) && \
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
#pragma pointer_size save
#pragma pointer_size short
@ -418,7 +418,7 @@ Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port)
h->h_addr_list[0] = addrentry;
h->h_addr_list[1] = NULL; /* terminate list of entries */
#if defined(VMS) && \
#if defined(__VMS) && \
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
#pragma pointer_size restore
#pragma message enable PTRMISMATCH

View File

@ -38,7 +38,7 @@
# include <arpa/inet.h>
#endif
#ifdef VMS
#ifdef __VMS
# include <in.h>
# include <inet.h>
# include <stdlib.h>

View File

@ -49,7 +49,7 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -27,7 +27,7 @@
#include <stdlib.h>
#include <string.h>
#ifdef VMS
#ifdef __VMS
#include <unixlib.h>
#endif
@ -51,7 +51,7 @@ char *GetEnv(const char *variable)
return (env[0] != '\0')?strdup(env):NULL;
#else
char *env = getenv(variable);
#ifdef VMS
#ifdef __VMS
if(env && strcmp("HOME",variable) == 0)
env = decc_translate_vms(env);
#endif

View File

@ -46,7 +46,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>

View File

@ -43,7 +43,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>

View File

@ -43,7 +43,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>

View File

@ -44,7 +44,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>

View File

@ -43,7 +43,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>

View File

@ -43,7 +43,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>

View File

@ -44,7 +44,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for the close() proto */
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#include <stdlib.h>

View File

@ -53,7 +53,7 @@
#ifdef HAVE_STROPTS_H
# include <stropts.h>
#endif
#ifdef VMS
#ifdef __VMS
# include <inet.h>
#endif

View File

@ -52,7 +52,7 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -33,7 +33,7 @@
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <unixlib.h>
#endif
@ -117,7 +117,7 @@ int Curl_parsenetrc(const char *host,
struct passwd *pw;
pw= getpwuid(geteuid());
if(pw) {
#ifdef VMS
#ifdef __VMS
home = decc_translate_vms(pw->pw_dir);
#else
home = pw->pw_dir;

View File

@ -42,7 +42,7 @@
#if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
#include <sys/filio.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -53,7 +53,7 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -326,7 +326,7 @@
*/
#ifndef SIZEOF_OFF_T
# if defined(__VMS) && (defined(__alpha) || defined(__ia64))
# if defined(__VMS) && !defined(__VAX)
# if defined(_LARGEFILE)
# define SIZEOF_OFF_T 8
# endif

View File

@ -422,7 +422,7 @@ typedef int sig_atomic_t;
* Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
*/
#if defined(VMS) && \
#if defined(__VMS) && \
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
#define getpwuid __32_getpwuid
#endif
@ -432,7 +432,7 @@ typedef int sig_atomic_t;
* Macro argv_item_t hides platform details to code using it.
*/
#ifdef VMS
#ifdef __VMS
#define argv_item_t __char_ptr32
#else
#define argv_item_t char *

View File

@ -51,7 +51,7 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -66,7 +66,7 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -65,7 +65,7 @@
#include <sys/param.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <in.h>
#include <inet.h>
#endif

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, 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
@ -54,7 +54,7 @@
#include "memdebug.h"
#endif
#ifdef VMS
#ifdef __VMS
/* VMS implementation */
#include descrip
#include starlet
@ -93,7 +93,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
return buffer; /* we always return success */
}
#define DONE
#endif /* VMS */
#endif /* __VMS */
#ifdef WIN32

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, 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
@ -33,7 +33,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef VMS
#ifdef __VMS
#include <unixlib.h>
#endif
@ -68,7 +68,7 @@ char *GetEnv(const char *variable, char do_expand)
}
#else
(void)do_expand;
#ifdef VMS
#ifdef __VMS
env = getenv(variable);
if (env && strcmp("HOME",variable) == 0) {
env = decc_translate_vms(env);
@ -99,7 +99,7 @@ char *homedir(void)
struct passwd *pw = getpwuid(geteuid());
if (pw) {
#ifdef VMS
#ifdef __VMS
home = decc_translate_vms(pw->pw_dir);
#else
home = pw->pw_dir;

View File

@ -277,7 +277,7 @@ typedef enum {
*/
#ifndef SIZEOF_OFF_T
# if defined(__VMS) && (defined(__alpha) || defined(__ia64))
# if defined(__VMS) && !defined(__VAX)
# if defined(_LARGEFILE)
# define SIZEOF_OFF_T 8
# endif