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

Commit4022f94

Browse files
committed
pg_bind_textdomain_codeset must exist only on ENABLE_NLS.
1 parentfb2ebae commit4022f94

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

‎src/backend/utils/mb/mbutils.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* (currently mule internal code (mic) is used)
55
* Tatsuo Ishii
66
*
7-
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.80 2009/03/0816:07:12 alvherre Exp $
7+
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.81 2009/03/0818:10:16 alvherre Exp $
88
*/
99
#include"postgres.h"
1010

@@ -891,17 +891,20 @@ SetDatabaseEncoding(int encoding)
891891
DatabaseEncoding=&pg_enc2name_tbl[encoding];
892892
Assert(DatabaseEncoding->encoding==encoding);
893893

894+
#ifdefENABLE_NLS
894895
pg_bind_textdomain_codeset(textdomain(NULL),encoding);
896+
#endif
895897
}
896898

897899
/*
898900
* On Windows, we need to explicitly bind gettext to the correct
899901
* encoding, because gettext() tends to get confused.
900902
*/
903+
#ifdefENABLE_NLS
901904
void
902905
pg_bind_textdomain_codeset(constchar*domainname,intencoding)
903906
{
904-
#if defined(ENABLE_NLS)&& defined(WIN32)
907+
#ifdefWIN32
905908
inti;
906909

907910
for (i=0;i<lengthof(codeset_map_array);i++)
@@ -916,6 +919,7 @@ pg_bind_textdomain_codeset(const char *domainname, int encoding)
916919
}
917920
#endif
918921
}
922+
#endif
919923

920924
void
921925
SetDefaultClientEncoding(void)

‎src/include/mb/pg_wchar.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.85 2009/03/0816:07:12 alvherre Exp $
9+
* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.86 2009/03/0818:10:17 alvherre Exp $
1010
*
1111
*NOTES
1212
*This is used both by the backend and by libpq, but should not be
@@ -392,7 +392,9 @@ extern const char *pg_get_client_encoding_name(void);
392392
externvoidSetDatabaseEncoding(intencoding);
393393
externintGetDatabaseEncoding(void);
394394
externconstchar*GetDatabaseEncodingName(void);
395+
#ifdefENABLE_NLS
395396
externvoidpg_bind_textdomain_codeset(constchar*domainname,intencoding);
397+
#endif
396398

397399
externintpg_valid_client_encoding(constchar*name);
398400
externintpg_valid_server_encoding(constchar*name);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp