Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e43fd89

Browse files
committed
Revert pg_bind_textdomain_codeset to a existant-but-empty function when
ENABLE_NLS is not defined, for better compatibility of the backend with modules compiled the other way. Per note from Tom after my previous commit.
1 parent ace2b06 commit e43fd89

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/backend/utils/mb/mbutils.c

+2-4
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.81 2009/03/08 18:10:16 alvherre Exp $
7+
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.82 2009/03/09 00:01:32 alvherre Exp $
88
*/
99
#include "postgres.h"
1010

@@ -900,11 +900,10 @@ SetDatabaseEncoding(int encoding)
900900
* On Windows, we need to explicitly bind gettext to the correct
901901
* encoding, because gettext() tends to get confused.
902902
*/
903-
#ifdef ENABLE_NLS
904903
void
905904
pg_bind_textdomain_codeset(const char *domainname, int encoding)
906905
{
907-
#ifdef WIN32
906+
#if defined(ENABLE_NLS) && defined(WIN32)
908907
int i;
909908

910909
for (i = 0; i < lengthof(codeset_map_array); i++)
@@ -919,7 +918,6 @@ pg_bind_textdomain_codeset(const char *domainname, int encoding)
919918
}
920919
#endif
921920
}
922-
#endif
923921

924922
void
925923
SetDefaultClientEncoding(void)

src/include/mb/pg_wchar.h

+1-3
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.86 2009/03/08 18:10:17 alvherre Exp $
9+
* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.87 2009/03/09 00:01:32 alvherre Exp $
1010
*
1111
* NOTES
1212
* This is used both by the backend and by libpq, but should not be
@@ -392,9 +392,7 @@ extern const char *pg_get_client_encoding_name(void);
392392
extern void SetDatabaseEncoding(int encoding);
393393
extern int GetDatabaseEncoding(void);
394394
extern const char *GetDatabaseEncodingName(void);
395-
#ifdef ENABLE_NLS
396395
extern void pg_bind_textdomain_codeset(const char *domainname, int encoding);
397-
#endif
398396

399397
extern int pg_valid_client_encoding(const char *name);
400398
extern int pg_valid_server_encoding(const char *name);

0 commit comments

Comments
 (0)