Skip to content

Commit d248a67

Browse files
committed
Timezone library changes to map into our backend code.
1 parent 6a2b75c commit d248a67

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

src/timezone/asctime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "pgtz.h"
12
/*
23
** This file is in the public domain, so clarified as of
34
** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).

src/timezone/difftime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "pgtz.h"
12
/*
23
** This file is in the public domain, so clarified as of
34
** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).

src/timezone/localtime.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#include "pgtz.h"
2+
#undef open
3+
#define timezone pg_timezone
4+
#define USG_COMPAT
5+
extern time_t pg_timezone;
16
/*
27
** This file is in the public domain, so clarified as of
38
** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).

src/timezone/zic.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
static char elsieid[] = "@(#)zic.c 7.115";
2+
#include "pgtz.h"
3+
#undef unlink
4+
#undef TZDIR
5+
#define TZDIR "data"
6+
#ifdef WIN32
7+
#include <windows.h>
8+
#endif
29

310
#include "private.h"
411
#include "locale.h"
@@ -7,11 +14,13 @@ static char elsieid[] = "@(#)zic.c 7.115";
714
#if HAVE_SYS_STAT_H
815
#include "sys/stat.h"
916
#endif
17+
#ifndef WIN32
1018
#ifdef S_IRUSR
1119
#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
1220
#else
1321
#define MKDIR_UMASK 0755
1422
#endif
23+
#endif
1524

1625
/*
1726
** On some ancient hosts, predicates like `isspace(C)' are defined
@@ -2234,3 +2243,16 @@ const int i;
22342243
/*
22352244
** UNIX was a registered trademark of The Open Group in 2003.
22362245
*/
2246+
2247+
2248+
#ifdef WIN32
2249+
/*
2250+
* To run on win32
2251+
*/
2252+
int link(const char *oldpath, const char *newpath) {
2253+
if (!CopyFileEx(oldpath, newpath, NULL, NULL, FALSE, 0)) {
2254+
return -1;
2255+
}
2256+
return 0;
2257+
}
2258+
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy