authorgravatar for markus@oberhumer.comMarkus F.X.J. Oberhumer <markus@oberhumer.com> 2024-01-25 15:29:36+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-06-05 22:43:53-07:00
loga8db261ebb6ffb0ac2145190532cdbeefdc15cb9
treecf50a304c6e4ea54f7b56c8d206eee160251fba8
parent95a905336337a5f6eba39a31a28235885a12d48e

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 @@
159159# define __KERNEL_STRICT_NAMES
160160#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
162170/* Convenience macro to test the version of gcc.
163171 Use like this:
164172 #if __GNUC_PREREQ (2,8)
......@@ -502,14 +510,6 @@
502510#undef __GNU_LIBRARY__
503511#define __GNU_LIBRARY__ 6
504512
505/* Major and minor version number of the GNU C library package. Use
506 these macros to test for features in specific releases. */
507#define __GLIBC__ 2
508/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
509
510#define __GLIBC_PREREQ(maj, min) \
511 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
512
513513/* This is here only because every header file already includes this one. */
514514#ifndef __ASSEMBLER__
515515# ifndef _SYS_CDEFS_H