From 56460288bff9021a66d5761ef3afe96881bfc73a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 2 Jun 2006 23:58:56 +0000 Subject: r16017: Add Samba4 replacement for timegm to work on Solaris. Jeremy. (This used to be commit b65c6468651282879a39fa8029c190f2d1a91a28) --- source3/lib/replace.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'source3/lib/replace.c') diff --git a/source3/lib/replace.c b/source3/lib/replace.c index 120fd3a468..9ef3503d39 100644 --- a/source3/lib/replace.c +++ b/source3/lib/replace.c @@ -434,27 +434,3 @@ char *rep_inet_ntoa(struct in_addr ip) } #endif /* HAVE_SYSLOG */ #endif /* HAVE_VSYSLOG */ - - -#ifndef HAVE_TIMEGM -/* - yes, I know this looks insane, but its really needed. The function in the - Linux timegm() manpage does not work on solaris. -*/ - time_t timegm(struct tm *tm) -{ - struct tm tm2, tm3; - time_t t; - - tm2 = *tm; - - t = mktime(&tm2); - tm3 = *localtime(&t); - tm2 = *tm; - tm2.tm_isdst = tm3.tm_isdst; - t = mktime(&tm2); - t -= get_time_zone(t); - - return t; -} -#endif -- cgit