--- config/c-library.m4.orig 2004-06-07 23:39:44.000000000 +0100 +++ config/c-library.m4 2004-09-01 01:52:49.685665700 +0100 @@ -17,7 +17,22 @@ AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global variable 'int timezone'.]) fi])# PGAC_VAR_INT_TIMEZONE +# PGAC_VAR_TIME_T_TIMEZONE +# --------------------- +# Check if the global variable `time_t timezone' exists. If so, define +# HAVE_TIME_T_TIMEZONE. +AC_DEFUN([PGAC_VAR_TIME_T_TIMEZONE], +[AC_CACHE_CHECK(for time_t timezone, pgac_cv_var_time_t_timezone, +[AC_TRY_LINK([#include +int res;], + [res = (int) timezone / 60;], + [pgac_cv_var_time_t_timezone=yes], + [pgac_cv_var_time_t_timezone=no])]) +if test x"$pgac_cv_var_time_t_timezone" = xyes ; then + AC_DEFINE(HAVE_TIME_T_TIMEZONE,, [Define to 1 if you have the global variable 'time_t timezone'.]) +fi])# PGAC_VAR_TIME_T_TIMEZONE + # PGAC_STRUCT_TIMEZONE # ------------------ --- src/timezone/pgtz.c.orig 2004-08-30 03:54:42.000000000 +0100 +++ src/timezone/pgtz.c 2004-09-01 01:55:46.011533700 +0100 @@ -96,14 +96,20 @@ #if defined(HAVE_STRUCT_TM_TM_ZONE) return tm->tm_gmtoff; #elif defined(HAVE_INT_TIMEZONE) -#ifdef HAVE_UNDERSCORE_TIMEZONE +# ifdef HAVE_UNDERSCORE_TIMEZONE return -_timezone; -#else +# else return -timezone; -#endif +# endif +#elif defined(HAVE_TIME_T_TIMEZONE) +# ifdef HAVE_UNDERSCORE_TIMEZONE + return -(int) _timezone; +# else + return -(int) timezone; +# endif #else -#error No way to determine TZ? Can this happen? +# error No way to determine TZ? Can this happen? #endif } --- configure.in.orig 2004-08-31 05:08:33.000000000 +0100 +++ configure.in 2004-09-01 01:54:24.450077700 +0100 @@ -804,7 +804,8 @@ ## PGAC_VAR_INT_TIMEZONE +PGAC_VAR_TIME_T_TIMEZONE AC_FUNC_ACCEPT_ARGTYPES PGAC_FUNC_GETTIMEOFDAY_1ARG --- configure.orig 2004-08-31 05:08:32.000000000 +0100 +++ configure 2004-09-01 02:00:16.758068100 +0100 @@ -12905,7 +12905,69 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for time_t timezone" >&5 +echo $ECHO_N "checking for time_t timezone... $ECHO_C" >&6 +if test "${pgac_cv_var_time_t_timezone+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int res; +int +main () +{ +res = (int)timezone / 60; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pgac_cv_var_time_t_timezone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +pgac_cv_var_time_t_timezone=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $pgac_cv_var_time_t_timezone" >&5 +echo "${ECHO_T}$pgac_cv_var_time_t_timezone" >&6 +if test x"$pgac_cv_var_time_t_timezone" = xyes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TIME_T_TIMEZONE +_ACEOF + +fi echo "$as_me:$LINENO: checking types of arguments for accept()" >&5 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6 if test "${ac_cv_func_accept_return+set}" = set; then --- src/include/pg_config.h.orig 2004-09-01 01:24:36.472964100 +0100 +++ src/include/pg_config.h 2004-09-01 02:10:22.562813700 +0100 @@ -177,7 +177,10 @@ /* Define to 1 if you have the global variable 'int timezone'. */ /* #undef HAVE_INT_TIMEZONE */ +/* Define to 1 if you have the global variable 'time_t timezone'. */ +#define HAVE_TIME_T_TIMEZONE 1 + /* Define to 1 if you have support for IPv6. */ /* #undef HAVE_IPV6 */ --- src/include/pg_config.h.in.orig 2004-07-14 18:55:10.000000000 +0100 +++ src/include/pg_config.h.in 2004-09-01 02:11:49.389827300 +0100 @@ -176,7 +176,10 @@ /* Define to 1 if you have the global variable 'int timezone'. */ #undef HAVE_INT_TIMEZONE +/* Define to 1 if you have the global variable 'time_t timezone'. */ +#undef HAVE_TIME_T_TIMEZONE + /* Define to 1 if you have support for IPv6. */ #undef HAVE_IPV6