summaryrefslogtreecommitdiffstats
path: root/crypto/o_time.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2011-03-19 09:47:47 +0000
committerRichard Levitte <levitte@openssl.org>2011-03-19 09:47:47 +0000
commit01d2e27a2badb0a01706fe58738df67cc7e90b9c (patch)
tree4210b520add8e3ea3f9580ab7c94f10b3402ed1d /crypto/o_time.c
parentdd7aadf7b2db65de2ec1eca6e598d07864d3ace4 (diff)
Apply all the changes submitted by Steven M. Schweda <sms@antinode.info>
Diffstat (limited to 'crypto/o_time.c')
-rw-r--r--crypto/o_time.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/crypto/o_time.c b/crypto/o_time.c
index eecbdd19f0..9030fdef7a 100644
--- a/crypto/o_time.c
+++ b/crypto/o_time.c
@@ -64,12 +64,18 @@
#include "o_time.h"
#ifdef OPENSSL_SYS_VMS
-# include <libdtdef.h>
-# include <lib$routines.h>
-# include <lnmdef.h>
-# include <starlet.h>
-# include <descrip.h>
-# include <stdlib.h>
+# if __CRTL_VER >= 70000000 && \
+ (defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE)
+# define VMS_GMTIME_OK
+# endif
+# ifndef VMS_GMTIME_OK
+# include <libdtdef.h>
+# include <lib$routines.h>
+# include <lnmdef.h>
+# include <starlet.h>
+# include <descrip.h>
+# include <stdlib.h>
+# endif /* ndef VMS_GMTIME_OK */
#endif
struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
@@ -81,7 +87,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
so we don't even look at the return value */
gmtime_r(timer,result);
ts = result;
-#elif !defined(OPENSSL_SYS_VMS)
+#elif !defined(OPENSSL_SYS_VMS) || defined(VMS_GMTIME_OK)
ts = gmtime(timer);
if (ts == NULL)
return NULL;
@@ -89,7 +95,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
memcpy(result, ts, sizeof(struct tm));
ts = result;
#endif
-#ifdef OPENSSL_SYS_VMS
+#if defined( OPENSSL_SYS_VMS) && !defined( VMS_GMTIME_OK)
if (ts == NULL)
{
static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL");