1 // SPDX-License-Identifier: GPL-2.0 << 2 #include <stdlib.h> 1 #include <stdlib.h> 3 2 4 #if !defined(__UCLIBC__) 3 #if !defined(__UCLIBC__) 5 #include <gnu/libc-version.h> 4 #include <gnu/libc-version.h> 6 #else 5 #else 7 #define XSTR(s) STR(s) 6 #define XSTR(s) STR(s) 8 #define STR(s) #s 7 #define STR(s) #s 9 #endif 8 #endif 10 9 11 int main(void) 10 int main(void) 12 { 11 { 13 #if !defined(__UCLIBC__) 12 #if !defined(__UCLIBC__) 14 const char *version = gnu_get_libc_ver 13 const char *version = gnu_get_libc_version(); 15 #else 14 #else 16 const char *version = XSTR(__GLIBC__) 15 const char *version = XSTR(__GLIBC__) "." XSTR(__GLIBC_MINOR__); 17 #endif 16 #endif 18 17 19 return (long)version; 18 return (long)version; 20 } 19 } 21 20
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.