diff -cr postgresql-snapshot-030325/src/include/c.h postgresql-newsignal/src/include/c.h
*** postgresql-snapshot-030325/src/include/c.h	Wed Mar 10 22:12:46 2004
--- postgresql-newsignal/src/include/c.h	Mon Apr 12 21:39:13 2004
***************
*** 310,320 ****
--- 310,324 ----
  #endif
  
  /* Global variable holding time zone information. */
+ #ifdef USE_PGTZ
+ #define TIMEZONE_GLOBAL pg_timezone
+ #else
  #ifndef HAVE_UNDERSCORE_TIMEZONE
  #define TIMEZONE_GLOBAL timezone
  #else
  #define TIMEZONE_GLOBAL _timezone
  #define tzname _tzname			/* should be in time.h? */
+ #endif
  #endif
  
  /* sig_atomic_t is required by ANSI C, but may be missing on old platforms */
diff -cr postgresql-snapshot-030325/src/include/port.h postgresql-newsignal/src/include/port.h
*** postgresql-snapshot-030325/src/include/port.h	Wed Mar 24 04:54:16 2004
--- postgresql-newsignal/src/include/port.h	Mon Apr 12 22:03:28 2004
***************
*** 157,159 ****
--- 157,193 ----
  #define WIFSIGNALED(w)  (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
  #define WTERMSIG(w)     ((w) & 0x7f)
  #endif
+ 
+ /*
+  * Internal timezone library 
+  */
+ #ifdef USE_PGTZ
+ #ifndef FRONTEND
+ #undef localtime
+ #undef gmtime
+ #undef asctime
+ #undef ctime
+ #undef difftime
+ #undef mktime
+ #undef tzset
+ 
+ #define localtime(timep) pg_localtime(timep)
+ #define gmtime(timep) pg_gmtime(timep)
+ #define asctime(timep) pg_asctime(timep)
+ #define ctime(timep) pg_ctime(timep)
+ #define difftime(t1,t2) pg_difftime(t1,t2)
+ #define mktime(tm) pg_mktime(tm)
+ #define tzset pg_tzset
+ 
+ 
+ extern struct tm *pg_localtime(const time_t *);
+ extern struct tm *gg_gmtime(const time_t *);
+ extern char *pg_asctime(const struct tm *);
+ extern char *pg_ctime(const time_t *);
+ extern double pg_difftime(const time_t, const time_t);
+ extern time_t pg_mktime(struct tm *);
+ extern void pg_tzset(void);
+ extern time_t pg_timezone;
+ 
+ #endif
+ #endif
diff -cr postgresql-snapshot-030325/src/interfaces/ecpg/pgtypeslib/Makefile postgresql-newsignal/src/interfaces/ecpg/pgtypeslib/Makefile
*** postgresql-snapshot-030325/src/interfaces/ecpg/pgtypeslib/Makefile	Tue Feb 24 17:07:49 2004
--- postgresql-newsignal/src/interfaces/ecpg/pgtypeslib/Makefile	Tue Apr 13 21:03:50 2004
***************
*** 16,22 ****
  SO_MAJOR_VERSION= 1
  SO_MINOR_VERSION= 2
  
! override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS) $(THREAD_CPPFLAGS)
  SHLIB_LINK += -lm
  
  OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
--- 16,22 ----
  SO_MAJOR_VERSION= 1
  SO_MINOR_VERSION= 2
  
! override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS) $(THREAD_CPPFLAGS) -DFRONTEND
  SHLIB_LINK += -lm
  
  OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
diff -cr postgresql-snapshot-030325/src/interfaces/ecpg/preproc/Makefile postgresql-newsignal/src/interfaces/ecpg/preproc/Makefile
*** postgresql-snapshot-030325/src/interfaces/ecpg/preproc/Makefile	Tue Mar  2 07:45:05 2004
--- postgresql-newsignal/src/interfaces/ecpg/preproc/Makefile	Tue Apr 13 21:04:47 2004
***************
*** 12,18 ****
  	-DMAJOR_VERSION=$(MAJOR_VERSION) \
  	-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
  	-DINCLUDEDIR=\"$(includedir)\" \
! 	-DPKGINCLUDEDIR=\"$(pkgincludedir)\" 
  
  ifeq ($(GCC), yes)
  override CFLAGS += -Wno-error
--- 12,19 ----
  	-DMAJOR_VERSION=$(MAJOR_VERSION) \
  	-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
  	-DINCLUDEDIR=\"$(includedir)\" \
! 	-DPKGINCLUDEDIR=\"$(pkgincludedir)\" \
! 	-DFRONTEND
  
  ifeq ($(GCC), yes)
  override CFLAGS += -Wno-error
