[0001] [0002] [0003] [0004] [0005] [0006] [0007] [0008] [0009] [0010] [0011] [0012] [0013] [0014] [0015] [0016] [0017] [0018] [0019] [0020] [0021] [0022] [0023] [0024] [0025] [0026] [0027] [0028] [0029] [0030] [0031] [0032] [0033] [0034] [0035] [0036] [0037] [0038] [0039] [0040] [0041] [0042] [0043] [0044] [0045] [0046] [0047] [0048] [0049] [0050] [0051] [0052] [0053] [0054] [0055] [0056] [0057] [0058] [0059] [0060] [0061] [0062] [0063] [0064] [0065] [0066] [0067] [0068] [0069] [0070] [0071] [0072] [0073] [0074] [0075] [0076] [0077] [0078] [0079] [0080] [0081] [0082] [0083] [0084] [0085] [0086] [0087] [0088] [0089] [0090] [0091] [0092] [0093] [0094] [0095] [0096] [0097] [0098] [0099] [0100] [0101] [0102] [0103] [0104] [0105] [0106] [0107] [0108] [0109] [0110] [0111] [0112] [0113] [0114]
/*****************************************************************************/ /* version.c Merely generate software ID and build information strings. 10-OCT-1999 MGD moved from HTTPD.C for v6.1 */ /*****************************************************************************/ #ifdef WASD_VMS_V7 #undef _VMS__V6__SOURCE #define _VMS__V6__SOURCE #undef __VMS_VER #define __VMS_VER 70000000 #undef __CRTL_VER #define __CRTL_VER 70000000 #endif #include <stdio.h> #include <ctype.h> #include "wasd.h" #ifdef __ia64 # define HTTPD_ARCH "IA64" #endif #ifdef __ALPHA # define HTTPD_ARCH "AXP" #endif #ifdef __x86_64 # define HTTPD_ARCH "X86" #endif #ifndef BUILD_DATETIME # define BUILD_DATETIME __DATE__ " " __TIME__ #endif /******************/ /* global storage */ /******************/ int ActivityGblSecVersion = ACTIVITY_GBLSEC_VERSION_NUMBER, AuthGblSecVersion = AUTH_GBLSEC_VERSION_NUMBER, AuthTokenGblSecVersion = AUTH_TOKEN_GBLSEC_VERSION_NUMBER, HttpdGblSecVersion = HTTPD_GBLSEC_VERSION_NUMBER, SesolaGblSecVersion = SESOLA_GBLSEC_VERSION_NUMBER, ProxyVerifyGblSecVersion = PROXYVERIFY_GBLSEC_VERSION_NUMBER; ulong HttpdVersionNumber; char BuildDateTime [] = BUILD_DATETIME, BuildInfo [64], HttpdName [] = HTTPD_NAME, HttpdSoftwareIdName [] = HTTPD_SOFTWAREID_NAME, HttpdVersion [] = HTTPD_VERSION, SoftwareID [128]; /********************/ /* external storage */ /********************/ extern char HttpdSesola[]; /*****************************************************************************/ /* */ VersionInfo () { char *cptr, *sptr; /*********/ /* begin */ /*********/ /* server version as "11.10.9" into 111,009 */ sptr = HttpdVersion; HttpdVersionNumber = atoi(sptr) * 10000; while (isdigit(*sptr)) sptr++; if (*sptr == '.') sptr++; HttpdVersionNumber += atoi(sptr) * 100; while (isdigit(*sptr)) sptr++; if (*sptr == '.') sptr++; HttpdVersionNumber += atoi(sptr); /* software ID can be specified on the command line! */ if (!SoftwareID[0]) sprintf (SoftwareID, "%s/%s OpenVMS/%s%s", HttpdSoftwareIdName, HttpdVersion, HTTPD_ARCH, HttpdSesola); sprintf (BuildInfo, "%s VMS %s DECC %d%s", BUILD_DATETIME, __VMS_VERSION+1, __DECC_VER, OPERATE_WITH_SYSPRV ? " [/SYSPRV]" : ""); /* compress white-space */ cptr = sptr = BuildInfo; while (*cptr) { if (*cptr == ' ') { *sptr++ = *cptr++; while (*cptr == ' ') cptr++; } else *sptr++ = *cptr++; } *sptr = '\0'; } /*****************************************************************************/