Index: src/timezone/Makefile =================================================================== RCS file: /cvsroot/pgsql-server/src/timezone/Makefile,v retrieving revision 1.2 diff -c -c -r1.2 Makefile *** src/timezone/Makefile 30 Apr 2004 04:31:52 -0000 1.2 --- src/timezone/Makefile 30 Apr 2004 14:21:23 -0000 *************** *** 8,17 **** # #------------------------------------------------------------------------- ! subdir = src/tz top_builddir = ../.. include $(top_builddir)/src/Makefile.global OBJS= asctime.o difftime.o localtime.o pgtz.o ZICOBJS= zic.o ialloc.o scheck.o localtime.o asctime.o pgtz.o --- 8,19 ---- # #------------------------------------------------------------------------- ! subdir = src/timezone top_builddir = ../.. include $(top_builddir)/src/Makefile.global + override CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\" + OBJS= asctime.o difftime.o localtime.o pgtz.o ZICOBJS= zic.o ialloc.o scheck.o localtime.o asctime.o pgtz.o *************** *** 25,30 **** --- 27,33 ---- $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) zic: $(ZICOBJS) + $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X) install: zic zic -d $(datadir)/timezone $(TZDATAFILES) Index: src/timezone/pgtz.c =================================================================== RCS file: /cvsroot/pgsql-server/src/timezone/pgtz.c,v retrieving revision 1.1 diff -c -c -r1.1 pgtz.c *** src/timezone/pgtz.c 30 Apr 2004 04:09:23 -0000 1.1 --- src/timezone/pgtz.c 30 Apr 2004 14:21:23 -0000 *************** *** 15,21 **** #include "tzfile.h" - #ifdef WIN32 static char tzdir[MAXPGPATH]; static int done_tzdir = 0; char *pgwin32_TZDIR(void) { --- 15,20 ---- *************** *** 23,30 **** --- 22,33 ---- if (done_tzdir) return tzdir; + #ifndef WIN32 + StrNCpy(tzdir,PKGLIBDIR, MAXPGPATH); + #else if (GetModuleFileName(NULL,tzdir,MAXPGPATH) == 0) return NULL; + #endif canonicalize_path(tzdir); if ((p = last_path_separator(tzdir)) == NULL) *************** *** 32,42 **** else *p = '\0'; ! strcat(tzdir,"/../share/timezone"); done_tzdir=1; return tzdir; } - #else - #error pgwin32_TZDIR not implemented on non win32 yet! - #endif --- 35,42 ---- else *p = '\0'; ! strcat(tzdir,"/../timezone"); done_tzdir=1; return tzdir; } Index: src/timezone/private.h =================================================================== RCS file: /cvsroot/pgsql-server/src/timezone/private.h,v retrieving revision 1.2 diff -c -c -r1.2 private.h *** src/timezone/private.h 30 Apr 2004 04:44:06 -0000 1.2 --- src/timezone/private.h 30 Apr 2004 14:21:23 -0000 *************** *** 88,94 **** --- 88,98 ---- #include "errno.h" #include "string.h" #include "limits.h" /* for CHAR_BIT */ + #define _timezone timezone + #undef timezone #include "time.h" + #define timezone _timezone + #undef _timezone #include "stdlib.h" #if HAVE_GETTEXT - 0