2013-07-17 35 views
0

我想编写一个宏查找libc。我发现ldd -version选项可用于查找版本。它提供了很多信息,但我只想要版本,如何获取版本。autoconf中的libc宏

$ldd --version 
ldd (Ubuntu EGLIBC 2.12.1-0ubuntu6) 2.12.1 
Copyright (C) 2010 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
Written by Roland McGrath and Ulrich Drepper. 

回答

0

对于glibc的/ eglibc你可以从<features.h>this post描述得到这一信息。其他libc实现会有所不同。