authorgravatar for markus@oberhumer.comMarkus F.X.J. Oberhumer <markus@oberhumer.com> 2024-01-25 15:29:36+01:00
committergravatar for markus@oberhumer.comMarkus F.X.J. Oberhumer <markus@oberhumer.com> 2024-01-25 15:29:36+01:00
logc63216441c1eda65197581f1c0260e5ccdb970b8
tree621b8200eaa5b6d1910954dd2cf4db2ac7ee140e
parent54c08579e4859673391843182aa2fd44aabbf6cf

glibc: move __GLIBC__ version defines to the top of the file


1 files changed, 8 insertions(+), 8 deletions(-)

lib/libc/include/generic-glibc/features.h+8-8
...@@ -159,6 +159,14 @@...@@ -159,6 +159,14 @@
159# define __KERNEL_STRICT_NAMES159# define __KERNEL_STRICT_NAMES
160#endif160#endif
161161
162/* Major and minor version number of the GNU C library package. Use
163 these macros to test for features in specific releases. */
164#define __GLIBC__ 2
165/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
166
167#define __GLIBC_PREREQ(maj, min) \
168 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
169
162/* Convenience macro to test the version of gcc.170/* Convenience macro to test the version of gcc.
163 Use like this:171 Use like this:
164 #if __GNUC_PREREQ (2,8)172 #if __GNUC_PREREQ (2,8)
...@@ -501,14 +509,6 @@...@@ -501,14 +509,6 @@
501#undef __GNU_LIBRARY__509#undef __GNU_LIBRARY__
502#define __GNU_LIBRARY__ 6510#define __GNU_LIBRARY__ 6
503511
504/* Major and minor version number of the GNU C library package. Use
505 these macros to test for features in specific releases. */
506#define __GLIBC__ 2
507/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
508
509#define __GLIBC_PREREQ(maj, min) \
510 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
511
512/* This is here only because every header file already includes this one. */512/* This is here only because every header file already includes this one. */
513#ifndef __ASSEMBLER__513#ifndef __ASSEMBLER__
514# ifndef _SYS_CDEFS_H514# ifndef _SYS_CDEFS_H