diff mbox series

configure: add --disable-fix-includes

Message ID 417eca08-e1ad-538e-c39a-388e20e2fcca@suse.cz
State New
Headers show
Series configure: add --disable-fix-includes | expand

Commit Message

Martin Liška Feb. 4, 2022, 12:52 p.m. UTC
Hello.

It seems to me that fixincludes is hardy unused feature for nowadays header
files and so I'm suggesting a developer option that can skip the fixing.

How is the feature used on other targets?

Right now, fixinclude takes about 11 seconds on my machine, where
it reads (and applies regexes) 130MB of header files.

The number of fixed headers is negligible without any significant
change. I'm attaching diff that I can see on my developer machine.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

fixincludes/ChangeLog:

	* fixinc.in: Add early exit.

gcc/ChangeLog:

	* Makefile.in: Support disable_fix_includes.
	* configure.ac: Add --disable-fix-includes.
	* configure: Regenerate.
---
  fixincludes/fixinc.in |  6 ++++++
  gcc/Makefile.in       |  6 ++++--
  gcc/configure         | 21 +++++++++++++++++++--
  gcc/configure.ac      |  6 ++++++
  4 files changed, 35 insertions(+), 4 deletions(-)

Comments

Rainer Orth Feb. 4, 2022, 1:07 p.m. UTC | #1
Hi Martin,

> It seems to me that fixincludes is hardy unused feature for nowadays header
> files and so I'm suggesting a developer option that can skip the fixing.

please remember that there's a world beyond current-day Linux.

> How is the feature used on other targets?

There are still quite a number of fixes on e.g. Solaris or macOS.  And
people are still building gcc on older OS versions for one reason or
another...

> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 1171c946e6e..6015e403aa9 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -842,6 +842,12 @@ gather_stats=`if test $enable_gather_detailed_mem_stats != no; then echo 1; else
>   AC_DEFINE_UNQUOTED(GATHER_STATISTICS, $gather_stats,
>   [Define to enable detailed memory allocation stats gathering.])
>   
> +AC_ARG_ENABLE(disable-fix-includes,
> +[AS_HELP_STRING([--disable-fix-includes],

The beast is called fixincludes, no '-' or '_'.

> +		[skip fixing of includes])], [],

Better say 'running fixincludes' for example rather than being
vague/obtuse.

The new options requires documenting in install.texi.

That said, I'm not sure this is really worth yet adding another option.
And how are developers supposed to know if they can safely use it or
not.

Besides, have you actually run a regtest with that option?  I'm asking
because even on Ubuntu 20.04 fixincludes drops in it's own <limits.h>.
You need to check that dropping that is actually safe.

	Rainer
Richard Biener Feb. 4, 2022, 1:25 p.m. UTC | #2
On Fri, Feb 4, 2022 at 2:08 PM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> Hi Martin,
>
> > It seems to me that fixincludes is hardy unused feature for nowadays header
> > files and so I'm suggesting a developer option that can skip the fixing.
>
> please remember that there's a world beyond current-day Linux.
>
> > How is the feature used on other targets?
>
> There are still quite a number of fixes on e.g. Solaris or macOS.  And
> people are still building gcc on older OS versions for one reason or
> another...
>
> > diff --git a/gcc/configure.ac b/gcc/configure.ac
> > index 1171c946e6e..6015e403aa9 100644
> > --- a/gcc/configure.ac
> > +++ b/gcc/configure.ac
> > @@ -842,6 +842,12 @@ gather_stats=`if test $enable_gather_detailed_mem_stats != no; then echo 1; else
> >   AC_DEFINE_UNQUOTED(GATHER_STATISTICS, $gather_stats,
> >   [Define to enable detailed memory allocation stats gathering.])
> >
> > +AC_ARG_ENABLE(disable-fix-includes,
> > +[AS_HELP_STRING([--disable-fix-includes],
>
> The beast is called fixincludes, no '-' or '_'.
>
> > +             [skip fixing of includes])], [],
>
> Better say 'running fixincludes' for example rather than being
> vague/obtuse.
>
> The new options requires documenting in install.texi.
>
> That said, I'm not sure this is really worth yet adding another option.
> And how are developers supposed to know if they can safely use it or
> not.
>
> Besides, have you actually run a regtest with that option?  I'm asking
> because even on Ubuntu 20.04 fixincludes drops in it's own <limits.h>.
> You need to check that dropping that is actually safe.

limits.h and syslimits.h are the only include-fixed we "ship" in our
packages.  Not sure if they are really required though.

Richard.

>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
Jakub Jelinek Feb. 4, 2022, 1:30 p.m. UTC | #3
On Fri, Feb 04, 2022 at 02:25:17PM +0100, Richard Biener via Gcc-patches wrote:
> > Besides, have you actually run a regtest with that option?  I'm asking
> > because even on Ubuntu 20.04 fixincludes drops in it's own <limits.h>.
> > You need to check that dropping that is actually safe.
> 
> limits.h and syslimits.h are the only include-fixed we "ship" in our
> packages.  Not sure if they are really required though.

We don't ship any include-fixed headers in Fedora/RHEL.
If there is an important need for fixing, it should be in Linux
distributions fixed by actually fixing the headers in their corresponding
packages, making modified copies of headers at gcc build time and overriding
through that headers from other packages that can change doesn't really work
properly when those headers ever change.  I know we could install the
fixincludes tool and trigger running it whenever any of such headers change
in other packages, but that is very expensive for very little gain.

On other targets I understand fixincludes is much more important.

	Jakub
Martin Liška Feb. 4, 2022, 3:01 p.m. UTC | #4
On 2/4/22 14:30, Jakub Jelinek via Gcc-patches wrote:
> On Fri, Feb 04, 2022 at 02:25:17PM +0100, Richard Biener via Gcc-patches wrote:
>>> Besides, have you actually run a regtest with that option?  I'm asking
>>> because even on Ubuntu 20.04 fixincludes drops in it's own <limits.h>.
>>> You need to check that dropping that is actually safe.
>>
>> limits.h and syslimits.h are the only include-fixed we "ship" in our
>> packages.  Not sure if they are really required though.
> 
> We don't ship any include-fixed headers in Fedora/RHEL.
> If there is an important need for fixing, it should be in Linux
> distributions fixed by actually fixing the headers in their corresponding
> packages, making modified copies of headers at gcc build time and overriding
> through that headers from other packages that can change doesn't really work
> properly when those headers ever change.  I know we could install the
> fixincludes tool and trigger running it whenever any of such headers change
> in other packages, but that is very expensive for very little gain.

I fully agree with the suggested approach! I've also noticed the script makes
modifications in comments (that are unnecessary), plus it effectively breaks
header files for things like:

$ diff /usr/lib64/gcc/aarch64-suse-linux/11/include-fixed/bits/unistd_ext.h /usr/aarch64-suse-linux/sys-root/usr/include/bits/unistd_ext.h

46c37
< # if __has_include ("__linux__/close_range.h")
---
> # if __has_include ("linux/close_range.h")

I would suggest removing the fixed includes in openSUSE as well?

Martin

> 
> On other targets I understand fixincludes is much more important.
> 
> 	Jakub
>
Martin Liška Feb. 4, 2022, 3:02 p.m. UTC | #5
On 2/4/22 14:07, Rainer Orth wrote:
> Hi Martin,
> 
>> It seems to me that fixincludes is hardy unused feature for nowadays header
>> files and so I'm suggesting a developer option that can skip the fixing.
> 
> please remember that there's a world beyond current-day Linux.

Sure! That's why I'm suggesting an option and not removing the machinery.

> 
>> How is the feature used on other targets?
> 
> There are still quite a number of fixes on e.g. Solaris or macOS.  And
> people are still building gcc on older OS versions for one reason or
> another...
> 
>> diff --git a/gcc/configure.ac b/gcc/configure.ac
>> index 1171c946e6e..6015e403aa9 100644
>> --- a/gcc/configure.ac
>> +++ b/gcc/configure.ac
>> @@ -842,6 +842,12 @@ gather_stats=`if test $enable_gather_detailed_mem_stats != no; then echo 1; else
>>    AC_DEFINE_UNQUOTED(GATHER_STATISTICS, $gather_stats,
>>    [Define to enable detailed memory allocation stats gathering.])
>>    
>> +AC_ARG_ENABLE(disable-fix-includes,
>> +[AS_HELP_STRING([--disable-fix-includes],
> 
> The beast is called fixincludes, no '-' or '_'.
> 
>> +		[skip fixing of includes])], [],
> 
> Better say 'running fixincludes' for example rather than being
> vague/obtuse.

Note using --disable-fixinclude effectively disables building of everything in the folder.
That's not what I want, it breaks GCC build.

> 
> The new options requires documenting in install.texi.
> 
> That said, I'm not sure this is really worth yet adding another option.
> And how are developers supposed to know if they can safely use it or
> not.

Sure.

> 
> Besides, have you actually run a regtest with that option?  I'm asking
> because even on Ubuntu 20.04 fixincludes drops in it's own <limits.h>.
> You need to check that dropping that is actually safe.

Let me try that.

Martin

> 
> 	Rainer
>
Martin Liška Feb. 4, 2022, 3:22 p.m. UTC | #6
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?

Thanks,
Martin
Allan McRae Feb. 5, 2022, 2:26 a.m. UTC | #7
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

My understanding are these are not real fixinclude processed headers.

Allan
Martin Liška Feb. 28, 2022, 8:36 a.m. UTC | #8
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
diff mbox series

Patch

--- /usr/include/X11/Xw32defs.h	2022-01-07 13:52:15.000000000 +0100
+++ include-fixed/X11/Xw32defs.h	2022-02-04 07:55:06.956493417 +0100
@@ -1,7 +1,16 @@ 
 #ifndef _XW32DEFS_H
 # define  _XW32DEFS_H
 
-# ifdef __GNUC__ /* mingw is more close to unix than msvc */
+# ifdef __GNUC__ /* mingw is more close to __unix__ than msvc */
 #  if !defined(__daddr_t_defined)
 typedef char *caddr_t;
 #  endif
--- /usr/include/boost/predef/os/unix.h	2022-01-07 16:20:53.000000000 +0100
+++ include-fixed/boost/predef/os/unix.h	2022-02-04 07:55:06.564496142 +0100
@@ -1,3 +1,12 @@ 
 /*
 Copyright Rene Rivera 2008-2015
 Distributed under the Boost Software License, Version 1.0.
@@ -29,7 +38,7 @@ 
 
 #define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE
 
-#if defined(unix) || defined(__unix) || \
+#if defined(__unix__) || defined(__unix) || \
     defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
 #   undef BOOST_OS_UNIX
 #   define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE
--- /usr/include/schily/prototyp.h	2022-01-07 15:51:33.000000000 +0100
+++ include-fixed/schily/prototyp.h	2022-02-04 07:55:04.260512155 +0100
@@ -1,3 +1,12 @@ 
 /*
  *	Definitions for dealing with ANSI / KR C-Compilers
@@ -54,7 +63,7 @@ 
 #		if	__STDC__				/* ANSI C */
 #			define	PROTOTYPES
 #		endif
-#		if	defined(sun) && __STDC__ - 0 == 0	/* Sun C */
+#		if	defined(sun) &&  !defined(__STRICT_ANSI__)	/* Sun C */
 #			define	PROTOTYPES
 #		endif
 #	endif
--- /usr/include/schily/mconfig.h	2022-01-07 15:51:33.000000000 +0100
+++ include-fixed/schily/mconfig.h	2022-02-04 07:55:04.244512265 +0100
@@ -1,3 +1,12 @@ 
 /*
  *	definitions for machine configuration
@@ -106,7 +115,7 @@ 
 #	define	IS_GCC_WIN32
 #	define	IS_CYGWIN
 
-#if	defined(unix) || defined(_X86)
+#if	defined(__unix__) || defined(_X86)
 #	define	IS_CYGWIN_1
 #endif
 #endif
--- /usr/include/nss3/secport.h	2022-01-26 21:37:21.000000000 +0100
+++ include-fixed/nss3/secport.h	2022-02-04 07:55:04.232512351 +0100
@@ -1,3 +1,12 @@ 
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -33,7 +42,7 @@ 
 #endif
 #endif
 
-#ifdef unix
+#ifdef __unix__
 #ifndef XP_UNIX
 #define XP_UNIX
 #endif
--- /usr/include/msgpack/predef/os/unix.h	2019-07-04 06:36:12.000000000 +0200
+++ include-fixed/msgpack/predef/os/unix.h	2022-02-04 07:55:03.136519966 +0100
@@ -1,3 +1,12 @@ 
 Copyright Rene Rivera 2008-2015
 Distributed under the Boost Software License, Version 1.0.
@@ -28,7 +37,7 @@ 
 
 #define MSGPACK_OS_UNIX MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
 
-#if defined(unix) || defined(__unix) || \
+#if defined(__unix__) || defined(__unix) || \
     defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
 #   undef MSGPACK_OS_UNIX
 #   define MSGPACK_OS_UNIX MSGPACK_VERSION_NUMBER_AVAILABLE
--- /usr/include/msgpack/predef/os/linux.h	2019-07-04 06:36:12.000000000 +0200
+++ include-fixed/msgpack/predef/os/linux.h	2022-02-04 07:55:03.136519966 +0100
@@ -1,3 +1,12 @@ 
 Copyright Rene Rivera 2008-2015
 Distributed under the Boost Software License, Version 1.0.
@@ -27,7 +36,7 @@ 
 #define MSGPACK_OS_LINUX MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
 
 #if !defined(MSGPACK_PREDEF_DETAIL_OS_DETECTED) && ( \
-    defined(linux) || defined(__linux) \
+    defined(__linux__) || defined(__linux) \
     )
 #   undef MSGPACK_OS_LINUX
 #   define MSGPACK_OS_LINUX MSGPACK_VERSION_NUMBER_AVAILABLE
--- /usr/include/msgpack/sysdep.h	2020-02-19 10:21:46.000000000 +0100
+++ include-fixed/msgpack/sysdep.h	2022-02-04 07:55:03.124520052 +0100
@@ -1,3 +1,12 @@ 
  * MessagePack system dependencies
  *
@@ -87,7 +96,7 @@ 
 #elif defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
 
 #include <arpa/inet.h>  /* __BYTE_ORDER */
-#   if defined(linux)
+#   if defined(__linux__)
 #       include <byteswap.h>
 #   endif
 
@@ -99,7 +108,7 @@ 
 
 #if MSGPACK_ENDIAN_LITTLE_BYTE
 
-#   if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
+#   if defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
 #       define _msgpack_be16(x) ntohs((uint16_t)x)
 #   else
 #       if defined(ntohs)
@@ -113,7 +122,7 @@ 
 #        endif
 #   endif
 
-#   if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
+#   if defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
 #       define _msgpack_be32(x) ntohl((uint32_t)x)
 #   else
 #       if defined(ntohl)
--- /usr/include/msgpack/vrefbuffer.h	2020-02-19 10:21:46.000000000 +0100
+++ include-fixed/msgpack/vrefbuffer.h	2022-02-04 07:55:03.124520052 +0100
@@ -1,3 +1,12 @@ 
  * MessagePack for C zero-copy buffer implementation
  *
@@ -13,7 +22,7 @@ 
 #include "zone.h"
 #include <stdlib.h>
 
-#if defined(unix) || defined(__unix) || defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__QNX__) || defined(__QNXTO__) || defined(__HAIKU__)
+#if defined(__unix__) || defined(__unix) || defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__QNX__) || defined(__QNXTO__) || defined(__HAIKU__)
 #include <sys/uio.h>
 #else
 struct iovec {
--- /usr/include/xorg/compiler.h	2022-01-07 20:21:20.000000000 +0100
+++ include-fixed/xorg/compiler.h	2022-02-04 07:55:02.816522192 +0100
@@ -1,3 +1,12 @@ 
  * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
  *
@@ -936,7 +945,7 @@ 
 #endif                          /* arch madness */
 
 #else                           /* !GNUC */
-#if defined(__STDC__) && (__STDC__ == 1)
+#if defined(__STDC__) && ( defined(__STRICT_ANSI__))
 #ifndef asm
 #define asm __asm
 #endif
--- /usr/include/xorg/edid.h	2022-01-07 20:21:20.000000000 +0100
+++ include-fixed/xorg/edid.h	2022-02-04 07:55:02.812522221 +0100
@@ -1,3 +1,12 @@ 
  * edid.h: defines to parse an EDID block
  *
@@ -336,7 +345,7 @@ 
 #define ADD_DUMMY 0x10
 
 #define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN))
-#define NEXT_DT_MD_SECTION _NEXT_DT_MD_SECTION(c)
+#define NEXT_DT_MD_SECTION _NEXT_DT_MD_SECTION('c')
 
 #endif                          /* _PARSE_EDID_ */
 
--- /usr/include/smbios_c/config/suffix.h	2022-01-07 18:58:09.000000000 +0100
+++ include-fixed/smbios_c/config/suffix.h	2022-02-04 07:55:01.748529615 +0100
@@ -1,3 +1,12 @@ 
 
 //  (C) Copyright John Maddock 2001 - 2003.
@@ -178,7 +187,7 @@ 
 #     define LIBSMBIOS_C_STDLIB "Unknown ISO standard library"
 #  endif
 #  ifndef LIBSMBIOS_C_PLATFORM
-#     if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
+#     if defined(__unix__) || defined(__unix) || defined(_XOPEN_SOURCE) \
          || defined(_POSIX_SOURCE)
 #        define LIBSMBIOS_C_PLATFORM "Generic Unix"
 #     else
--- /usr/include/zutil.h	2022-01-07 13:52:59.000000000 +0100
+++ include-fixed/zutil.h	2022-02-04 07:55:06.592495947 +0100
@@ -1,3 +1,12 @@ 
  * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
@@ -86,7 +95,7 @@ 
 #  define OS_CODE  0x00
 #  ifndef Z_SOLO
 #    if defined(__TURBOC__) || defined(__BORLANDC__)
-#      if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+#      if ( defined(__STRICT_ANSI__)) && (defined(__LARGE__) || defined(__COMPACT__))
          /* Allow compilation with ANSI keywords only enabled */
          void _Cdecl farfree( void *block );
          void *_Cdecl farmalloc( unsigned long nbytes );
--- /usr/include/slang.h	2022-01-02 16:15:25.000000000 +0100
+++ include-fixed/slang.h	2022-02-04 07:55:04.780508542 +0100
@@ -1,3 +1,12 @@ 
 #define DAVIS_SLANG_H_
 /* -*- mode: C; mode: fold; -*- */
@@ -43,7 +52,7 @@ 
 # endif
 #endif /* __watcomc__ */
 
-#if defined(unix) || defined(__unix)
+#if defined(__unix__) || defined(__unix)
 # ifndef __unix__
 #  define __unix__ 1
 # endif
--- /usr/include/libv4lconvert.h	2022-01-07 17:40:48.000000000 +0100
+++ include-fixed/libv4lconvert.h	2022-02-04 07:55:03.332518604 +0100
@@ -1,3 +1,12 @@ 
 #             (C) 2008 Hans de Goede <hdegoede@redhat.com>
 
@@ -22,7 +31,7 @@ 
 /* These headers are not needed by us, but by linux/videodev2.h,
    which is broken on some systems and doesn't include them itself :( */
 
-#ifdef linux
+#ifdef __linux__
 #include <sys/time.h>
 #include <linux/types.h>
 #include <linux/ioctl.h>
--- /usr/include/libv4l1-videodev.h	2022-01-07 17:40:50.000000000 +0100
+++ include-fixed/libv4l1-videodev.h	2022-02-04 07:55:02.224526305 +0100
@@ -1,8 +1,17 @@ 
 #ifndef __LINUX_VIDEODEV_H
 #define __LINUX_VIDEODEV_H
 
-#ifdef linux
+#ifdef __linux__
 #include <linux/ioctl.h>
 #endif
 
--- /usr/include/pthread.h	2022-01-07 13:57:55.000000000 +0100
+++ include-fixed/pthread.h	2022-02-04 07:55:01.684530061 +0100
@@ -1,3 +1,12 @@ 
    This file is part of the GNU C Library.
 
@@ -770,7 +779,7 @@ 
 #else
 # define __sigsetjmp_cancel(env, savemask) \
   __sigsetjmp ((struct __jmp_buf_tag *) (void *) (env), (savemask))
-extern int __sigsetjmp (struct __jmp_buf_tag __env[1],
+extern int __sigsetjmp (struct __jmp_buf_tag *__env,
 			int __savemask) __THROWNL;
 #endif