stilleazy.blogg.se

Debian glibc version
Debian glibc version





debian glibc version

This is free software see the source for copying conditions. GNU C Library stable release version 2.13, by Roland McGrath et al.Ĭopyright (C) 2011 Free Software Foundation, Inc. libc is special on Linux in that it can be executed: $ /lib64/libc.so.6 The static library, so try that secondarily. Use the shared library, but some functions are only in Use -print-file-name gcc option: $ gcc -print-file-name=libc.so The grep pattern is chosen to match only the two macros that are relevant, because there are dozens of internal macros named _GLIBC_somethingorother that you don't want to have to read through. Grep -E '^#define _GLIBC(|_MINOR)_ ' | sort If you would prefer a shell 'one-liner' to dump these macros, use: echo '#include ' | gcc -xc -E -dM | The major version number is unlikely ever to change again (the last time it changed was the "libc6 transition" in 1997). Under normal circumstances, the "runtime" version could be bigger than the "compile-time" version, but never smaller. When I compile and run this program on the computer I'm typing this answer on (which is a Mac) it prints Not the GNU C Libraryīut when compiled and run on a nearby Linux box it prints GNU libc compile-time version: 2.24 Printf("GNU libc runtime version: %s\n", gnu_get_libc_version())

debian glibc version

Printf("GNU libc compile-time version: %u.%u\n", _GLIBC_, _GLIBC_MINOR_) These expand to positive integers, and will be defined as a side-effect of including any header file provided by the GNU C Library this means you can include a standard header, and then use #ifdef _GLIBC_ to decide whether you can include a nonstandard header like gnu/libc-version.h.Įxpanding the test program from the accepted answer: #include If what you care about is the compile-time version (that is, the version that provided the headers in /usr/include), you should look at the macros _GLIBC_ and _GLIBC_MINOR_. Gnu_get_libc_version identifies the runtime version of the GNU C Library.







Debian glibc version