This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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 ports] Use __unused0 instead of __unused for user visible struct members


On Mon, 2012-01-02 at 01:06:15 -0500, Mike Frysinger wrote:
> On Sunday 01 January 2012 22:18:59 Guillem Jover wrote:
> > On BSD systems __unused has traditionally been defined to mean the
> > equivalent of gcc's __attribute__((__unused__)). The problem comes when
> > defining such macro while trying to build unmodified source code with
> > BSD origins on systems with glibc ports headers. Separate patches have
> > been sent to fix the same issue on Linux kernel headers and the main
> > glibc project.
> 
> don't define __unused before including C library headers.  problem solved.

Sure, but as I mentioned above, the point is to avoid the need to modify
upstream source, with something like -D, -include, or -isystem + overlay
headers using #include_next for example.

> > This patch renames the user visible struct members from __unused to
> > __unused0 to not cause compilation failures due to that macro, which
> > should not be a problem as those members are supposed to be private
> > anyway.
> 
> the main tree needs modification in more places.  so unless you can convince 
> drepper to make the modification to the main tree, updating the ports doesn't 
> make much sense.

The patch seems to have arrived now on the libc-alpha list. In any
case I don't see the harm in applying this one to the ports tree?

thanks,
guillem


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