|
1 | 1 | /*-------------------------------------------------------------------------
|
2 | 2 | *
|
3 | 3 | * pgtz.c
|
4 |
| - * Timezone Library Integration Functions |
| 4 | + * Timezone Library Integration Functions |
5 | 5 | *
|
6 | 6 | * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
7 | 7 | *
|
8 | 8 | * 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 $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
|
16 | 16 |
|
17 | 17 |
|
18 | 18 | staticchartzdir[MAXPGPATH];
|
19 |
| -staticintdone_tzdir=0; |
20 |
| -char*pgwin32_TZDIR(void) { |
21 |
| -char*p; |
| 19 | +staticintdone_tzdir=0; |
| 20 | +char* |
| 21 | +pg_TZDIR(void) |
| 22 | +{ |
| 23 | +char*p; |
| 24 | + |
22 | 25 | if (done_tzdir)
|
23 | 26 | returntzdir;
|
24 | 27 |
|
25 | 28 | #ifndefWIN32
|
26 | 29 | StrNCpy(tzdir,PGDATADIR,MAXPGPATH);
|
27 | 30 | #else
|
28 |
| -if (GetModuleFileName(NULL,tzdir,MAXPGPATH)==0) |
| 31 | +if (GetModuleFileName(NULL,tzdir,MAXPGPATH)==0) |
29 | 32 | returnNULL;
|
30 | 33 | #endif
|
31 |
| -
|
| 34 | + |
32 | 35 | canonicalize_path(tzdir);
|
| 36 | +#if0 |
33 | 37 | if ((p=last_path_separator(tzdir))==NULL)
|
34 | 38 | returnNULL;
|
35 | 39 | else
|
36 | 40 | *p='\0';
|
37 |
| - |
38 |
| -strcat(tzdir,"/timezone"); |
| 41 | +#endif |
| 42 | + |
| 43 | +strcat(tzdir,"/timezone"); |
| 44 | +puts(tzdir); |
39 | 45 |
|
40 |
| -done_tzdir=1; |
| 46 | +done_tzdir=1; |
41 | 47 | returntzdir;
|
42 | 48 | }
|