This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Simple local.h patch
Howland Craig D (Craig) wrote:
Attached is a simple patch to avoid prototype warnings.
Note that the same prototype is in 2 different files. I did not correct
that in this patch, but a good question is how to. __locale_charset()
is defined in libc/locale/locale.c. Both of these prototypes are in
different directories. It would be the most work, but it seems like
the best approach would be to create a local.h in locale that could
be included in the ctype and stdlib local.h files. Thoughts?
Craig
* libc/ctype/local.h (__locale_charset): add arguments to
prototype
* libc/stdlib/local.h (__locale_charset): ditto
Patch checked in.
In general, the local.h headers are not meant to cross directories.
They are allowed to define things without worrying if another directory
has chosen to define the same symbols in their local.h.
I have no problem with the current situation, but we could conceivably
create another header in libc/locale (e.g. internal_locale.h) and have
the local.h files in question include that header.
-- Jeff J.