[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#704598: libc0.1-dev: sys/mount.h requires C99

clone 704598 kfreebsd-kernel-headers
At first glance at this, I think it was made 'static inline' because the
function (copied from FreeBSD libc) really is being inlined into the
header;  it wouldn't be linked into the executable otherwise as glibc
does not have it.

I think 'static' is essential (so the function does not get exported /
defined more than once), but maybe the 'inline' can be dropped without
ill effects (a compiler might choose to inline it anyway).

An alternative might have been the __inline GCC extension and the
necessary defines for that macro to work, but that sounds messy - making
something standards-compliant by using a nonstandard feature...

The use of __inline should suffice,
it is handled in <sys/cdefs.h>, which is included by <features.h>,
which is included by <sys/mount.h> early,

There is another problematic case for -std=c89,

/usr/include/sys/sysctl.h:893:32: error: unknown type name 'u_int'
verbatim "u_int" -> "unsigned int" suffices.

The <sys/sysctl.h> comes from kfreebsd-kernel-headers package.


Reply to: