]> granicus.if.org Git - curl/commitdiff
Nico Baggus' VMS tweaks
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Feb 2002 13:46:53 +0000 (13:46 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 20 Feb 2002 13:46:53 +0000 (13:46 +0000)
13 files changed:
lib/config-vms.h
lib/connect.c
lib/cookie.h
lib/dllinit.c
lib/ftp.c
lib/getdate.c
lib/getdate.h
lib/getdate.y
lib/getinfo.c
lib/hostip.c
lib/memdebug.c
src/setup.h
src/version.h

index cb8fb60c6c6751a466b818f7d9a274a9b335904c..bbc8c5969a07876e80b37f153e6d34d09edf6a08 100755 (executable)
 #define HAVE_NETINET_IN_H 1
 
 /* Define if you have the <openssl/crypto.h> header file.  */
-#undef HAVE_OPENSSL_CRYPTO_H
+#define HAVE_OPENSSL_CRYPTO_H 1
 
 /* Define if you have the <openssl/err.h> header file.  */
-#undef HAVE_OPENSSL_ERR_H
+#define HAVE_OPENSSL_ERR_H     1
 
 /* Define if you have the <openssl/pem.h> header file.  */
-#undef HAVE_OPENSSL_PEM_H
+#define HAVE_OPENSSL_PEM_H     1
 
 /* Define if you have the <openssl/rsa.h> header file.  */
-#undef HAVE_OPENSSL_RSA_H
+#define HAVE_OPENSSL_RSA_H 1
 
 /* Define if you have the <openssl/ssl.h> header file.  */
-#undef HAVE_OPENSSL_SSL_H
+#define HAVE_OPENSSL_SSL_H     1
 
 /* Define if you have the <openssl/x509.h> header file.  */
-#undef HAVE_OPENSSL_X509_H
+#define HAVE_OPENSSL_X509_H    1
 
 /* Define if you have the <pem.h> header file.  */
 #undef HAVE_PEM_H
 #undef HAVE_X509_H
 
 /* Define if you have the crypto library (-lcrypto).  */
-#undef HAVE_LIBCRYPTO
+#define HAVE_LIBCRYPTO 1
 
 /* Define if you have the dl library (-ldl).  */
 #undef HAVE_LIBDL
 #define HAVE_LIBSOCKET 1
 
 /* Define if you have the ssl library (-lssl).  */
-#undef HAVE_LIBSSL
+#define HAVE_LIBSSL    1
 
 /* Define if you have the ucb library (-lucb).  */
 #undef HAVE_LIBUCB
 #undef HAVE_GETPASS
 
 /* Define if you have a working OpenSSL installation */
-#undef OPENSSL_ENABLED
+#define OPENSSL_ENABLED        1
 
 /* Define if you have the `dlopen' function. */
 #undef HAVE_DLOPEN
 
 #define HAVE_MEMORY_H   1
 
+#define HAVE_FIONBIO   1
index b1a2560b26ce8286111673b00d9de361dbac1142..7efa9f006061f26549233a400eb162f8a170dd6f 100644 (file)
 #include <stdlib.h> /* required for free() prototype, without it, this crashes
                        on macos 68K */
 #endif
+#ifdef VMS
+#include <in.h>
+#include <inet.h>
+#endif
 
 #endif
 #include <stdio.h>
index a00530bdad44cd0e97b715d845113b9c7cd43ebb..a7dd1df498c35eae2b458c4db5f313c97f648a42 100644 (file)
@@ -38,7 +38,7 @@ struct Cookie {
   char *value;       /* name = <this> */
   char *path;        /* path = <this> */
   char *domain;      /* domain = <this> */
-  time_t expires;    /* expires = <this> */
+  long expires;    /* expires = <this> */
   char *expirestr;   /* the plain text version */
 
   char field1;       /* read from a cookie file, 1 => FALSE, 2=> TRUE */
index d71a1f91180842985ea2d7895f724f305df399b0..5d2da2c9a9bcef5a4ec0df3e1a6b77792b6b052c 100644 (file)
@@ -81,6 +81,10 @@ DllMain (
     }
   return TRUE;
 }
+#else
+#ifdef VMS
+int VOID_VAR_DLLINIT;  
+#endif
 #endif
 
 /*
index 6b142dd8a0f735ef933181dc597b65f85777ef70..5ec23aafe2cc742b9fe28df9b25545b82ecda1b3 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -55,6 +55,7 @@
 #include <netdb.h>
 #endif
 #ifdef VMS
+#include <in.h>
 #include <inet.h>
 #endif
 #endif
@@ -1575,7 +1576,7 @@ CURLcode ftp_perform(struct connectdata *conn)
       struct tm buffer;
       tm = (struct tm *)localtime_r(&data->info.filetime, &buffer);
 #else
-      tm = localtime(&data->info.filetime);
+      tm = localtime((unsigned long *)&data->info.filetime);
 #endif
       /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
       strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S %Z\r\n",
index f6941e708540d5881962d24066a0893ee54b4b90..ca28d084dbba24be5294b566ee1ec8fb52afe5e0 100644 (file)
@@ -34,8 +34,6 @@
 
 #include "setup.h"
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
 # ifdef HAVE_ALLOCA_H
 #  include <alloca.h>
 # endif
@@ -43,7 +41,6 @@
 # ifdef HAVE_TIME_H
 #  include <time.h>
 # endif
-#endif
 
 #ifndef YYDEBUG
   /* to satisfy gcc -Wundef, we set this to 0 */
@@ -230,7 +227,7 @@ typedef struct _CONTEXT {
 #define YYLEX_PARAM cookie
 #define context ((CONTEXT *) cookie)
 
-#line 218 "getdate.y"
+#line 215 "getdate.y"
 typedef union {
     int                        Number;
     enum _MERIDIAN     Meridian;
@@ -313,11 +310,11 @@ static const short yyrhs[] = {    -1,
 
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
-   234,   235,   238,   241,   244,   247,   250,   253,   256,   262,
-   268,   277,   283,   295,   298,   301,   307,   311,   315,   321,
-   325,   343,   349,   355,   359,   364,   368,   375,   383,   386,
-   389,   392,   395,   398,   401,   404,   407,   410,   413,   416,
-   419,   422,   425,   428,   431,   434,   437,   442,   476,   480
+   231,   232,   235,   238,   241,   244,   247,   250,   253,   259,
+   265,   274,   280,   292,   295,   298,   304,   308,   312,   318,
+   322,   340,   346,   352,   356,   361,   365,   372,   380,   383,
+   386,   389,   392,   395,   398,   401,   404,   407,   410,   413,
+   416,   419,   422,   425,   428,   431,   434,   439,   473,   477
 };
 #endif
 
@@ -943,37 +940,37 @@ yyreduce:
   switch (yyn) {
 
 case 3:
-#line 238 "getdate.y"
+#line 235 "getdate.y"
 {
            context->yyHaveTime++;
        ;
     break;}
 case 4:
-#line 241 "getdate.y"
+#line 238 "getdate.y"
 {
            context->yyHaveZone++;
        ;
     break;}
 case 5:
-#line 244 "getdate.y"
+#line 241 "getdate.y"
 {
            context->yyHaveDate++;
        ;
     break;}
 case 6:
-#line 247 "getdate.y"
+#line 244 "getdate.y"
 {
            context->yyHaveDay++;
        ;
     break;}
 case 7:
-#line 250 "getdate.y"
+#line 247 "getdate.y"
 {
            context->yyHaveRel++;
        ;
     break;}
 case 9:
-#line 256 "getdate.y"
+#line 253 "getdate.y"
 {
            context->yyHour = yyvsp[-1].Number;
            context->yyMinutes = 0;
@@ -982,7 +979,7 @@ case 9:
        ;
     break;}
 case 10:
-#line 262 "getdate.y"
+#line 259 "getdate.y"
 {
            context->yyHour = yyvsp[-3].Number;
            context->yyMinutes = yyvsp[-1].Number;
@@ -991,7 +988,7 @@ case 10:
        ;
     break;}
 case 11:
-#line 268 "getdate.y"
+#line 265 "getdate.y"
 {
            context->yyHour = yyvsp[-3].Number;
            context->yyMinutes = yyvsp[-1].Number;
@@ -1003,7 +1000,7 @@ case 11:
        ;
     break;}
 case 12:
-#line 277 "getdate.y"
+#line 274 "getdate.y"
 {
            context->yyHour = yyvsp[-5].Number;
            context->yyMinutes = yyvsp[-3].Number;
@@ -1012,7 +1009,7 @@ case 12:
        ;
     break;}
 case 13:
-#line 283 "getdate.y"
+#line 280 "getdate.y"
 {
            context->yyHour = yyvsp[-5].Number;
            context->yyMinutes = yyvsp[-3].Number;
@@ -1025,53 +1022,53 @@ case 13:
        ;
     break;}
 case 14:
-#line 295 "getdate.y"
+#line 292 "getdate.y"
 {
            context->yyTimezone = yyvsp[0].Number;
        ;
     break;}
 case 15:
-#line 298 "getdate.y"
+#line 295 "getdate.y"
 {
            context->yyTimezone = yyvsp[0].Number - 60;
        ;
     break;}
 case 16:
-#line 302 "getdate.y"
+#line 299 "getdate.y"
 {
            context->yyTimezone = yyvsp[-1].Number - 60;
        ;
     break;}
 case 17:
-#line 307 "getdate.y"
+#line 304 "getdate.y"
 {
            context->yyDayOrdinal = 1;
            context->yyDayNumber = yyvsp[0].Number;
        ;
     break;}
 case 18:
-#line 311 "getdate.y"
+#line 308 "getdate.y"
 {
            context->yyDayOrdinal = 1;
            context->yyDayNumber = yyvsp[-1].Number;
        ;
     break;}
 case 19:
-#line 315 "getdate.y"
+#line 312 "getdate.y"
 {
            context->yyDayOrdinal = yyvsp[-1].Number;
            context->yyDayNumber = yyvsp[0].Number;
        ;
     break;}
 case 20:
-#line 321 "getdate.y"
+#line 318 "getdate.y"
 {
            context->yyMonth = yyvsp[-2].Number;
            context->yyDay = yyvsp[0].Number;
        ;
     break;}
 case 21:
-#line 325 "getdate.y"
+#line 322 "getdate.y"
 {
          /* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY.
             The goal in recognizing YYYY/MM/DD is solely to support legacy
@@ -1092,7 +1089,7 @@ case 21:
        ;
     break;}
 case 22:
-#line 343 "getdate.y"
+#line 340 "getdate.y"
 {
            /* ISO 8601 format.  yyyy-mm-dd.  */
            context->yyYear = yyvsp[-2].Number;
@@ -1101,7 +1098,7 @@ case 22:
        ;
     break;}
 case 23:
-#line 349 "getdate.y"
+#line 346 "getdate.y"
 {
            /* e.g. 17-JUN-1992.  */
            context->yyDay = yyvsp[-2].Number;
@@ -1110,14 +1107,14 @@ case 23:
        ;
     break;}
 case 24:
-#line 355 "getdate.y"
+#line 352 "getdate.y"
 {
            context->yyMonth = yyvsp[-1].Number;
            context->yyDay = yyvsp[0].Number;
        ;
     break;}
 case 25:
-#line 359 "getdate.y"
+#line 356 "getdate.y"
 {
            context->yyMonth = yyvsp[-3].Number;
            context->yyDay = yyvsp[-2].Number;
@@ -1125,14 +1122,14 @@ case 25:
        ;
     break;}
 case 26:
-#line 364 "getdate.y"
+#line 361 "getdate.y"
 {
            context->yyMonth = yyvsp[0].Number;
            context->yyDay = yyvsp[-1].Number;
        ;
     break;}
 case 27:
-#line 368 "getdate.y"
+#line 365 "getdate.y"
 {
            context->yyMonth = yyvsp[-1].Number;
            context->yyDay = yyvsp[-2].Number;
@@ -1140,7 +1137,7 @@ case 27:
        ;
     break;}
 case 28:
-#line 375 "getdate.y"
+#line 372 "getdate.y"
 {
            context->yyRelSeconds = -context->yyRelSeconds;
            context->yyRelMinutes = -context->yyRelMinutes;
@@ -1151,115 +1148,115 @@ case 28:
        ;
     break;}
 case 30:
-#line 386 "getdate.y"
+#line 383 "getdate.y"
 {
            context->yyRelYear += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 31:
-#line 389 "getdate.y"
+#line 386 "getdate.y"
 {
            context->yyRelYear += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 32:
-#line 392 "getdate.y"
+#line 389 "getdate.y"
 {
            context->yyRelYear += yyvsp[0].Number;
        ;
     break;}
 case 33:
-#line 395 "getdate.y"
+#line 392 "getdate.y"
 {
            context->yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 34:
-#line 398 "getdate.y"
+#line 395 "getdate.y"
 {
            context->yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 35:
-#line 401 "getdate.y"
+#line 398 "getdate.y"
 {
            context->yyRelMonth += yyvsp[0].Number;
        ;
     break;}
 case 36:
-#line 404 "getdate.y"
+#line 401 "getdate.y"
 {
            context->yyRelDay += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 37:
-#line 407 "getdate.y"
+#line 404 "getdate.y"
 {
            context->yyRelDay += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 38:
-#line 410 "getdate.y"
+#line 407 "getdate.y"
 {
            context->yyRelDay += yyvsp[0].Number;
        ;
     break;}
 case 39:
-#line 413 "getdate.y"
+#line 410 "getdate.y"
 {
            context->yyRelHour += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 40:
-#line 416 "getdate.y"
+#line 413 "getdate.y"
 {
            context->yyRelHour += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 41:
-#line 419 "getdate.y"
+#line 416 "getdate.y"
 {
            context->yyRelHour += yyvsp[0].Number;
        ;
     break;}
 case 42:
-#line 422 "getdate.y"
+#line 419 "getdate.y"
 {
            context->yyRelMinutes += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 43:
-#line 425 "getdate.y"
+#line 422 "getdate.y"
 {
            context->yyRelMinutes += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 44:
-#line 428 "getdate.y"
+#line 425 "getdate.y"
 {
            context->yyRelMinutes += yyvsp[0].Number;
        ;
     break;}
 case 45:
-#line 431 "getdate.y"
+#line 428 "getdate.y"
 {
            context->yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 46:
-#line 434 "getdate.y"
+#line 431 "getdate.y"
 {
            context->yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number;
        ;
     break;}
 case 47:
-#line 437 "getdate.y"
+#line 434 "getdate.y"
 {
            context->yyRelSeconds += yyvsp[0].Number;
        ;
     break;}
 case 48:
-#line 443 "getdate.y"
+#line 440 "getdate.y"
 {
            if (context->yyHaveTime && context->yyHaveDate &&
                !context->yyHaveRel)
@@ -1293,13 +1290,13 @@ case 48:
          ;
     break;}
 case 49:
-#line 477 "getdate.y"
+#line 474 "getdate.y"
 {
            yyval.Meridian = MER24;
          ;
     break;}
 case 50:
-#line 481 "getdate.y"
+#line 478 "getdate.y"
 {
            yyval.Meridian = yyvsp[0].Meridian;
          ;
@@ -1526,7 +1523,7 @@ yyerrhandle:
     }
   return 1;
 }
-#line 486 "getdate.y"
+#line 483 "getdate.y"
 
 
 /* Include this file down here because bison inserts code above which
index ebb6d2c5a2ca5f5fa106c163c2ee73c8b92c1413..85650e3a07777ca561907f3784fec99dce7d97fc 100644 (file)
@@ -7,9 +7,7 @@
 **  This code is in the public domain and has no copyright.
 */
 
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
+# include "setup.h"
 
 #ifndef PARAMS
 # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
index e63eb6e0b18ed716486a4f2b55d3c97a7dfa853e..b2b090a10541b583db35d69fa332b846afc911f4 100644 (file)
@@ -10,8 +10,6 @@
 
 #include "setup.h"
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
 # ifdef HAVE_ALLOCA_H
 #  include <alloca.h>
 # endif
@@ -19,7 +17,6 @@
 # ifdef HAVE_TIME_H
 #  include <time.h>
 # endif
-#endif
 
 #ifndef YYDEBUG
   /* to satisfy gcc -Wundef, we set this to 0 */
index 1df9b17435c1c2e7a3ceaae2ae17731606a8ef60..8548975b8237dea7bcdafcc1043eb36998f62abf 100644 (file)
 #include <string.h>
 #include <stdarg.h>
 
+#ifdef VMS
+#include       <stdlib.h>
+#endif
+
 /*
  * This is supposed to be called in the beginning of a permform() session
  * and should reset all session-info variables
@@ -44,6 +48,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
   pro->t_connect = 0;
   pro->t_pretransfer = 0;
   pro->t_starttransfer = 0;
+  pro->timespent = 0;
 
   info->httpcode = 0;
   info->httpversion=0;
index 711d1550eb66d9d040119301650ccc407967a4c8..2e973f8877d799e3edabc9ef0072f347e9305a71 100644 (file)
@@ -50,6 +50,7 @@
 #include <stdlib.h>    /* required for free() prototypes */
 #endif
 #ifdef VMS
+#include <in.h>
 #include <inet.h>
 #include <stdlib.h>
 #endif
@@ -510,7 +511,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data,
       /* we make a copy of the hostent right now, right here, as the
          static one we got a pointer to might get removed when we don't
          want/expect that */
-      h = pack_hostent(buf, h);
+      h = pack_hostent((char *)buf, h);
 #endif
   }
   return (h);
index 0d0c43eb6075a160e7c2b177acaff22c2eb04339..66fe60136330cffb50cc3b482a607178d947470e 100644 (file)
@@ -168,7 +168,10 @@ int curl_fclose(FILE *file, int line, const char *source)
             source, line, file);
   return res;
 }
-
+#else
+#ifdef VMS
+int VOID_VAR_MEMDEBUG; 
+#endif
 #endif /* MALLOCDEBUG */
 
 /*
index 50537d071c0bc550aa328fd308aed36b3031d5b7..a6c45bf177e0d6a7d81547f7c8c43c54a873e001 100644 (file)
 #endif
 
 #ifdef HAVE_CONFIG_H
+#ifdef VMS
+#include "../config-vms.h"
+#else
 #include "config.h" /* the configure script results */
+#endif
 #else
 #ifdef WIN32
 /* include the hand-modified win32 adjusted config.h! */
index ef640f0a3e7ce08cf52523f71aad3e3406c1564e..5ef4fafce9f716ceec22209766f5d5160b657b73 100644 (file)
@@ -1,3 +1,3 @@
 #define CURL_NAME "curl"
-#define CURL_VERSION "7.9.4"
+#define CURL_VERSION "7.9.5-pre1"
 #define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "