This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2] Untangle stddef.h a little
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, Andreas Tobler <andreast at FreeBSD dot org>, Maya Rashish <coypu at sdf dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Jun 2018 01:19:41 +0200 (CEST)
- Subject: Re: [PATCH 1/2] Untangle stddef.h a little
- References: <20180204073846.GA17915@SDF.ORG> <alpine.DEB.2.20.1806191528230.7791@digraph.polyomino.org.uk>
On Tue, 19 Jun 2018, Joseph Myers wrote:
> These two patches are OK, please commit.
I created ChangeLog entries and committed both patches (one a few
days ago, the second just now).
Thank you, Maya! If you have any further clean-ups, I'll be happy
to help by committing them (once approved).
> (GCC officially removed support for FreeBSD versions before FreeBSD 5 with
>
> r260852 | gerald | 2018-05-28 23:20:15 +0000 (Mon, 28 May 2018) | 5 lines
>
> * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
>
> * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
> and later.
>
> <https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01409.html>.)
I took this as a hint to further simplify ginclude/stddef.h. ;-)
Thanks for pointing this out, Joseph!
Okay to apply the following? Tested on x86_64-unknown-freebsd11.2.
Gerald
2018-06-24 Gerald Pfeifer <gerald@pfeifer.com>
* ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
Simplify logic for FreeBSD (twice).
Index: ginclude/stddef.h
===================================================================
--- ginclude/stddef.h (revision 261998)
+++ ginclude/stddef.h (working copy)
@@ -49,8 +49,8 @@
#if defined(__NetBSD__)
#include <machine/ansi.h>
#endif
-/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
-#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
+
+#if defined (__FreeBSD__)
#include <sys/_types.h>
#endif
@@ -194,7 +194,7 @@
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
-#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
+#if defined (__FreeBSD__) \
|| defined(__DragonFly__) \
|| defined(__FreeBSD_kernel__) \
|| defined(__VMS__)