summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-17 13:29:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-17 13:29:10 +0000
commit1573fce925e4182ed6a69a2b2f2776a381a2ae63 (patch)
tree361bcffb2d0f371717c40054440bffc41d30b2f8
parent51b342d953e3ff3bece30fc4eb1b47941fd77d7b (diff)
OPENSSL_gmtime() is not a gmtime() wrapper. It is a gmtime_r().
Always trying to confuse people... ok guenther
-rw-r--r--lib/libssl/src/crypto/o_time.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/libssl/src/crypto/o_time.c b/lib/libssl/src/crypto/o_time.c
index 44f7ba3b8c5..83028356b91 100644
--- a/lib/libssl/src/crypto/o_time.c
+++ b/lib/libssl/src/crypto/o_time.c
@@ -63,24 +63,10 @@
#include <string.h>
#include "o_time.h"
-struct tm
-*OPENSSL_gmtime(const time_t *timer, struct tm *result) {
- struct tm *ts = NULL;
-
-#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_OS2) && (!defined(OPENSSL_SYS_VMS) || defined(gmtime_r)) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_SUNOS)
- /* should return &data, but doesn't on some systems,
- so we don't even look at the return value */
- gmtime_r(timer, result);
- ts = result;
-#else
- ts = gmtime(timer);
- if (ts == NULL)
- return NULL;
-
- memcpy(result, ts, sizeof(struct tm));
- ts = result;
-#endif
- return ts;
+struct tm *
+OPENSSL_gmtime(const time_t *timer, struct tm *result)
+{
+ return gmtime_r(timer, result);
}
/* Take a tm structure and add an offset to it. This avoids any OS issues