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: Steve Ellcey <sellcey at mips dot com>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, <libc-alpha at sourceware dot org>
- Date: Tue, 29 Apr 2014 13:11:55 -0700
- 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>
On Tue, 2014-04-29 at 15:33 -0400, Carlos O'Donell wrote:
> On 04/28/2014 01:41 PM, Roland McGrath wrote:
> > OK
>
> Would it have been better to clarify the interface and have all
> the converters define ONE_DIRECTION as either 0 or 1, and that way
> we have *explicit* definition of intent from all the converters
> including iconv/skeleton.c? With no `ifndef' in skeleton.c which
> has most of the same problems as we had before?
>
> Cheers,
> Carlos.
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.
Steve Ellcey
sellcey@mips.com