Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0a2b9f9

Browse files
committed
Rename function to be less win32 specific.
1 parent 1a27355 commit 0a2b9f9

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

src/timezone/pgtz.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*-------------------------------------------------------------------------
22
*
33
* pgtz.c
4-
* Timezone Library Integration Functions
4+
* Timezone Library Integration Functions
55
*
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.3 2004/04/30 20:23:28 momjian Exp $
9+
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.4 2004/05/01 01:34:47 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -16,27 +16,33 @@
1616

1717

1818
static char tzdir[MAXPGPATH];
19-
static int done_tzdir = 0;
20-
char *pgwin32_TZDIR(void) {
21-
char *p;
19+
static int done_tzdir = 0;
20+
char *
21+
pg_TZDIR(void)
22+
{
23+
char *p;
24+
2225
if (done_tzdir)
2326
return tzdir;
2427

2528
#ifndef WIN32
2629
StrNCpy(tzdir, PGDATADIR, MAXPGPATH);
2730
#else
28-
if (GetModuleFileName(NULL,tzdir,MAXPGPATH) == 0)
31+
if (GetModuleFileName(NULL, tzdir, MAXPGPATH) == 0)
2932
return NULL;
3033
#endif
31-
34+
3235
canonicalize_path(tzdir);
36+
#if 0
3337
if ((p = last_path_separator(tzdir)) == NULL)
3438
return NULL;
3539
else
3640
*p = '\0';
37-
38-
strcat(tzdir,"/timezone");
41+
#endif
42+
43+
strcat(tzdir, "/timezone");
44+
puts(tzdir);
3945

40-
done_tzdir=1;
46+
done_tzdir = 1;
4147
return tzdir;
4248
}

src/timezone/pgtz.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77

88
#define NOID
9-
#define TZDIR pgwin32_TZDIR()
9+
#define TZDIR pg_TZDIR()
1010

11-
char *pgwin32_TZDIR(void);
11+
char *pg_TZDIR(void);

0 commit comments

Comments
 (0)