On 1/31/24 11:01, Enrico Weigelt, metux IT consult wrote:
Hello folks,


I wonder whether the _X_INLINE still needed (inside X server codebase).

It's coming from <X11/funcproto.h> from xproto (>=7.0.9) and seems to
tbe just workaround for old compilers that didn't understand the inline
keyword yet. (personally, don't actually recall having one that didn't,
must be decades ago :p)

Does the xserver still need to support such compilers that don't know
the inline keyword yet ?

In public headers, I'd say it's still needed, as we've always supported
compiling applications against our libraries in strict C89 mode (i.e.
-std=c89, not gnu89 or similar modes that allow extensions), and it's
easier to leave it in those headers than to announce we're dropping that
support.  (At least for existing headers, it's probably not necessary in
new headers, but we don't create those very often these days.)

In the Xserver code base itself, where it's not exposed to other software,
I think it's fine to just use a bare "inline", as we already use & require
other C99 features in that code base.

(Currently the only compiler checks in Xfuncproto.h are for gcc with
 extensions, or for version 5.5 or later of the Sun cc compiler, which
 was released as part of Sun Studio 8 in 2003 - and all prior versions
 of that compiler have been unsupported by its vendor since 2010.)

--
        -Alan Coopersmith-                 alan.coopersm...@oracle.com
         Oracle Solaris Engineering - https://blogs.oracle.com/solaris

Reply via email to