问题描述
我想弄清楚如何让2.4a2构建一个python
扩展名。 GCC 2.2.95没有stdint.h,但3.2.3没有。
这两个是我盒子里唯一的gcc版本。
有谁知道哪个版本的GCC引入了stdint.h(以及
因此uintptr_t和intptr_t)?我想得到条件
吧。
-Scott David Daniels
I am trying to figure out how to get 2.4a2 to build a python
extension. GCC 2.2.95 does not have a stdint.h, but 3.2.3 does.
These two are the only gcc versions I have on my box.
Does anyone know which version of GCC introduced stdint.h (and
thereby uintptr_t and intptr_t)? I''d like to get the conditionals
right.
-Scott David Daniels
Sc***********@Acm.Org
推荐答案
stdint.h不是GCC的一部分;它是libc6的一部分。根据版本号,您不应该根据软件的功能进行检查
,如autoconf那样。
问候,
Martin
stdint.h is not part of GCC; it is part of libc6. You shouldn''t do
#ifdefs based on version numbers, but instead, you should do checks
based on the features of the software, like autoconf does.
Regards,
Martin
stdint.h不是GCC的一部分;它是libc6的一部分。你不应该根据版本号做#/> #ifdefs,而应该根据软件的功能进行检查,比如autoconf。
问候,
Martin
stdint.h is not part of GCC; it is part of libc6. You shouldn''t do
#ifdefs based on version numbers, but instead, you should do checks
based on the features of the software, like autoconf does.
Regards,
Martin
嗯,目前pyconfig.h for 2.4说:
...
#if _MSC_VER!= 1200
#define HAVE_UINTPTR_T 1
#define HAVE_INTPTR_T 1
#endif
.. 。
这实际上是一个相当低的酒吧。
我想把它改成类似的东西:
...
#if _MSC_VER> 1200
#define HAVE_UINTPTR_T 1
#define HAVE_INTPTR_T 1
#endif
...
#if GCC_VERSION> = 30100
#define HAVE_UINTPTR_T 1
#define HAVE_INTPTR_T 1
#endif
...
即使不够好也可以说更好。
编译时我能做更好的测试吗? />
-Scott David Daniels
这篇关于GCC版本有什么< stdint.h>界定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!