This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Automated the generation of the __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__ macros.
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: Pieter du Preez <pdupreez at gmail dot com>, newlib at sourceware dot org
- Date: Sun, 31 Jan 2016 16:56:39 +0100 (CET)
- Subject: Re: [PATCH] Automated the generation of the __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__ macros.
- Authentication-results: sourceware.org; auth=none
- References: <20160125201938 dot GA19917 at bling> <20160128103806 dot GD10851 at calimero dot vinschen dot de> <2044933968 dot 16515818 dot 1453987626889 dot JavaMail dot zimbra at redhat dot com> <20160129142013 dot GA28886 at bling> <1805653431 dot 17249188 dot 1454080285047 dot JavaMail dot zimbra at redhat dot com>
----- Am 29. Jan 2016 um 16:11 schrieb Jeff Johnston jjohnstn@redhat.com:
> ----- Original Message -----
>> On Thu, Jan 28, 2016 at 08:27:06AM -0500, Jeff Johnston wrote:
[...]
>> 2. We generate a newlib_version.h at the same level as newlib.h
>> is, and include newlib_version.h in both newlib.h and
>> libc/include/sys/features.h.
>>
>
> This idea could be modified to do something like glibc does for bringing in
> particular macros
> from a header file (e.g. __need_size_t to bring in just size_t from stddef.h).
> Thus, you
> set __need_version_macros and include newlib.h in <sys/features.h> and modify
> newlib.h.in
> accordingly. This restores the current behaviour. What do you think?
[...]
Could we please not use magic defines to change the behaviour of headers. This makes it hard to figure out dependencies. Its much easier to trace simple #include directives.