From d2774c7d097bdc1929cb071b74f7b85ddb6ed789 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 19 Jun 2013 02:06:29 +0200 Subject: Issue #18259: Declare sethostname in socketmodule.c for AIX --- Misc/NEWS | 2 ++ Modules/socketmodule.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index a9eeeff..fa89eb3 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -32,6 +32,8 @@ Core and Builtins Library ------- +- Issue #18259: Declare sethostname in socketmodule.c for AIX + - Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 9b58a11..2c8a29c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -4132,6 +4132,11 @@ socket_sethostname(PyObject *self, PyObject *args) Py_buffer buf; int res, flag = 0; +#ifdef _AIX +/* issue #18259, not declared in any useful header file */ +extern int sethostname(const char *, size_t); +#endif + if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) { PyErr_Clear(); if (!PyArg_ParseTuple(args, "O&:sethostname", -- cgit v0.12 From 2f13f546e647214bbe70d88494c59fbe44d1a40d Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 19 Jun 2013 02:40:38 +0200 Subject: fixed libffi on PPC without __NO_FPRS__ ISO C90 forbids mixed declarations and code --- Modules/_ctypes/libffi/src/powerpc/ffi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/_ctypes/libffi/src/powerpc/ffi.c b/Modules/_ctypes/libffi/src/powerpc/ffi.c index 54f2731..5381d3d 100644 --- a/Modules/_ctypes/libffi/src/powerpc/ffi.c +++ b/Modules/_ctypes/libffi/src/powerpc/ffi.c @@ -146,12 +146,14 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack) } p_argv; size_t struct_copy_size; unsigned gprvalue; +#ifndef __NO_FPRS__ + double double_tmp; +#endif stacktop.c = (char *) stack + bytes; gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS; intarg_count = 0; #ifndef __NO_FPRS__ - double double_tmp; fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS; fparg_count = 0; copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c); -- cgit v0.12