This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Patch] Fix ONE_DIRECTION undef warnings.
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: Carlos O'Donell <carlos at redhat dot com>, Roland McGrath <roland at hack dot frob dot com>, <libc-alpha at sourceware dot org>
- Date: Tue, 29 Apr 2014 21:05:05 +0000
- Subject: Re: [Patch] Fix ONE_DIRECTION undef warnings.
- Authentication-results: sourceware.org; auth=none
- References: <c087928d-c0a6-4121-8236-84a1a9e59870 at BAMAIL02 dot ba dot imgtec dot org> <20140428174126 dot 18CE02C3A00 at topped-with-meat dot com> <535FFE81 dot 4060104 at redhat dot com> <1398802315 dot 14541 dot 48 dot camel at ubuntu-sellcey>
On Tue, 29 Apr 2014, Steve Ellcey wrote:
> I think my main issue with this is how many new (duplicate) definitions
> it adds. This is even more of an issue with something like
> HP_SMALL_TIMING_AVAIL. Only one platform (alpha) ever sets this to 1.
> But with the current setup, to ensure it always has a value, we have to
> define it to 0 in 9 different hp-timing.h headers. That replication
> bothers me and I would like to have one default value defined somewhere
> that could be included by the platform specific hp-timing.h files
> instead of defining it in all 9 of the non-alpha hp-timing.h header
> files. But there doesn't seem to be an existing infrastructure for
> that, and I am not sure if a patch to create such a setup would be
> accepted and I don't know if it should be designed just for hp-timing.h
> or if it should be a more global header file that other platform headers
> could also include to provide default values for other macros.
I don't see a problem with using #include_next in the hp-timing.h case, to
include generic defaults then override them selectively.
--
Joseph S. Myers
joseph@codesourcery.com