mirror of
https://github.com/python/cpython.git
synced 2024-11-27 11:55:13 +08:00
remove support GCC PyArg_ParseTuple format patch, last seen in 2006
This commit is contained in:
parent
fa6bdc6d86
commit
f6b687fcd4
@ -26,7 +26,7 @@ PyAPI_FUNC(PyObject *) _Py_VaBuildValue_SizeT(const char *, va_list);
|
||||
/* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */
|
||||
#if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
||||
PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...);
|
||||
PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
|
||||
PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...);
|
||||
PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
|
||||
const char *, char **, ...);
|
||||
PyAPI_FUNC(int) PyArg_ValidateKeywordArguments(PyObject *);
|
||||
|
@ -831,15 +831,6 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
|
||||
#define Py_GCC_ATTRIBUTE(x) __attribute__(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add PyArg_ParseTuple format where available.
|
||||
*/
|
||||
#ifdef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE
|
||||
#define Py_FORMAT_PARSETUPLE(func,p1,p2) __attribute__((format(func,p1,p2)))
|
||||
#else
|
||||
#define Py_FORMAT_PARSETUPLE(func,p1,p2)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Specify alignment on compilers that support it.
|
||||
*/
|
||||
|
38
configure
vendored
38
configure
vendored
@ -6523,44 +6523,6 @@ then
|
||||
BASECFLAGS="$BASECFLAGS $ac_arch_flags"
|
||||
fi
|
||||
|
||||
# Check whether GCC supports PyArg_ParseTuple format
|
||||
if test "$GCC" = "yes"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
|
||||
$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
|
||||
save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -Werror -Wformat"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
|
||||
$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS=$save_CFLAGS
|
||||
fi
|
||||
|
||||
# On some compilers, pthreads are available without further options
|
||||
# (e.g. MacOS X). On some of these systems, the compiler will not
|
||||
# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
|
||||
|
18
configure.ac
18
configure.ac
@ -1328,24 +1328,6 @@ then
|
||||
BASECFLAGS="$BASECFLAGS $ac_arch_flags"
|
||||
fi
|
||||
|
||||
# Check whether GCC supports PyArg_ParseTuple format
|
||||
if test "$GCC" = "yes"
|
||||
then
|
||||
AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
|
||||
save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -Werror -Wformat"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
|
||||
],[
|
||||
AC_DEFINE(HAVE_ATTRIBUTE_FORMAT_PARSETUPLE, 1,
|
||||
[Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3)))])
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
CFLAGS=$save_CFLAGS
|
||||
fi
|
||||
|
||||
# On some compilers, pthreads are available without further options
|
||||
# (e.g. MacOS X). On some of these systems, the compiler will not
|
||||
# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
|
||||
|
@ -61,9 +61,6 @@
|
||||
/* Define to 1 if you have the `atanh' function. */
|
||||
#undef HAVE_ATANH
|
||||
|
||||
/* Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3))) */
|
||||
#undef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE
|
||||
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
#undef HAVE_BIND_TEXTDOMAIN_CODESET
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user