Index: configure
===================================================================
RCS file: /cvsroot/pgsql-server/configure,v
retrieving revision 1.389
diff -c -c -r1.389 configure
*** configure	2 Sep 2004 20:39:57 -0000	1.389
--- configure	8 Sep 2004 19:36:18 -0000
***************
*** 10725,10731 ****
--- 10725,10735 ----
  int
  main ()
  {
+ #ifndef __CYGWIN__
  res = timezone / 60;
+ #else
+ res = _timezone / 60;
+ #endif
    ;
    return 0;
  }
Index: config/c-library.m4
===================================================================
RCS file: /cvsroot/pgsql-server/config/c-library.m4,v
retrieving revision 1.26
diff -c -c -r1.26 c-library.m4
*** config/c-library.m4	7 Jun 2004 22:39:44 -0000	1.26
--- config/c-library.m4	8 Sep 2004 19:36:19 -0000
***************
*** 10,16 ****
  [AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
  [AC_TRY_LINK([#include <time.h>
  int res;],
!   [res = timezone / 60;],
    [pgac_cv_var_int_timezone=yes],
    [pgac_cv_var_int_timezone=no])])
  if test x"$pgac_cv_var_int_timezone" = xyes ; then
--- 10,20 ----
  [AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
  [AC_TRY_LINK([#include <time.h>
  int res;],
!   [#ifndef __CYGWIN__
! res = timezone / 60;
! #else
! res = _timezone / 60;
! #endif],
    [pgac_cv_var_int_timezone=yes],
    [pgac_cv_var_int_timezone=no])])
  if test x"$pgac_cv_var_int_timezone" = xyes ; then
Index: src/include/port.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/port.h,v
retrieving revision 1.57
diff -c -c -r1.57 port.h
*** src/include/port.h	29 Aug 2004 21:08:48 -0000	1.57
--- src/include/port.h	8 Sep 2004 19:36:26 -0000
***************
*** 180,185 ****
--- 180,193 ----
  #define pclose(a) _pclose(a)
  #endif
  
+ /* Global variable holding time zone information. */
+ #if !defined(__CYGWIN__)
+ #define TIMEZONE_GLOBAL timezone
+ #else
+ #define TIMEZONE_GLOBAL _timezone
+ #define tzname _tzname			/* should be in time.h? */
+ #endif
+ 
  extern int	copydir(char *fromdir, char *todir);
  
  /* Missing rand functions */
Index: src/interfaces/ecpg/pgtypeslib/dt.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/ecpg/pgtypeslib/dt.h,v
retrieving revision 1.19
diff -c -c -r1.19 dt.h
*** src/interfaces/ecpg/pgtypeslib/dt.h	1 Sep 2004 18:59:35 -0000	1.19
--- src/interfaces/ecpg/pgtypeslib/dt.h	8 Sep 2004 19:36:28 -0000
***************
*** 216,229 ****
  } while(0)
  #endif
  
- /* Global variable holding time zone information. */
- #if !defined(__CYGWIN__) && !defined(WIN32)
- #define TIMEZONE_GLOBAL timezone
- #else
- #define TIMEZONE_GLOBAL _timezone
- #define tzname _tzname			/* should be in time.h? */
- #endif
- 
  /*
   * Date/time validation
   * Include check for leap year.
--- 216,221 ----
Index: src/timezone/pgtz.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/timezone/pgtz.c,v
retrieving revision 1.27
diff -c -c -r1.27 pgtz.c
*** src/timezone/pgtz.c	2 Sep 2004 01:15:06 -0000	1.27
--- src/timezone/pgtz.c	8 Sep 2004 19:36:33 -0000
***************
*** 96,106 ****
  #if defined(HAVE_STRUCT_TM_TM_ZONE)
  	return tm->tm_gmtoff;
  #elif defined(HAVE_INT_TIMEZONE)
! #ifdef HAVE_UNDERSCORE_TIMEZONE
! 	return -_timezone;
! #else
! 	return -timezone;
! #endif
  #else
  #error No way to determine TZ? Can this happen?
  #endif
--- 96,102 ----
  #if defined(HAVE_STRUCT_TM_TM_ZONE)
  	return tm->tm_gmtoff;
  #elif defined(HAVE_INT_TIMEZONE)
! 	return -TIMEZONE_GLOBAL;
  #else
  #error No way to determine TZ? Can this happen?
  #endif
