Skip to content

Commit 29f86d6

Browse files
authored
gh-94642: Remove -D_XOPEN_SOURCE from more pkg-config CFLAGS (#94657)
Some pkg-config pc files define CFLAGS with -D_XOPEN_SOURCE=600. We always want _XOPEN_SOURCE=700.
1 parent ed136b9 commit 29f86d6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

configure

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5850,6 +5850,8 @@ AS_VAR_IF([with_readline], [edit], [
58505850
])
58515851
])
58525852

5853+
dnl pyconfig.h defines _XOPEN_SOURCE=700
5854+
READLINE_CFLAGS=$(echo $READLINE_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
58535855

58545856
AC_MSG_CHECKING([how to link readline])
58555857
AS_VAR_IF([with_readline], [no], [
@@ -6144,7 +6146,7 @@ AS_VAR_IF([ac_cv_header_ncurses_h], [yes], [
61446146

61456147
dnl remove _XOPEN_SOURCE macro from curses cflags. pyconfig.h sets
61466148
dnl the macro to 700.
6147-
CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//')
6149+
CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
61486150

61496151
if test "$have_curses" = no -a "$ac_sys_system" = "Darwin"; then
61506152
dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw.
@@ -6204,6 +6206,9 @@ AS_VAR_IF([ac_cv_header_panel_h], [yes], [
62046206
62056207
])dnl ac_cv_header_panel_h = yes
62066208

6209+
dnl pyconfig.h defines _XOPEN_SOURCE=700
6210+
PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
6211+
62076212
AC_MSG_CHECKING([panel flags])
62086213
AS_VAR_IF([have_panel], [no], [
62096214
AC_MSG_RESULT([no])

0 commit comments

Comments
 (0)