aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include
diff options
context:
space:
mode:
authorMarkus F.X.J. Oberhumer <markus@oberhumer.com>2024-01-25 15:29:36 +0100
committerAndrew Kelley <andrew@ziglang.org>2024-06-05 22:43:53 -0700
commita8db261ebb6ffb0ac2145190532cdbeefdc15cb9 (patch)
treecf50a304c6e4ea54f7b56c8d206eee160251fba8 /lib/libc/include
parent95a905336337a5f6eba39a31a28235885a12d48e (diff)
downloadzig-a8db261ebb6ffb0ac2145190532cdbeefdc15cb9.tar.gz
zig-a8db261ebb6ffb0ac2145190532cdbeefdc15cb9.zip
glibc: move __GLIBC__ version defines to the top of the file
Diffstat (limited to 'lib/libc/include')
-rw-r--r--lib/libc/include/generic-glibc/features.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/include/generic-glibc/features.h b/lib/libc/include/generic-glibc/features.h
index 0a1ca71ea1..c21c2e27b0 100644
--- a/lib/libc/include/generic-glibc/features.h
+++ b/lib/libc/include/generic-glibc/features.h
@@ -159,6 +159,14 @@
# define __KERNEL_STRICT_NAMES
#endif
+/* Major and minor version number of the GNU C library package. Use
+ these macros to test for features in specific releases. */
+#define __GLIBC__ 2
+/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
+
+#define __GLIBC_PREREQ(maj, min) \
+ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
+
/* Convenience macro to test the version of gcc.
Use like this:
#if __GNUC_PREREQ (2,8)
@@ -502,14 +510,6 @@
#undef __GNU_LIBRARY__
#define __GNU_LIBRARY__ 6
-/* Major and minor version number of the GNU C library package. Use
- these macros to test for features in specific releases. */
-#define __GLIBC__ 2
-/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
-
-#define __GLIBC_PREREQ(maj, min) \
- ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
-
/* This is here only because every header file already includes this one. */
#ifndef __ASSEMBLER__
# ifndef _SYS_CDEFS_H