diff options
author | Bruce Momjian | 2004-04-30 04:11:58 +0000 |
---|---|---|
committer | Bruce Momjian | 2004-04-30 04:11:58 +0000 |
commit | d248a67af1d849438e146bccd46adb1eb0a9f3b5 (patch) | |
tree | 155eaf8c6566e163878f4d9bb6e050587886491c /src/timezone/zic.c | |
parent | 6a2b75c2c88ac583362d8300163fc2332851c6c8 (diff) |
Timezone library changes to map into our backend code.
Diffstat (limited to 'src/timezone/zic.c')
-rw-r--r-- | src/timezone/zic.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/timezone/zic.c b/src/timezone/zic.c index f4eaa0ca05c..ec187addf3d 100644 --- a/src/timezone/zic.c +++ b/src/timezone/zic.c @@ -1,4 +1,11 @@ static char elsieid[] = "@(#)zic.c 7.115";
+#include "pgtz.h"
+#undef unlink
+#undef TZDIR
+#define TZDIR "data"
+#ifdef WIN32
+#include <windows.h>
+#endif
#include "private.h"
#include "locale.h"
@@ -7,11 +14,13 @@ static char elsieid[] = "@(#)zic.c 7.115"; #if HAVE_SYS_STAT_H
#include "sys/stat.h"
#endif
+#ifndef WIN32
#ifdef S_IRUSR
#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
#else
#define MKDIR_UMASK 0755
#endif
+#endif
/*
** On some ancient hosts, predicates like `isspace(C)' are defined
@@ -2234,3 +2243,16 @@ const int i; /*
** UNIX was a registered trademark of The Open Group in 2003.
*/
+
+
+#ifdef WIN32
+/*
+ * To run on win32
+ */
+int link(const char *oldpath, const char *newpath) {
+ if (!CopyFileEx(oldpath, newpath, NULL, NULL, FALSE, 0)) {
+ return -1;
+ }
+ return 0;
+}
+#endif
|