isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit a49893f32ed20e109ba974dd74cd917c48c609e5
parent 2b27216b86c930cf40e59400df96928366863836
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat,  9 Nov 2013 13:50:48 +0100

fix strftime() %z conversion specifier check

only glibc does something sane with gmtime()+strftime(). on bsd (incl.
mac os), strftime() can be used only with localtime().

Diffstat:
Mconfigure.ac | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -20,8 +20,8 @@ int main(void) { time_t t = 0; char buf[32]; - strftime(buf, sizeof(buf), "%z", gmtime(&t)); - return !!strcmp(buf, "+0000"); + strftime(buf, sizeof(buf), "%z", localtime(&t)); + return !(buf[0] == '+' || buf[0] == '-'); } ], [ob_cv_strftime_z=yes], [ob_cv_strftime_z=no], [ob_cv_strftime_z="yes (assumed)"])]) if test "x$ob_cv_strftime_z" = x"no"; then