AK: Add AK_LIBC_GLIBC

This is defined when we're compiling against the GNU C Library, whether
on Linux or on other kernels that glibc works on. More AK_LIBC_xxxx
definitions could be potentially added in the future.

Also add AK_LIBC_GLIBC_PREREQ(), which checks for a specific glibc
version.
This commit is contained in:
Sergey Bugaev 2023-09-03 21:59:06 +03:00 committed by Andrew Kaster
parent c4f12feadc
commit 3f90e9a8a0
Notes: sideshowbarker 2024-07-17 06:00:02 +09:00

View file

@ -47,6 +47,13 @@
# define AK_COMPILER_GCC
#endif
#if defined(__GLIBC__)
# define AK_LIBC_GLIBC
# define AK_LIBC_GLIBC_PREREQ(maj, min) __GLIBC_PREREQ((maj), (min))
#else
# define AK_LIBC_GLIBC_PREREQ(maj, min) 0
#endif
#if defined(__serenity__)
# define AK_OS_SERENITY
#endif