mirror of
https://github.com/ziglang/zig.git
synced 2025-12-20 13:13:16 +00:00
glibc: move __GLIBC__ version defines to the top of the file
This commit is contained in:
parent
95a9053363
commit
a8db261ebb
16
lib/libc/include/generic-glibc/features.h
vendored
16
lib/libc/include/generic-glibc/features.h
vendored
@ -159,6 +159,14 @@
|
|||||||
# define __KERNEL_STRICT_NAMES
|
# define __KERNEL_STRICT_NAMES
|
||||||
#endif
|
#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.
|
/* Convenience macro to test the version of gcc.
|
||||||
Use like this:
|
Use like this:
|
||||||
#if __GNUC_PREREQ (2,8)
|
#if __GNUC_PREREQ (2,8)
|
||||||
@ -502,14 +510,6 @@
|
|||||||
#undef __GNU_LIBRARY__
|
#undef __GNU_LIBRARY__
|
||||||
#define __GNU_LIBRARY__ 6
|
#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. */
|
/* This is here only because every header file already includes this one. */
|
||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
# ifndef _SYS_CDEFS_H
|
# ifndef _SYS_CDEFS_H
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user