diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_upgrade/pg_upgrade.c | 4 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/port/chklocale.c | 20 |
3 files changed, 1 insertions, 26 deletions
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c index 99f3d4543e9..663235816f8 100644 --- a/src/bin/pg_upgrade/pg_upgrade.c +++ b/src/bin/pg_upgrade/pg_upgrade.c @@ -40,10 +40,6 @@ #include <time.h> -#ifdef HAVE_LANGINFO_H -#include <langinfo.h> -#endif - #include "catalog/pg_class_d.h" #include "common/file_perm.h" #include "common/logging.h" diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 0e9b108e667..979925cc2e2 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -238,9 +238,6 @@ /* Define to 1 if you have the `kqueue' function. */ #undef HAVE_KQUEUE -/* Define to 1 if you have the <langinfo.h> header file. */ -#undef HAVE_LANGINFO_H - /* Define to 1 if you have the `ldap_initialize' function. */ #undef HAVE_LDAP_INITIALIZE diff --git a/src/port/chklocale.c b/src/port/chklocale.c index 8cb81c8640e..a0cc52c38df 100644 --- a/src/port/chklocale.c +++ b/src/port/chklocale.c @@ -19,7 +19,7 @@ #include "postgres_fe.h" #endif -#ifdef HAVE_LANGINFO_H +#ifndef WIN32 #include <langinfo.h> #endif @@ -287,8 +287,6 @@ pg_codepage_to_encoding(UINT cp) #endif #endif /* WIN32 */ -#if (defined(HAVE_LANGINFO_H) && defined(CODESET)) || defined(WIN32) - /* * Given a setting for LC_CTYPE, return the Postgres ID of the associated * encoding, if we can determine it. Return -1 if we can't determine it. @@ -415,19 +413,3 @@ pg_get_encoding_from_locale(const char *ctype, bool write_message) free(sys); return -1; } -#else /* (HAVE_LANGINFO_H && CODESET) || WIN32 */ - -/* - * stub if no multi-language platform support - * - * Note: we could return -1 here, but that would have the effect of - * forcing users to specify an encoding to initdb on such platforms. - * It seems better to silently default to SQL_ASCII. - */ -int -pg_get_encoding_from_locale(const char *ctype, bool write_message) -{ - return PG_SQL_ASCII; -} - -#endif /* (HAVE_LANGINFO_H && CODESET) || WIN32 */ |