From 9dc0d8d6b4a84753c7fcb009fe9fdd0bcc8040a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 14 Oct 2006 09:17:43 +0000 Subject: [PATCH] rename the buildin timegm to _der_timegm git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18447 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/asn1/der_get.c | 5 +++++ lib/asn1/timegm.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/asn1/der_get.c b/lib/asn1/der_get.c index f4d377789..022d705c1 100644 --- a/lib/asn1/der_get.c +++ b/lib/asn1/der_get.c @@ -289,6 +289,10 @@ der_get_heim_integer (const unsigned char *p, size_t len, return 0; } +#ifndef HAVE_TIMEGM +#define timegm(x) _der_timegm(x) +#endif + static int generalizedtime2time (const char *s, time_t *t) { @@ -312,6 +316,7 @@ generalizedtime2time (const char *s, time_t *t) *t = timegm (&tm); return 0; } +#undef timegm static int der_get_time (const unsigned char *p, size_t len, diff --git a/lib/asn1/timegm.c b/lib/asn1/timegm.c index b4c39927d..c6b19e283 100644 --- a/lib/asn1/timegm.c +++ b/lib/asn1/timegm.c @@ -45,7 +45,7 @@ is_leap(unsigned y) } time_t -timegm (struct tm *tm) +_der_timegm (struct tm *tm) { static const unsigned ndays[2][12] ={ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},