Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
- newlib/acinclude.m4
- newlib/libc/include/sys/features.h
The goal of this patch is to:
- supply a single location for defining the newlib version
information: newlib/acinclude.m4
- define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
This is in line with what gcc does for its version macros. See:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.
In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.
Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
*Makefile.in,
*aclocal.m4,
*configure
stamp-* files
Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-14 18:12:06 +08:00
|
|
|
/* Version macros for internal and downstream use. */
|
|
|
|
#ifndef _NEWLIB_VERSION_H__
|
|
|
|
#define _NEWLIB_VERSION_H__ 1
|
|
|
|
|
2022-08-23 05:54:43 +08:00
|
|
|
#undef _NEWLIB_VERSION
|
|
|
|
#undef __NEWLIB__
|
|
|
|
#undef __NEWLIB_MINOR__
|
|
|
|
#undef __NEWLIB_PATCHLEVEL__
|
2022-01-18 10:17:54 +08:00
|
|
|
|
|
|
|
#endif /* !_NEWLIB_VERSION_H__ */
|