GCC版本有什么< stdint.h>界定? [英] What GCC version had <stdint.h> defined?
问题描述
我想弄清楚如何让2.4a2构建一个python
扩展名。 GCC 2.2.95没有stdint.h,但3.2.3没有。
这两个是我盒子里唯一的gcc版本。
有谁知道哪个版本的GCC引入了stdint.h(以及
因此uintptr_t和intptr_t)?我想得到条件
吧。
-Scott David Daniels
Sc *********** @ Acm.Org
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
推荐答案
Scott David Daniels写道:
Scott David Daniels wrote:
有谁知道哪个版本的GCC引入了stdint.h(以及
因此uintptr_t和intptr_t)?我想让条件
正确。
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.
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
Martin v.L?wis写道:
Martin v. L?wis wrote:
Scott David Daniels写道:
Scott David Daniels wrote:
有谁知道哪个版本的GCC引入了stdint.h(以及
因此uintptr_t和intptr_t)?我想让条件
正确。
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.
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
Sc ****** *****@Acm.Org
我瞥了一眼configure.in,它检查了HAVE_UINTPTR_T,但没有检查
HAVE_INTPTR_T。如果你想要定义它可用的位置,请将
正确的测试添加到configure.in并重新生成configure。
我认为该块将是类似这样的事情,直截了当地讨论和替换HAVE_UINTPTR_T的块:
AC_MSG_CHECKING(对于intptr_t支持)
have_intptr_t = no
AC_TRY_COMPILE([],[intptr_t x; x =(intptr_t)0;],[
AC_DEFINE(HAVE_INTPTR_T,1,[如果你有类型<定义这个
intptr_t。])
have_intptr_t =是
])
AC_MSG_RESULT(
I glanced at configure.in and it checks for HAVE_UINTPTR_T, but not
HAVE_INTPTR_T. If you want this define where it''s available, add the
proper test to configure.in and regenerate configure.
I think the block would be something like this, a straightforward
search-and-replace of the block for HAVE_UINTPTR_T:
AC_MSG_CHECKING(for intptr_t support)
have_intptr_t=no
AC_TRY_COMPILE([], [intptr_t x; x = (intptr_t)0;], [
AC_DEFINE(HAVE_INTPTR_T, 1, [Define this if you have the type
intptr_t.])
have_intptr_t=yes
])
AC_MSG_RESULT(
这篇关于GCC版本有什么< stdint.h>界定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!