Skip to content

Commit 7759409

Browse files
committed
Fix support for older macOS by always defining LOCALE_T_IN_XLOCALE
This unintentionally got removed when re-running the extract_source logic on macOS 15.4, which no longer requires LOCALE_T_IN_XLOCALE to be set.
1 parent bd28f07 commit 7759409

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

scripts/pg_config_overrides.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
/* This causes compatibility problems on some Linux distros, with "xlocale.h" not being available */
2-
#ifndef __APPLE__
1+
/*
2+
* Assume we don't have xlocale.h on non-MacOS, as not all Linux distros have "xlocale.h" available.
3+
*
4+
* Note this is required on older MacOS to avoid "unknown type name 'locale_t'"
5+
*/
36
#undef LOCALE_T_IN_XLOCALE
7+
#ifdef __APPLE__
8+
#define LOCALE_T_IN_XLOCALE 1
49
#endif
510
#undef WCSTOMBS_L_IN_XLOCALE
611

src/postgres/include/pg_config.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -820,9 +820,14 @@
820820

821821
/* Define to how the compiler spells `typeof'. */
822822
/* #undef typeof */
823-
/* This causes compatibility problems on some Linux distros, with "xlocale.h" not being available */
824-
#ifndef __APPLE__
823+
/*
824+
* Assume we don't have xlocale.h on non-MacOS, as not all Linux distros have "xlocale.h" available.
825+
*
826+
* Note this is required on older MacOS to avoid "unknown type name 'locale_t'"
827+
*/
825828
#undef LOCALE_T_IN_XLOCALE
829+
#ifdef __APPLE__
830+
#define LOCALE_T_IN_XLOCALE 1
826831
#endif
827832
#undef WCSTOMBS_L_IN_XLOCALE
828833

0 commit comments

Comments
 (0)