|
9 | 9 | *
|
10 | 10 | *
|
11 | 11 | * IDENTIFICATION
|
12 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.76 2003/05/18 01:06:25 tgl Exp $ |
| 12 | + * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.77 2003/05/22 17:13:08 tgl Exp $ |
13 | 13 | *
|
14 | 14 | *-------------------------------------------------------------------------
|
15 | 15 | */
|
|
29 | 29 | #include"utils/tqual.h"
|
30 | 30 | #include"mb/pg_wchar.h"
|
31 | 31 |
|
| 32 | +/* |
| 33 | + * Some systems have tzname[] but don't declare it in <time.h>. Use this |
| 34 | + * to duplicate the test in AC_STRUCT_TIMEZONE. |
| 35 | + */ |
| 36 | +#ifdefHAVE_TZNAME |
| 37 | +#ifndeftzname/* For SGI. */ |
| 38 | +externchar*tzname[]; |
| 39 | +#endif |
| 40 | +#endif |
| 41 | + |
| 42 | + |
32 | 43 | /*
|
33 | 44 | * DATESTYLE
|
34 | 45 | */
|
@@ -325,8 +336,10 @@ tzset_succeeded(const char *tz)
|
325 | 336 | /*
|
326 | 337 | * Check first set of heuristics to say that tzset definitely worked.
|
327 | 338 | */
|
| 339 | +#ifdefHAVE_TZNAME |
328 | 340 | if (tzname[1]&&tzname[1][0]!='\0')
|
329 | 341 | return true;
|
| 342 | +#endif |
330 | 343 | if (TIMEZONE_GLOBAL!=0)
|
331 | 344 | return true;
|
332 | 345 |
|
|