On 2/5/22 03:26, Allan McRae wrote:
On 5/2/22 01:22, Martin Liška wrote:
On 2/4/22 14:30, Jakub Jelinek via Gcc-patches wrote:
We don't ship any include-fixed headers in Fedora/RHEL.
Removing include-fixed from an installed folder, I see:
make[2]: Entering directory '/home/marxin/Programming/postgres/src/common'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O3 -march=native -flto=auto -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -DVAL_CC="\"gcc\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O3 -march=native -flto=auto\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-O3 -march=native -flto=auto -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib64',--enable-new-dtags\"" -DVAL_LDFLAGS_EX="\"\""
-DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lz -lreadline -lm \"" -c -o pg_lzcompress.o pg_lzcompress.c
In file included from pg_lzcompress.c:186:
/usr/include/limits.h:124:26: error: no include path in which to search for
limits.h
124 | # include_next <limits.h>
| ^
pg_lzcompress.c:226:9: error: ‘INT_MAX’ undeclared here (not in a function)
226 | INT_MAX, /* No upper
limit on what we'll try to
| ^~~~~~~
pg_lzcompress.c:189:1: note: ‘INT_MAX’ is defined in header ‘<limits.h>’; did you
forget to ‘#include <limits.h>’?
188 | #include "common/pg_lzcompress.h"
+++ |+#include <limits.h>
How do you solve this in Fedora/RHEL?
The Fedora gcc.spec file has this:
mv $FULLPATH/include-fixed/syslimits.h $FULLPATH/include/syslimits.h
mv $FULLPATH/include-fixed/limits.h $FULLPATH/include/limits.h
Yes, I noticed that as well.
My understanding are these are not real fixinclude processed headers.
You are correct. I've just prepared a patch that would exclude these 2 header
files
from include-fixed. I'm planning the patch for next stage1.
Martin
Allan