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

Commit932d1e5

Browse files
committed
Add #ifdef for LC_MESSAGES, because it is not ANSI C standard, and BSDI
does not have it.
1 parent44f64dd commit932d1e5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

‎src/backend/utils/adt/pg_locale.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* -----------------------------------------------------------------------
33
* pg_locale.c
44
*
5-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/pg_locale.c,v 1.4 2000/04/12 17:15:51 momjian Exp $
5+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/pg_locale.c,v 1.5 2000/06/29 01:19:36 momjian Exp $
66
*
77
*
88
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -40,8 +40,9 @@ PGLC_current(PG_LocaleCategories * lc)
4040
lc->lc_time=setlocale(LC_TIME,NULL);
4141
lc->lc_collate=setlocale(LC_COLLATE,NULL);
4242
lc->lc_monetary=setlocale(LC_MONETARY,NULL);
43+
#ifdefLC_MESSAGES
4344
lc->lc_messages=setlocale(LC_MESSAGES,NULL);
44-
45+
#endif
4546
returnlc;
4647
}
4748

@@ -55,14 +56,20 @@ PGLC_current(PG_LocaleCategories * lc)
5556
PG_LocaleCategories*
5657
PGLC_debug_lc(PG_LocaleCategories*lc)
5758
{
59+
#ifdefLC_MESSAGES
5860
elog(DEBUG,"CURRENT LOCALE ENVIRONMENT:\n\nLANG: \t%s\nLC_CTYPE:\t%s\nLC_NUMERIC:\t%s\nLC_TIME:\t%s\nLC_COLLATE:\t%s\nLC_MONETARY:\t%s\nLC_MESSAGES:\t%s\n",
61+
#else
62+
elog(DEBUG,"CURRENT LOCALE ENVIRONMENT:\n\nLANG: \t%s\nLC_CTYPE:\t%s\nLC_NUMERIC:\t%s\nLC_TIME:\t%s\nLC_COLLATE:\t%s\nLC_MONETARY:\t%s\n",
63+
#endif
5964
lc->lang,
6065
lc->lc_ctype,
6166
lc->lc_numeric,
6267
lc->lc_time,
6368
lc->lc_collate,
64-
lc->lc_monetary,
65-
lc->lc_messages
69+
lc->lc_monetary
70+
#ifdefLC_MESSAGES
71+
,lc->lc_messages
72+
#endif
6673
);
6774

6875
returnlc;
@@ -91,10 +98,10 @@ PGLC_setlocale(PG_LocaleCategories * lc)
9198

9299
if (!setlocale(LC_MONETARY,lc->lc_monetary))
93100
elog(NOTICE,"pg_setlocale(): 'LC_MONETARY=%s' cannot be honored.",lc->lc_monetary);
94-
101+
#ifdefLC_MESSAGES
95102
if (!setlocale(LC_MESSAGES,lc->lc_messages))
96103
elog(NOTICE,"pg_setlocale(): 'LC_MESSAGE=%s' cannot be honored.",lc->lc_messages);
97-
104+
#endif
98105
returnlc;
99106
}
100107

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp