projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7b31545
)
Removed HAVE_STRUCT_TM_TM_GMTOFF support because it didn't work on Cygwin and isn...
author
David Levine
<levinedl@acm.org>
Tue, 17 Jan 2012 00:35:21 +0000
(18:35 -0600)
committer
David Levine
<levinedl@acm.org>
Tue, 17 Jan 2012 00:35:21 +0000
(18:35 -0600)
configure.ac
patch
|
blob
|
history
sbr/dtime.c
patch
|
blob
|
history
diff --git
a/configure.ac
b/configure.ac
index
9abe1b5
..
3491f96
100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-767,7
+767,6
@@
dnl ----------------
dnl CHECK STRUCTURES
dnl ----------------
dnl CHECK STRUCTURES
dnl ----------------
-AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include <utmp.h>])
AC_STRUCT_DIRENT_D_TYPE
AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include <utmp.h>])
AC_STRUCT_DIRENT_D_TYPE
diff --git
a/sbr/dtime.c
b/sbr/dtime.c
index
7ec7551
..
aa34621
100644
(file)
--- a/
sbr/dtime.c
+++ b/
sbr/dtime.c
@@
-12,16
+12,6
@@
#include <h/tws.h>
#include <time.h>
#include <h/tws.h>
#include <time.h>
-#if !defined(HAVE_STRUCT_TM_TM_GMTOFF)
-extern int daylight;
-extern long timezone;
-extern char *tzname[];
-#endif
-
-#ifndef abs
-# define abs(a) (a >= 0 ? a : -a)
-#endif
-
/*
* The number of days in the year, accounting for leap years
*/
/*
* The number of days in the year, accounting for leap years
*/
@@
-109,14
+99,8
@@
dlocaltime (time_t *clock)
if (tm->tm_isdst)
tw.tw_flags |= TW_DST;
if (tm->tm_isdst)
tw.tw_flags |= TW_DST;
-#ifdef HAVE_STRUCT_TM_TM_GMTOFF
- tw.tw_zone = tm->tm_gmtoff / 60;
- if (tm->tm_isdst) /* if DST is in effect */
- tw.tw_zone -= 60; /* reset to normal offset */
-#else
tzset();
tw.tw_zone = -(timezone / 60);
tzset();
tw.tw_zone = -(timezone / 60);
-#endif
tw.tw_flags &= ~TW_SDAY;
tw.tw_flags |= TW_SEXP;
tw.tw_flags &= ~TW_SDAY;
tw.tw_flags |= TW_SEXP;