关于__GUN_LIBRARY__

本文探讨了宏__GNU_LIBRARY__的历史与现状,解释了其值固定为6的原因,并指出该宏已被弃用,建议使用__GLIBC__和__GLIBC_MINOR__来检查特定GNU C库版本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、这个值现在已经是6,曾经是1……原因不明(因为设定就是这样的——腾原文太)

2、这个值以后也将是6,因为这个值已经被废弃了,替代的是__GLIBC__和__GLIBC_MINOR__

3、这个值在features.h中定义:


/* This macro indicates that the installed library is the GNU C Library.
   For historic reasons the value now is 6 and this will stay from now
   on.  The use of this variable is deprecated.  Use __GLIBC__ and
   __GLIBC_MINOR__ now (see below) when you want to test for a specific
   GNU C library version and use the values in <gnu/lib-names.h> to get
   the sonames of the shared libraries.  */
#undef  __GNU_LIBRARY__
#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
#define    __GLIBC_MINOR__    28

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值