VMS specific preprocessor symbol checking adjustments
authorYang Tse <yangsita@gmail.com>
Wed, 30 Dec 2009 17:59:56 +0000 (17:59 +0000)
committerYang Tse <yangsita@gmail.com>
Wed, 30 Dec 2009 17:59:56 +0000 (17:59 +0000)
27 files changed:
ares/setup_once.h
include/curl/curlbuild.h.dist
lib/connect.c
lib/curl_addrinfo.c
lib/curl_addrinfo.h
lib/ftp.c
lib/getenv.c
lib/hostares.c
lib/hostasyn.c
lib/hostip.c
lib/hostip4.c
lib/hostip6.c
lib/hostsyn.c
lib/hostthre.c
lib/if2ip.c
lib/imap.c
lib/netrc.c
lib/nonblock.c
lib/pop3.c
lib/setup.h
lib/setup_once.h
lib/smtp.c
lib/ssh.c
lib/url.c
src/getpass.c
src/homedir.c
src/main.c

index f7d45a2..95722b2 100644 (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 *
index 9c3469e..0ee7135 100644 (file)
 #  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"
 #    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
index affb7fe..ec3e43b 100644 (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
index 9633351..a5d2616 100644 (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
index 2fbb47a..a723503 100644 (file)
@@ -38,7 +38,7 @@
 #  include <arpa/inet.h>
 #endif
 
-#ifdef  VMS
+#ifdef __VMS
 #  include <in.h>
 #  include <inet.h>
 #  include <stdlib.h>
index 60abc9c..c5be236 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -49,7 +49,7 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#ifdef  VMS
+#ifdef __VMS
 #include <in.h>
 #include <inet.h>
 #endif
index 73fece2..56c2cb7 100644 (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
index 1412f13..8c1cb14 100644 (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>
index 8659e2f..715b0da 100644 (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>
index 26ed7b6..fc17de6 100644 (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>
index c10df46..b4f6bd9 100644 (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>
index 972f847..a5bc55c 100644 (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>
index 027d5fa..65d7225 100644 (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>
index 2ff9c4a..e41653b 100644 (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>
index f015945..b8ed4c8 100644 (file)
@@ -53,7 +53,7 @@
 #ifdef HAVE_STROPTS_H
 #  include <stropts.h>
 #endif
-#ifdef VMS
+#ifdef __VMS
 #  include <inet.h>
 #endif
 
index 50201e1..fab6c4d 100644 (file)
@@ -52,7 +52,7 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#ifdef  VMS
+#ifdef __VMS
 #include <in.h>
 #include <inet.h>
 #endif
index a543c34..a5dc8f4 100644 (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;
index d5a32a9..c8f36e4 100644 (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
index 43549f7..2435450 100644 (file)
@@ -53,7 +53,7 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#ifdef  VMS
+#ifdef __VMS
 #include <in.h>
 #include <inet.h>
 #endif
index 49d14ed..8620f83 100644 (file)
  */
 
 #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
index 9ad69e5..5c49165 100644 (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 *
index 44e405e..1bd869e 100644 (file)
@@ -51,7 +51,7 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#ifdef  VMS
+#ifdef __VMS
 #include <in.h>
 #include <inet.h>
 #endif
index 5022a2b..a93e440 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -66,7 +66,7 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#ifdef  VMS
+#ifdef __VMS
 #include <in.h>
 #include <inet.h>
 #endif
index ec2c2bf..05055ac 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -65,7 +65,7 @@
 #include <sys/param.h>
 #endif
 
-#ifdef VMS
+#ifdef __VMS
 #include <in.h>
 #include <inet.h>
 #endif
index 8d20eb4..a46d8e3 100644 (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
index e8392f1..e2fbc7a 100644 (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;
index f7c2eb4..a4b858b 100644 (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