Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 2024 09:41:04 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Pedro Giffuni <pfg@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>,  "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org>, Warner Losh <imp@freebsd.org>
Subject:   Re: git: d5c01e1124ff - main - cdefs.h: Remove pre gcc 5.0 support
Message-ID:  <CANCZdfpjPUeCk4rfiAq5_zisG0yKWfMbMBM-0v3JrCqAQK1NkQ@mail.gmail.com>
In-Reply-To: <62379069.705510.1719242645494@mail.yahoo.com>
References:  <202406210241.45L2fQZA057110@gitrepo.freebsd.org> <111875645.165697.1719082066518@mail.yahoo.com> <CANCZdfornovuQ4zJMxBqbgdEO7rZu9pF1LyoyKRiuadCyKi02w@mail.gmail.com> <62379069.705510.1719242645494@mail.yahoo.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Mon, Jun 24, 2024 at 9:25 AM Pedro Giffuni <pfg@freebsd.org> wrote:

> I do welcome the cleanup, of course, just I would have defined GCC 4.2 as
> the breaking point instead of 5.0.
>

The breaking point is headed to gcc9 and clang11. There's no compelling
FreeBSD project use case where people need to compile FreeBSD programs with
compilers older than that. Though the difference matters mostly to
compiling FreeBSD itself (which doesn't work with gcc older than 12 or 13
or clang older than a couple of releases. The delta for the system headers
is approximately 0 for all these changes, though, since most of the
#defines are for FreeBSD itself, not our headers.


> Due basically to the licensing issues, GCC 4.2 became a natural reference
> for GCC versions.  At some point there were vendors actually shipping
> FreeBSD with GCC 4.2, and it was not a huge cost to keep GCC versions
> above 4.2 properly discriminated.
>

True... But that's ancient history at this point...


> But then you are right that it doesn't really matter that much. At least
> the alloc_size attributes are only defined for the FORTIFY_SOURCE in some
> linux libc implementation that I looked at. We define them unconditionally
> but I don't recall them being useful.
>

We use them in a few dozen places in the tree, but the only visible ones to
system headers are for malloc, calloc and realloc. Keeping the fringe
definitions wasn't too useful, but if they turn out to be less than fringe,
I'll cope. Most of the odd edge cases we had, though, were poorly
documented and/or had the versions wrong because of transient bugs in gcc.
:(. It's time to start over.

Of course, sys/cdefs.h could also benefit from some reorg, and a man page,
but one thing at a time.

Warner

Indeed. But none of the ones that I removed are affected by this quirk
> since they are true for clang all versions.
>
> Warner
>
> On Sat, Jun 22, 2024 at 12:47 PM Pedro Giffuni <pfg@freebsd.org> wrote:
>
> It was long ago when I last touched this but FWIW ...
>
> clang used to report itself as GCC 4.2 and kept it's GCC extension support
> level consistent with that version so these version numbers were relevant.
>
> Pedro.
>
> On Thursday, June 20, 2024 at 09:41:34 PM GMT-5, Warner Losh <
> imp@freebsd.org> wrote:
>
>
> The branch main has been updated by imp:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=d5c01e1124ffa4adb2513e7e8d708d7072dbfc75
>
> commit d5c01e1124ffa4adb2513e7e8d708d7072dbfc75
> Author:    Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-06-20 23:03:15 +0000
> Commit:    Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-06-21 02:41:09 +0000
>
>     cdefs.h: Remove pre gcc 5.0 support
>
>     Reviewed by:            brooks
>     Differential Revision:  https://reviews.freebsd.org/D45656
>     Sponsored by:          Netflix
> ---
> sys/sys/cdefs.h | 54 ------------------------------------------------------
> 1 file changed, 54 deletions(-)
>
> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
> index a6ecdca5d8b9..43d179b82020 100644
> --- a/sys/sys/cdefs.h
> +++ b/sys/sys/cdefs.h
> @@ -164,18 +164,9 @@
> #define    __aligned(x)    __attribute__((__aligned__(x)))
> #define    __section(x)    __attribute__((__section__(x)))
> #define    __writeonly    __unused
> -#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)
> #define    __alloc_size(x)    __attribute__((__alloc_size__(x)))
> #define    __alloc_size2(n, x)    __attribute__((__alloc_size__(n, x)))
> -#else
> -#define    __alloc_size(x)
> -#define    __alloc_size2(n, x)
> -#endif
> -#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)
> #define    __alloc_align(x)    __attribute__((__alloc_align__(x)))
> -#else
> -#define    __alloc_align(x)
> -#endif
>
> /*
>   * Keywords added in C11.
> @@ -199,15 +190,6 @@
> #define    _Alignof(x)        __alignof(x)
> #endif
>
> -#if !defined(__cplusplus) && !__has_extension(c_atomic) && \
> -    !__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7)
> -/*
> - * No native support for _Atomic(). Place object in structure to prevent
> - * most forms of direct non-atomic access.
> - */
> -#define    _Atomic(T)        struct { T volatile __val; }
> -#endif
> -
> #if defined(__cplusplus) && __cplusplus >= 201103L
> #define    _Noreturn        [[noreturn]]
> #else
> @@ -218,15 +200,6 @@
> #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
>     __has_extension(cxx_static_assert)
> #define    _Static_assert(x, y)    static_assert(x, y)
> -#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus)
> -/* Nothing, gcc 4.6 and higher has _Static_assert built-in */
> -#elif defined(__COUNTER__)
> -#define    _Static_assert(x, y)    __Static_assert(x, __COUNTER__)
> -#define    __Static_assert(x, y)    ___Static_assert(x, y)
> -#define    ___Static_assert(x, y)    typedef char __assert_ ## y[(x) ? 1
> : -1] \
> -                __unused
> -#else
> -#define    _Static_assert(x, y)    struct __hack
> #endif
> #endif
>
> @@ -276,7 +249,6 @@
>   * void bar(int myArray[__min_size(10)]);
>   */
> #if !defined(__cplusplus) && \
> -    (defined(__clang__) || __GNUC_PREREQ__(4, 6)) && \
>     (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >= 199901))
> #define __min_size(x)    static (x)
> #else
> @@ -302,17 +274,9 @@
> #define    __result_use_or_ignore_check
> #endif /* !__clang__ */
>
> -#if __GNUC_PREREQ__(4, 1)
> #define    __returns_twice    __attribute__((__returns_twice__))
> -#else
> -#define    __returns_twice
> -#endif
>
> -#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable)
> #define    __unreachable()    __builtin_unreachable()
> -#else
> -#define    __unreachable()    ((void)0)
> -#endif
>
> #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
> #define    __LONG_LONG_SUPPORTED
> @@ -353,33 +317,15 @@
> #define    __predict_true(exp)    __builtin_expect((exp), 1)
> #define    __predict_false(exp)    __builtin_expect((exp), 0)
>
> -#if __GNUC_PREREQ__(4, 0)
> #define    __null_sentinel    __attribute__((__sentinel__))
> #define    __exported    __attribute__((__visibility__("default")))
> #define    __hidden    __attribute__((__visibility__("hidden")))
> -#else
> -#define    __null_sentinel
> -#define    __exported
> -#define    __hidden
> -#endif
>
> /*
>   * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
>   * require it.
>   */
> -#if __GNUC_PREREQ__(4, 1)
> #define    __offsetof(type, field)    __builtin_offsetof(type, field)
> -#else
> -#ifndef __cplusplus
> -#define    __offsetof(type, field) \
> -    ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field))
> -#else
> -#define    __offsetof(type, field)                    \
> -  (__offsetof__ (reinterpret_cast <__size_t>            \
> -                (&reinterpret_cast <const volatile char &>    \
> -                  (static_cast<type *> (0)->field))))
> -#endif
> -#endif
> #define    __rangeof(type, start, end) \
>     (__offsetof(type, end) - __offsetof(type, start))
>
>

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 24, 2024 at 9:25 AM Pedro Giffuni &lt;<a href="mailto:pfg@freebsd.org">pfg@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div></div>
        <div dir="ltr"><div><div dir="ltr" style="color:rgb(0,0,0);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px;outline:none"><span style="outline:none">I do welcome the cleanup, of course, just I would have defined GCC 4.2 as the breaking point instead of 5.0.</span></div></div></div></div></div></blockquote><div><br></div><div>The breaking point is headed to gcc9 and clang11. There&#39;s no compelling FreeBSD project use case where people need to compile FreeBSD programs with compilers older than that. Though the difference matters mostly to compiling FreeBSD itself (which doesn&#39;t work with gcc older than 12 or 13 or clang older than a couple of releases. The delta for the system headers is approximately 0 for all these changes, though, since most of the #defines are for FreeBSD itself, not our headers.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div dir="ltr">Due basically to the licensing issues, GCC 4.2 became a natural reference for GCC versions.  At some point there were vendors actually shipping FreeBSD with GCC 4.2, and i<span><span style="color:rgb(0,0,0);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px">t was not a huge cost to keep GCC versions above 4.2 properly discriminated.</span></span></div></div></div></blockquote><div><br></div><div>True... But that&#39;s ancient history at this point...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px">But then you are right that it doesn&#39;t really matter that much. At least the alloc_size attributes are only defined for the FORTIFY_SOURCE in some linux libc implementation that I looked at. We define them unconditionally but I don&#39;t recall them being useful.</span></span></div></div></div></blockquote><div><br></div><div>We use them in a few dozen places in the tree, but the only visible ones to system headers are for malloc, calloc and realloc. Keeping the fringe definitions wasn&#39;t too useful, but if they turn out to be less than fringe, I&#39;ll cope. Most of the odd edge cases we had, though, were poorly documented and/or had the versions wrong because of transient bugs in gcc. :(. It&#39;s time to start over.</div><div><br></div><div>Of course, sys/cdefs.h could also benefit from some reorg, and a man page, but one thing at a time.</div><div><br></div><div>Warner</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px"><div dir="ltr"><span><div dir="ltr"><span style="color:rgb(38,40,42);font-size:13px">Indeed. But none of the ones that I removed are affected by this quirk since they are true for clang all versions.</span><br></div></span></div></div><div id="m_-4572619034193268714ydp834b9de9yahoo_quoted_9244353655"><div style="font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)"><div><div id="m_-4572619034193268714ydp834b9de9yiv0721428442"><div dir="ltr"><div><br clear="none"></div><div>Warner</div></div><br clear="none"><div id="m_-4572619034193268714ydp834b9de9yiv0721428442yqt79096"><div><div dir="ltr">On Sat, Jun 22, 2024 at 12:47 PM Pedro Giffuni &lt;<a shape="rect" href="mailto:pfg@freebsd.org" rel="nofollow" target="_blank">pfg@freebsd.org</a>&gt; wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica,Arial,sans-serif;font-size:16px"><div></div>
        <div dir="ltr">It was long ago when I last touched this but FWIW ...<br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">clang used to report itself as GCC 4.2 and kept it&#39;s GCC extension support level consistent with that version so these version numbers were relevant.</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Pedro.</div><div><br clear="none"></div>
        
        </div><div id="m_-4572619034193268714ydp834b9de9yiv0721428442m_160829819354664847ydp3058622eyahoo_quoted_9708121018">
            <div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                        On Thursday, June 20, 2024 at 09:41:34 PM GMT-5, Warner Losh &lt;<a shape="rect" href="mailto:imp@freebsd.org" rel="nofollow" target="_blank">imp@freebsd.org</a>&gt; wrote:
                    </div>
                    <div><br clear="none"></div>
                    <div><br clear="none"></div>
                
                
                <div><div dir="ltr">The branch main has been updated by imp:<br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">URL: <a shape="rect" href="https://cgit.FreeBSD.org/src/commit/?id=d5c01e1124ffa4adb2513e7e8d708d7072dbfc75" rel="nofollow" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=d5c01e1124ffa4adb2513e7e8d708d7072dbfc75</a><br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">commit d5c01e1124ffa4adb2513e7e8d708d7072dbfc75<br clear="none"></div><div dir="ltr">Author:     Warner Losh &lt;<a shape="rect" href="mailto:imp@FreeBSD.org" rel="nofollow" target="_blank">imp@FreeBSD.org</a>&gt;<br clear="none"></div><div dir="ltr">AuthorDate: 2024-06-20 23:03:15 +0000<br clear="none"></div><div dir="ltr">Commit:     Warner Losh &lt;<a shape="rect" href="mailto:imp@FreeBSD.org" rel="nofollow" target="_blank">imp@FreeBSD.org</a>&gt;<br clear="none"></div><div dir="ltr">CommitDate: 2024-06-21 02:41:09 +0000<br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">    cdefs.h: Remove pre gcc 5.0 support<br clear="none"></div><div dir="ltr">    <br clear="none"></div><div dir="ltr">    Reviewed by:            brooks<br clear="none"></div><div dir="ltr">    Differential Revision:  <a shape="rect" href="https://reviews.freebsd.org/D45656" rel="nofollow" target="_blank">https://reviews.freebsd.org/D45656</a><br clear="none"></div><div dir="ltr">    Sponsored by:           Netflix<br clear="none"></div><div dir="ltr">---<br clear="none"></div><div dir="ltr"> sys/sys/cdefs.h | 54 ------------------------------------------------------<br clear="none"></div><div dir="ltr"> 1 file changed, 54 deletions(-)<br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h<br clear="none"></div><div dir="ltr">index a6ecdca5d8b9..43d179b82020 100644<br clear="none"></div><div dir="ltr">--- a/sys/sys/cdefs.h<br clear="none"></div><div dir="ltr">+++ b/sys/sys/cdefs.h<br clear="none"></div><div dir="ltr">@@ -164,18 +164,9 @@<br clear="none"></div><div dir="ltr"> #define    __aligned(x)    __attribute__((__aligned__(x)))<br clear="none"></div><div dir="ltr"> #define    __section(x)    __attribute__((__section__(x)))<br clear="none"></div><div dir="ltr"> #define    __writeonly    __unused<br clear="none"></div><div dir="ltr">-#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)<br clear="none"></div><div dir="ltr"> #define    __alloc_size(x)    __attribute__((__alloc_size__(x)))<br clear="none"></div><div dir="ltr"> #define    __alloc_size2(n, x)    __attribute__((__alloc_size__(n, x)))<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#define    __alloc_size(x)<br clear="none"></div><div dir="ltr">-#define    __alloc_size2(n, x)<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr">-#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)<br clear="none"></div><div dir="ltr"> #define    __alloc_align(x)    __attribute__((__alloc_align__(x)))<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#define    __alloc_align(x)<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr"> /*<br clear="none"></div><div dir="ltr">  * Keywords added in C11.<br clear="none"></div><div dir="ltr">@@ -199,15 +190,6 @@<br clear="none"></div><div dir="ltr"> #define    _Alignof(x)        __alignof(x)<br clear="none"></div><div dir="ltr"> #endif<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr">-#if !defined(__cplusplus) &amp;&amp; !__has_extension(c_atomic) &amp;&amp; \<br clear="none"></div><div dir="ltr">-    !__has_extension(cxx_atomic) &amp;&amp; !__GNUC_PREREQ__(4, 7)<br clear="none"></div><div dir="ltr">-/*<br clear="none"></div><div dir="ltr">- * No native support for _Atomic(). Place object in structure to prevent<br clear="none"></div><div dir="ltr">- * most forms of direct non-atomic access.<br clear="none"></div><div dir="ltr">- */<br clear="none"></div><div dir="ltr">-#define    _Atomic(T)        struct { T volatile __val; }<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr">-<br clear="none"></div><div dir="ltr"> #if defined(__cplusplus) &amp;&amp; __cplusplus &gt;= 201103L<br clear="none"></div><div dir="ltr"> #define    _Noreturn        [[noreturn]]<br clear="none"></div><div dir="ltr"> #else<br clear="none"></div><div dir="ltr">@@ -218,15 +200,6 @@<br clear="none"></div><div dir="ltr"> #if (defined(__cplusplus) &amp;&amp; __cplusplus &gt;= 201103L) || \<br clear="none"></div><div dir="ltr">     __has_extension(cxx_static_assert)<br clear="none"></div><div dir="ltr"> #define    _Static_assert(x, y)    static_assert(x, y)<br clear="none"></div><div dir="ltr">-#elif __GNUC_PREREQ__(4,6) &amp;&amp; !defined(__cplusplus)<br clear="none"></div><div dir="ltr">-/* Nothing, gcc 4.6 and higher has _Static_assert built-in */<br clear="none"></div><div dir="ltr">-#elif defined(__COUNTER__)<br clear="none"></div><div dir="ltr">-#define    _Static_assert(x, y)    __Static_assert(x, __COUNTER__)<br clear="none"></div><div dir="ltr">-#define    __Static_assert(x, y)    ___Static_assert(x, y)<br clear="none"></div><div dir="ltr">-#define    ___Static_assert(x, y)    typedef char __assert_ ## y[(x) ? 1 : -1] \<br clear="none"></div><div dir="ltr">-                __unused<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#define    _Static_assert(x, y)    struct __hack<br clear="none"></div><div dir="ltr"> #endif<br clear="none"></div><div dir="ltr"> #endif<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr">@@ -276,7 +249,6 @@<br clear="none"></div><div dir="ltr">  * void bar(int myArray[__min_size(10)]);<br clear="none"></div><div dir="ltr">  */<br clear="none"></div><div dir="ltr"> #if !defined(__cplusplus) &amp;&amp; \<br clear="none"></div><div dir="ltr">-    (defined(__clang__) || __GNUC_PREREQ__(4, 6)) &amp;&amp; \<br clear="none"></div><div dir="ltr">     (!defined(__STDC_VERSION__) || (__STDC_VERSION__ &gt;= 199901))<br clear="none"></div><div dir="ltr"> #define __min_size(x)    static (x)<br clear="none"></div><div dir="ltr"> #else<br clear="none"></div><div dir="ltr">@@ -302,17 +274,9 @@<br clear="none"></div><div dir="ltr"> #define    __result_use_or_ignore_check<br clear="none"></div><div dir="ltr"> #endif /* !__clang__ */<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr">-#if __GNUC_PREREQ__(4, 1)<br clear="none"></div><div dir="ltr"> #define    __returns_twice    __attribute__((__returns_twice__))<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#define    __returns_twice<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr">-#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable)<br clear="none"></div><div dir="ltr"> #define    __unreachable()    __builtin_unreachable()<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#define    __unreachable()    ((void)0)<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr"> #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ &gt;= 199901<br clear="none"></div><div dir="ltr"> #define    __LONG_LONG_SUPPORTED<br clear="none"></div><div dir="ltr">@@ -353,33 +317,15 @@<br clear="none"></div><div dir="ltr"> #define    __predict_true(exp)     __builtin_expect((exp), 1)<br clear="none"></div><div dir="ltr"> #define    __predict_false(exp)    __builtin_expect((exp), 0)<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr">-#if __GNUC_PREREQ__(4, 0)<br clear="none"></div><div dir="ltr"> #define    __null_sentinel    __attribute__((__sentinel__))<br clear="none"></div><div dir="ltr"> #define    __exported    __attribute__((__visibility__(&quot;default&quot;)))<br clear="none"></div><div dir="ltr"> #define    __hidden    __attribute__((__visibility__(&quot;hidden&quot;)))<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#define    __null_sentinel<br clear="none"></div><div dir="ltr">-#define    __exported<br clear="none"></div><div dir="ltr">-#define    __hidden<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr"> <br clear="none"></div><div dir="ltr"> /*<br clear="none"></div><div dir="ltr">  * We define this here since &lt;stddef.h&gt;, &lt;sys/queue.h&gt;, and &lt;sys/types.h&gt;<br clear="none"></div><div dir="ltr">  * require it.<br clear="none"></div><div dir="ltr">  */<br clear="none"></div><div dir="ltr">-#if __GNUC_PREREQ__(4, 1)<br clear="none"></div><div dir="ltr"> #define    __offsetof(type, field)     __builtin_offsetof(type, field)<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#ifndef __cplusplus<br clear="none"></div><div dir="ltr">-#define    __offsetof(type, field) \<br clear="none"></div><div dir="ltr">-    ((__size_t)(__uintptr_t)((const volatile void *)&amp;((type *)0)-&gt;field))<br clear="none"></div><div dir="ltr">-#else<br clear="none"></div><div dir="ltr">-#define    __offsetof(type, field)                    \<br clear="none"></div><div dir="ltr">-  (__offsetof__ (reinterpret_cast &lt;__size_t&gt;            \<br clear="none"></div><div dir="ltr">-                 (&amp;reinterpret_cast &lt;const volatile char &amp;&gt;    \<br clear="none"></div><div dir="ltr">-                  (static_cast&lt;type *&gt; (0)-&gt;field))))<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr">-#endif<br clear="none"></div><div dir="ltr"> #define    __rangeof(type, start, end) \<br clear="none"></div><div dir="ltr">     (__offsetof(type, end) - __offsetof(type, start))<br clear="none"></div><div dir="ltr"> <br clear="none"></div></div>
            </div>
        </div></div></blockquote></div></div>
</div></div>
            </div>
        </div></blockquote></div></div>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpjPUeCk4rfiAq5_zisG0yKWfMbMBM-0v3JrCqAQK1NkQ>