diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2008-09-03 18:58:51 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2008-09-03 18:58:51 (GMT) |
commit | fff953048f965b4f0a56f775d3f4ce1634df3da7 (patch) | |
tree | 528a28abc4354994c6818caac6257c52bc0d1704 /configure.in | |
parent | 658fad8aae60e6c25a102fb56884bf66577366f8 (diff) | |
download | cpython-fff953048f965b4f0a56f775d3f4ce1634df3da7.zip cpython-fff953048f965b4f0a56f775d3f4ce1634df3da7.tar.gz cpython-fff953048f965b4f0a56f775d3f4ce1634df3da7.tar.bz2 |
Issue #3696: Error parsing arguments on OpenBSD <= 4.4 and Cygwin.
Patch by Amaury Forgeot d'Arc, reviewed by me.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.in b/configure.in index b8a4575..bc91c07 100644 --- a/configure.in +++ b/configure.in @@ -3571,6 +3571,27 @@ AC_CHECK_TYPE(socklen_t,, #endif ]) +AC_MSG_CHECKING(for broken mbstowcs) +AC_TRY_RUN([ +#include<stdlib.h> +int main() { + size_t len = -1; + const char *str = "text"; + len = mbstowcs(NULL, str, 0); + return (len != 4); +} +], +ac_cv_broken_mbstowcs=no, +ac_cv_broken_mbstowcs=yes, +ac_cv_broken_mbstowcs=no) +AC_MSG_RESULT($ac_cv_broken_mbstowcs) +if test "$ac_cv_broken_mbstowcs" = yes +then + AC_DEFINE(HAVE_BROKEN_MBSTOWCS, 1, + [Define if mbstowcs(NULL, "text", 0) does not return the number of + wide chars that would be converted.]) +fi + AC_SUBST(THREADHEADERS) for h in `(cd $srcdir;echo Python/thread_*.h)` |