This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use __unused0 instead of __unused for user visiblestruct members


On Sun, 2012-01-08 at 20:27:12 -0500, Ulrich Drepper wrote:
> Ehm, no.  All symbols starting with _ belong to the system.  I'm not
> going to make any change to enable broken software.  Just fix that
> broken code.

The thing is, on BSD systems <sys/cdefs.h> defines __unused, so that's
perfectly legal there as the system owns the symbol, and user code just
uses it in the same way as GNU code might make use of other _ system
defined symbols. The code might be considered to become âbrokenâ on
GNU systems because it does not build out of the box (due to those
missing symbols) and as consequence it gets forced to defined them
somehow (as part of the build process or via a third party library).
Having to modify the source to remove the __unused usage tends to make
for a large and undesirable constant delta against upstream that has to
be maintained going forward.

So while this is not an ideal situation, I don't agree that code is
inherently broken, it's certainly not nice on portability though. And
I don't see either what harm is there in not using __unused on struct
members on the glibc side. Although what would be ideal, and possibly get
rid of your qualms, would be if (once no system header uses __ununsed
named struct members) glibc defined BSD <sys/cdefs.h> compatible macros,
which would avoid any possible issue of non-conformance entirely.

thanks,
guillem


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]