[PATCH 07/14] FreeBSD update of __dead2, etc.
Sebastian Huber
sebastian.huber@embedded-brains.de
Thu Apr 18 07:44:00 GMT 2013
On 04/18/2013 09:40 AM, Corinna Vinschen wrote:
> On Apr 17 15:16, Sebastian Huber wrote:
>> newlib/ChangeLog
>> 2013-04-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
>>
>> * libc/include/sys/cdefs.h (__GNUC_PREREQ__): New define.
>> (__aligned): Likewise.
>> (__alignof): Likewise.
>> (__dead2): Likewise.
>> (__packed): Likewise.
>> (__pure2): Likewise.
>> (__section): Likewise.
>> (__unused): Likewise.
>> (__used): Likewise.
>> ---
>> newlib/libc/include/sys/cdefs.h | 59 ++++++++++++++++++++++++++++++++++++++-
>> 1 files changed, 58 insertions(+), 1 deletions(-)
>>
>> diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
>> index 62c7aae..d8c32cc 100644
>> --- a/newlib/libc/include/sys/cdefs.h
>> +++ b/newlib/libc/include/sys/cdefs.h
>> @@ -147,6 +147,11 @@
>> #endif /* __GNUC__ || __INTEL_COMPILER */
>>
>> /*
>> + * Macro to test if we're using a specific version of gcc or later.
>> + */
>> +#define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi)
>> +
>> +/*
>
> Is it really necessary to introduce another version of the __GNUC_PREREQ
> macro? And if we really do that, shouldn't it rather be defined in
> features.h, alongside the original macro?
I introduced this define here to keep the differences between the FreeBSD
version as minimal as possible.
From the Newlib to FreeBSD difference we have:
@@ -113,12 +143,7 @@
/*
* Macro to test if we're using a specific version of gcc or later.
*/
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-#define __GNUC_PREREQ__(ma, mi) \
- (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
-#else
-#define __GNUC_PREREQ__(ma, mi) 0
-#endif
+#define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi)
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the Newlib
mailing list