diff --git a/libisoburn/trunk/acinclude.m4 b/libisoburn/trunk/acinclude.m4 index f799c049..e539dacb 100644 --- a/libisoburn/trunk/acinclude.m4 +++ b/libisoburn/trunk/acinclude.m4 @@ -314,3 +314,16 @@ dnl For debugging only ]) +dnl LIBBURNIA_TRY_TIMEZONE is by Thomas Schmitt, libburnia project +dnl It tests whether the global variable exists and is suitable for +dnl integer arithmetics. +AC_DEFUN([LIBBURNIA_TRY_TIMEZONE], +[ + echo -n "checking for timezone variable ... " + AC_TRY_LINK([ #include ], [long int i; i = 1 - timezone; ], + [LIBBURNIA_TIMEZONE="timezone"], [LIBBURNIA_TIMEZONE="0"] + ) + echo "$LIBBURNIA_TIMEZONE" +]) + + diff --git a/libisoburn/trunk/configure.ac b/libisoburn/trunk/configure.ac index e40ce509..483396d3 100644 --- a/libisoburn/trunk/configure.ac +++ b/libisoburn/trunk/configure.ac @@ -106,6 +106,16 @@ AC_CHECK_MEMBER([struct tm.tm_gmtoff], , [#include ]) +dnl Whether timezone is an integer variable +AH_TEMPLATE([Libburnia_timezonE], [Either timezone or 0]) +LIBBURNIA_TRY_TIMEZONE +if test x$LIBBURNIA_TIMEZONE = xtimezone +then + AC_DEFINE([Libburnia_timezonE], [timezone]) +else + AC_DEFINE([Libburnia_timezonE], [0]) +fi + THREAD_LIBS=-lpthread AC_SUBST(THREAD_LIBS) @@ -120,7 +130,6 @@ dnl Important: Must be performed _after_ TARGET_SHIZZLE dnl LIBBURNIA_SET_PKGCONFIG - AC_ARG_ENABLE(libreadline, [ --enable-libreadline Enable use of libreadline by xorriso, default=yes], , enable_libreadline=yes) diff --git a/libisoburn/trunk/xorriso/configure_ac.txt b/libisoburn/trunk/xorriso/configure_ac.txt index b9e46aa2..416584d8 100644 --- a/libisoburn/trunk/xorriso/configure_ac.txt +++ b/libisoburn/trunk/xorriso/configure_ac.txt @@ -97,6 +97,16 @@ AC_CHECK_DECL([timegm], , [#include ]) +dnl Whether timezone is an integer variable +AH_TEMPLATE([Libburnia_timezonE], [Either timezone or 0]) +LIBBURNIA_TRY_TIMEZONE +if test x$LIBBURNIA_TIMEZONE = xtimezone +then + AC_DEFINE([Libburnia_timezonE], [timezone]) +else + AC_DEFINE([Libburnia_timezonE], [0]) +fi + dnl Check if non standard eaccess() function is available AC_CHECK_DECL([eaccess], [AC_DEFINE(HAVE_EACCESS, 1, [Define this if eaccess function is available])], diff --git a/libisoburn/trunk/xorriso/misc_funct.c b/libisoburn/trunk/xorriso/misc_funct.c index 5d7ec7c4..cf663a57 100644 --- a/libisoburn/trunk/xorriso/misc_funct.c +++ b/libisoburn/trunk/xorriso/misc_funct.c @@ -646,7 +646,10 @@ time_t Decode_timestring(char *code, time_t *date, int flag) #else if(result_tm.tm_isdst < 0) result_tm.tm_isdst = 0; - seconds-= timezone - result_tm.tm_isdst * 3600; +#ifndef Libburnia_timezonE +#define Libburnia_timezonE timezone +#endif + seconds-= Libburnia_timezonE - result_tm.tm_isdst * 3600; #endif } diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index e4f4838f..8422c8db 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2014.11.13.180427" +#define Xorriso_timestamP "2014.11.26.134709"