Description
While analyzing some unrelated cpython CI run, I met the folowing warning (highlighting is mine):
2022-07-06T19:04:46.9332000Z gcc -pthread -fPIC -Wsign-compare -g -Og -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I../cpython-ro-srcdir/Include/internal -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/readline -I../cpython-ro-srcdir/Include -IObjects -IPython -I. -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/home/runner/work/cpython/cpython-ro-srcdir/Include -I/home/runner/work/cpython/cpython-builddir -c /home/runner/work/cpython/cpython-ro-srcdir/Modules/readline.c -o build/temp.linux-x86_64-3.12-pydebug/home/runner/work/cpython/cpython-ro-srcdir/Modules/readline.o
2022-07-06T19:04:46.9425858Z In file included from ../cpython-ro-srcdir/Include/Python.h:12,
2022-07-06T19:04:46.9426664Z from /home/runner/work/cpython/cpython-ro-srcdir/Modules/readline.c:8:
2022-07-06T19:04:46.9427267Z ./pyconfig.h:1762: warning: "_XOPEN_SOURCE" redefined
2022-07-06T19:04:46.9427830Z 1762 | #define _XOPEN_SOURCE 700
2022-07-06T19:04:46.9428471Z |
According to it:
- Makefile passes
-D_XOPEN_SOURCE=600
twice - The passed definition is forcedly overwritten by
#define _XOPEN_SOURCE 700
(maybe it should be wrapped in#ifndef
instead?)