summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut2025-03-28 20:27:37 +0000
committerPeter Eisentraut2025-03-28 20:27:37 +0000
commit3c8e463b0d885e0d976f6a13a1fb78187b25c86f (patch)
tree081e2a55ca02580aa2b069fb0ede573392e98a0d /src/include
parent6be53c27673a5fca64a00a684c36c29db6ca33a5 (diff)
Revert "Tidy up locale thread safety in ECPG library."
This reverts commit 8e993bff5326b00ced137c837fce7cd1e0ecae14. It causes various build failures on the buildfarm, to be investigated. Discussion: https://postgr.es/m/CWZBBRR6YA8D.8EHMDRGLCKCD%40neon.tech
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pg_config.h.in6
-rw-r--r--src/include/port.h31
-rw-r--r--src/include/port/win32_port.h1
3 files changed, 0 insertions, 38 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index c2427bc9988..c6f055b3905 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -355,9 +355,6 @@
/* Define to 1 if you have the `setproctitle_fast' function. */
#undef HAVE_SETPROCTITLE_FAST
-/* Define to 1 if you have the `snprintf_l' function. */
-#undef HAVE_SNPRINTF_L
-
/* Define to 1 if the system has the type `socklen_t'. */
#undef HAVE_SOCKLEN_T
@@ -403,9 +400,6 @@
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
-/* Define to 1 if you have the `strtod_l' function. */
-#undef HAVE_STRTOD_L
-
/* Define to 1 if the system has the type `struct option'. */
#undef HAVE_STRUCT_OPTION
diff --git a/src/include/port.h b/src/include/port.h
index 8df0ac59992..3faae03d246 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -218,37 +218,6 @@ extern int pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_printf(2,
extern int pg_vprintf(const char *fmt, va_list args) pg_attribute_printf(1, 0);
extern int pg_printf(const char *fmt,...) pg_attribute_printf(1, 2);
-/*
- * A couple of systems offer a fast constant locale_t value representing the
- * "C" locale. We use that if possible, but fall back to creating a singleton
- * object otherwise. To check that it is available, call pg_ensure_c_locale()
- * and assume out of memory if it returns false.
- */
-#ifdef LC_C_LOCALE
-#define PG_C_LOCALE LC_C_LOCALE
-#define pg_ensure_c_locale() true
-#else
-extern locale_t pg_get_c_locale(void);
-#define PG_C_LOCALE pg_get_c_locale()
-#define pg_ensure_c_locale() (PG_C_LOCALE != 0)
-#endif
-
-#if !defined(HAVE_STRTOD_L) && !defined(WIN32)
-/*
- * POSIX doesn't define this function, but we can implement it with thread-safe
- * save-and-restore.
- */
-static inline double
-strtod_l(const char *nptr, char **endptr, locale_t loc)
-{
- locale_t save = uselocale(loc);
- double result = strtod(nptr, endptr);
-
- uselocale(save);
- return result;
-}
-#endif
-
#ifndef WIN32
/*
* We add a pg_ prefix as a warning that the Windows implementations have the
diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h
index ff0b7a0de18..ff7028bdc81 100644
--- a/src/include/port/win32_port.h
+++ b/src/include/port/win32_port.h
@@ -453,7 +453,6 @@ extern int _pglstat64(const char *name, struct stat *buf);
#define isspace_l _isspace_l
#define iswspace_l _iswspace_l
#define strcoll_l _strcoll_l
-#define strtod_l _strtod_l
#define strxfrm_l _strxfrm_l
#define wcscoll_l _wcscoll_l