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

Commitb70999d

Browse files
committed
Make TZNAME_GLOBAL for reference to tzname global variable.
1 parentf62901c commitb70999d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

‎src/include/port.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.58 2004/09/08 19:43:07 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.59 2004/09/09 00:24:10 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -183,9 +183,10 @@ extern intwin32_open(const char *, int,...);
183183
/* Global variable holding time zone information. */
184184
#if !defined(__CYGWIN__)
185185
#defineTIMEZONE_GLOBAL timezone
186+
#defineTZNAME_GLOBAL tzname
186187
#else
187188
#defineTIMEZONE_GLOBAL _timezone
188-
#definetzname _tzname/* should be in time.h? */
189+
#defineTZNAME_GLOBAL _tzname
189190
#endif
190191

191192
externintcopydir(char*fromdir,char*todir);

‎src/interfaces/ecpg/pgtypeslib/dt_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,8 +1065,8 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
10651065
* case it contains an error message, which doesn't fit in the
10661066
* buffer
10671067
*/
1068-
StrNCpy(*tzn,tzname[tm->tm_isdst],MAXTZLEN+1);
1069-
if (strlen(tzname[tm->tm_isdst])>MAXTZLEN)
1068+
StrNCpy(*tzn,TZNAME_GLOBAL[tm->tm_isdst],MAXTZLEN+1);
1069+
if (strlen(TZNAME_GLOBAL[tm->tm_isdst])>MAXTZLEN)
10701070
tm->tm_isdst=-1;
10711071
}
10721072
}

‎src/interfaces/ecpg/pgtypeslib/timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn)
223223
#elif defined(HAVE_INT_TIMEZONE)
224224
*tzp= ((tm->tm_isdst>0) ? (TIMEZONE_GLOBAL-3600) :TIMEZONE_GLOBAL);
225225
if (tzn!=NULL)
226-
*tzn=tzname[(tm->tm_isdst>0)];
226+
*tzn=TZNAME_GLOBAL[(tm->tm_isdst>0)];
227227
#endif
228228

229229
#else/* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp