Re: [Python-Dev] [Python-checkins] cpython (3.3): ctypes: AIX needs an explicit #include <alloca.h> to get alloca()
On Mon, Jun 17, 2013 at 2:02 PM, victor.stinner <python-checkins@python.org> wrote:
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -70,6 +70,7 @@
#include <ffi.h> #include "ctypes.h" +#include <alloca.h>
This header is not present on Windows, thus breaking all the Windows buildbots. Perhaps it should be wrapped in an AIX-specific #ifdef? -- Jeremy Kloth
Am 18.06.2013 12:56, schrieb Jeremy Kloth:
On Mon, Jun 17, 2013 at 2:02 PM, victor.stinner <python-checkins@python.org> wrote:
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -70,6 +70,7 @@
#include <ffi.h> #include "ctypes.h" +#include <alloca.h>
This header is not present on Windows, thus breaking all the Windows buildbots. Perhaps it should be wrapped in an AIX-specific #ifdef?
I have added HAVE_ALLOCA_H to configure: http://hg.python.org/cpython/rev/7b6ae19dd116 Christian
2013/6/18 Christian Heimes <christian@python.org>:
Am 18.06.2013 12:56, schrieb Jeremy Kloth:
On Mon, Jun 17, 2013 at 2:02 PM, victor.stinner
+#include <alloca.h>
This header is not present on Windows, thus breaking all the Windows buildbots. Perhaps it should be wrapped in an AIX-specific #ifdef?
Oh really? Portability is complex :-) I only tested on Linux, but I expected this header to be part of the C standard...
I have added HAVE_ALLOCA_H to configure:
Cool, thanks. Victor
Am 18.06.2013 13:32, schrieb Victor Stinner:
2013/6/18 Christian Heimes <christian@python.org>:
Am 18.06.2013 12:56, schrieb Jeremy Kloth:
On Mon, Jun 17, 2013 at 2:02 PM, victor.stinner
+#include <alloca.h>
This header is not present on Windows, thus breaking all the Windows buildbots. Perhaps it should be wrapped in an AIX-specific #ifdef?
Oh really? Portability is complex :-) I only tested on Linux, but I expected this header to be part of the C standard...
It's neither C99 nor POSIX.1-2001. I guess it's just too fragile and not portable enough. http://c-faq.com/malloc/alloca.html
I have added HAVE_ALLOCA_H to configure:
Cool, thanks.
You are welcome. alloca() is documented to require <alloca.h>. It merely works with GCC because the compiler translates the function call to inline code. Christian
participants (3)
-
Christian Heimes
-
Jeremy Kloth
-
Victor Stinner