Timezone library changes to map into our backend code.
authorBruce Momjian
Fri, 30 Apr 2004 04:11:58 +0000 (04:11 +0000)
committerBruce Momjian
Fri, 30 Apr 2004 04:11:58 +0000 (04:11 +0000)
src/timezone/asctime.c
src/timezone/difftime.c
src/timezone/localtime.c
src/timezone/zic.c

index 7054c75458ce933c34167cc992c4e944408e77cf..31a6275edc933596eb5f4881c128bb126f73b2db 100644 (file)
@@ -1,3 +1,4 @@
+#include "pgtz.h"\r
 /*\r
 ** This file is in the public domain, so clarified as of\r
 ** 1996-06-05 by Arthur David Olson ([email protected]).\r
index a4aa631d15a30931731bd3045174912acce5815d..636640d6f572e0ba02a8c33fd6066cbd0ae8099b 100644 (file)
@@ -1,3 +1,4 @@
+#include "pgtz.h"\r
 /*\r
 ** This file is in the public domain, so clarified as of\r
 ** June 5, 1996 by Arthur David Olson ([email protected]).\r
index 33e22a5e2052651d33657a9c9a4e22feadf3aee8..4f389b52dee13dff7bc433058417a29637902403 100644 (file)
@@ -1,3 +1,8 @@
+#include "pgtz.h"\r
+#undef open\r
+#define timezone pg_timezone\r
+#define USG_COMPAT\r
+extern time_t pg_timezone;\r
 /*\r
 ** This file is in the public domain, so clarified as of\r
 ** 1996-06-05 by Arthur David Olson ([email protected]).\r
index f4eaa0ca05c6bd3edc7cf616f0932bac80d299a7..ec187addf3d061074646e76c319baf7366696f89 100644 (file)
@@ -1,4 +1,11 @@
 static char    elsieid[] = "@(#)zic.c  7.115";\r
+#include "pgtz.h"\r
+#undef unlink\r
+#undef TZDIR\r
+#define TZDIR "data"\r
+#ifdef WIN32\r
+#include \r
+#endif\r
 \r
 #include "private.h"\r
 #include "locale.h"\r
@@ -7,11 +14,13 @@ static char  elsieid[] = "@(#)zic.c  7.115";
 #if HAVE_SYS_STAT_H\r
 #include "sys/stat.h"\r
 #endif\r
+#ifndef WIN32\r
 #ifdef S_IRUSR\r
 #define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)\r
 #else\r
 #define MKDIR_UMASK 0755\r
 #endif\r
+#endif\r
 \r
 /*\r
 ** On some ancient hosts, predicates like `isspace(C)' are defined\r
@@ -2234,3 +2243,16 @@ const int    i;
 /*\r
 ** UNIX was a registered trademark of The Open Group in 2003.\r
 */\r
+\r
+\r
+#ifdef WIN32\r
+/*\r
+ * To run on win32 \r
+ */\r
+int link(const char *oldpath, const char *newpath) {\r
+   if (!CopyFileEx(oldpath, newpath, NULL, NULL, FALSE, 0)) {\r
+       return -1;\r
+   }\r
+   return 0;\r
+}\r
+#endif\r