Commit e43fd897 authored by Alvaro Herrera's avatar Alvaro Herrera

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.
parent ace2b067
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (currently mule internal code (mic) is used) * (currently mule internal code (mic) is used)
* Tatsuo Ishii * Tatsuo Ishii
* *
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.81 2009/03/08 18:10:16 alvherre Exp $ * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.82 2009/03/09 00:01:32 alvherre Exp $
*/ */
#include "postgres.h" #include "postgres.h"
...@@ -900,11 +900,10 @@ SetDatabaseEncoding(int encoding) ...@@ -900,11 +900,10 @@ SetDatabaseEncoding(int encoding)
* On Windows, we need to explicitly bind gettext to the correct * On Windows, we need to explicitly bind gettext to the correct
* encoding, because gettext() tends to get confused. * encoding, because gettext() tends to get confused.
*/ */
#ifdef ENABLE_NLS
void void
pg_bind_textdomain_codeset(const char *domainname, int encoding) pg_bind_textdomain_codeset(const char *domainname, int encoding)
{ {
#ifdef WIN32 #if defined(ENABLE_NLS) && defined(WIN32)
int i; int i;
for (i = 0; i < lengthof(codeset_map_array); i++) for (i = 0; i < lengthof(codeset_map_array); i++)
...@@ -919,7 +918,6 @@ pg_bind_textdomain_codeset(const char *domainname, int encoding) ...@@ -919,7 +918,6 @@ pg_bind_textdomain_codeset(const char *domainname, int encoding)
} }
#endif #endif
} }
#endif
void void
SetDefaultClientEncoding(void) SetDefaultClientEncoding(void)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.86 2009/03/08 18:10:17 alvherre Exp $ * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.87 2009/03/09 00:01:32 alvherre Exp $
* *
* NOTES * NOTES
* This is used both by the backend and by libpq, but should not be * 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); ...@@ -392,9 +392,7 @@ extern const char *pg_get_client_encoding_name(void);
extern void SetDatabaseEncoding(int encoding); extern void SetDatabaseEncoding(int encoding);
extern int GetDatabaseEncoding(void); extern int GetDatabaseEncoding(void);
extern const char *GetDatabaseEncodingName(void); extern const char *GetDatabaseEncodingName(void);
#ifdef ENABLE_NLS
extern void pg_bind_textdomain_codeset(const char *domainname, int encoding); extern void pg_bind_textdomain_codeset(const char *domainname, int encoding);
#endif
extern int pg_valid_client_encoding(const char *name); extern int pg_valid_client_encoding(const char *name);
extern int pg_valid_server_encoding(const char *name); extern int pg_valid_server_encoding(const char *name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment