]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94642: Remove -D_XOPEN_SOURCE from more pkg-config CFLAGS (#94657)
authorChristian Heimes <christian@python.org>
Thu, 7 Jul 2022 12:47:32 +0000 (14:47 +0200)
committerGitHub <noreply@github.com>
Thu, 7 Jul 2022 12:47:32 +0000 (14:47 +0200)
Some pkg-config pc files define CFLAGS with -D_XOPEN_SOURCE=600. We always want _XOPEN_SOURCE=700.

configure
configure.ac

index bb0625432d211ef072c44eefcee536b361fc47df..5f2830338ee8fa4f163b51ff3afbf011f1abd6a4 100755 (executable)
--- a/configure
+++ b/configure
@@ -21031,6 +21031,7 @@ fi
 
 fi
 
+READLINE_CFLAGS=$(echo $READLINE_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline" >&5
 $as_echo_n "checking how to link readline... " >&6; }
@@ -22028,7 +22029,7 @@ fi
 
 
 fi
-CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//')
+CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
 
 if test "$have_curses" = no -a "$ac_sys_system" = "Darwin"; then
 
@@ -22460,6 +22461,8 @@ fi
 
 
 fi
+PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking panel flags" >&5
 $as_echo_n "checking panel flags... " >&6; }
 if test "x$have_panel" = xno; then :
index fde61728e7ef829b19ea54c7cfeb2995280ee7e9..88219dc9b54643a5260eefdfe92a06f28f545b44 100644 (file)
@@ -5850,6 +5850,8 @@ AS_VAR_IF([with_readline], [edit], [
   ])
 ])
 
+dnl pyconfig.h defines _XOPEN_SOURCE=700
+READLINE_CFLAGS=$(echo $READLINE_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
 
 AC_MSG_CHECKING([how to link readline])
 AS_VAR_IF([with_readline], [no], [
@@ -6144,7 +6146,7 @@ AS_VAR_IF([ac_cv_header_ncurses_h], [yes], [
 
 dnl remove _XOPEN_SOURCE macro from curses cflags. pyconfig.h sets
 dnl the macro to 700.
-CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//')
+CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
 
 if test "$have_curses" = no -a "$ac_sys_system" = "Darwin"; then
   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], [
 
 ])dnl ac_cv_header_panel_h = yes
 
+dnl pyconfig.h defines _XOPEN_SOURCE=700
+PANEL_CFLAGS=$(echo $PANEL_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')
+
 AC_MSG_CHECKING([panel flags])
 AS_VAR_IF([have_panel], [no], [
   AC_MSG_RESULT([no])