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] Fix Wundef warnings in posix/confstr.c


On Wed, Jun 25, 2014 at 12:36:10PM -0700, Roland McGrath wrote:
> I was thinking about this and the similar cases in sysconf.c.  I think we
> should do something better about them.  The straightforward approach you've
> taken is still scarily typo-prone.  At the very least, we can use a macro
> that voids actually typing the _POSIX_FOOBAR name type.  Something even
> better is more doable for the sysconf case than the confstr one.  But we
> should give it some more thought.

I've spent some time on this and I can't see a good way to do this
without making it much more complicated than it needs to be.  We can't
completely avoid typing the _POSIX_* name because we can't use a macro
to check if that name is defined, or at least I cannot see a way to do
it.

All my attempts seem to lead to making a template file that is parsed
to generate a header, which would be overkill and cause way too much
code churn for a slushy freeze.

Siddhesh

Attachment: pgp9BZJDXKXAR.pgp
Description: PGP signature


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