Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcef0652

Browse files
committed
Add defense against possibility that tzname[] doesn't exist.
1 parentdbd55d3 commitcef0652

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

‎src/backend/commands/variable.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* 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 $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -29,6 +29,17 @@
2929
#include"utils/tqual.h"
3030
#include"mb/pg_wchar.h"
3131

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+
3243
/*
3344
* DATESTYLE
3445
*/
@@ -325,8 +336,10 @@ tzset_succeeded(const char *tz)
325336
/*
326337
* Check first set of heuristics to say that tzset definitely worked.
327338
*/
339+
#ifdefHAVE_TZNAME
328340
if (tzname[1]&&tzname[1][0]!='\0')
329341
return true;
342+
#endif
330343
if (TIMEZONE_GLOBAL!=0)
331344
return true;
332345

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp