This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System".
The branch, master has been updated via 0cd4ef27dfd7ab539a3217287795d4d9732c18d0 (commit) from a0efe7938f3e001a6a657ff452ee5e02d619fa06 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=0cd4ef27dfd7ab539a3217287795d4d9732c18d0 commit 0cd4ef27dfd7ab539a3217287795d4d9732c18d0 Author: David Levine <levin...@acm.org> Date: Wed Jan 25 19:33:17 2012 -0600 Undid most of 3ef341abe440ece07f8deed59fb026ab020e805 because FreeBSD needs the HAVE_STRUCT_TM_TM_GMTOFF test. It has a timezone() function, not a timezone global variable (that's visible with our default configuration. diff --git a/configure.ac b/configure.ac index 0756158..d73f376 100644 --- a/configure.ac +++ b/configure.ac @@ -716,6 +716,11 @@ dnl ---------------- dnl CHECK STRUCTURES dnl ---------------- +dnl For platforms such as FreeBSD that have tm_gmtoff in struct tm. +dnl (FreeBSD has a timezone() function but not a timezone global +dnl variable that is visible). +AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>]) + AC_STRUCT_DIRENT_D_TYPE dnl Where is <signal.h> located? Needed as input for signames.awk diff --git a/sbr/dtime.c b/sbr/dtime.c index aa34621..a7c1574 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -12,6 +12,10 @@ #include <h/tws.h> #include <time.h> +#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) +extern long timezone; +#endif + /* * The number of days in the year, accounting for leap years */ @@ -99,8 +103,14 @@ dlocaltime (time_t *clock) 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); +#endif tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP; ----------------------------------------------------------------------- Summary of changes: configure.ac | 5 +++++ sbr/dtime.c | 10 ++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) hooks/post-receive -- The nmh Mail Handling System _______________________________________________ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits