Commit 4c3f57cf authored by Guido van Rossum's avatar Guido van Rossum

SF Patch #103154 by jlt63: Cygwin Check Import Case Patch.

Note: I've reordered acconfig.h and config.h.in to obtain alphabetical
order (modulo case and leading _).
parent f61f166b
...@@ -1010,7 +1010,7 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen, ...@@ -1010,7 +1010,7 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
#ifdef CHECK_IMPORT_CASE #ifdef CHECK_IMPORT_CASE
#ifdef MS_WIN32 #if defined(MS_WIN32) || defined(__CYGWIN__)
#include <windows.h> #include <windows.h>
#include <ctype.h> #include <ctype.h>
...@@ -1039,14 +1039,26 @@ allcaps8x3(char *s) ...@@ -1039,14 +1039,26 @@ allcaps8x3(char *s)
return 1; return 1;
} }
#ifdef __CYGWIN__
#include <sys/cygwin.h>
#endif
static int static int
check_case(char *buf, int len, int namelen, char *name) check_case(char *buf, int len, int namelen, char *name)
{ {
WIN32_FIND_DATA data; WIN32_FIND_DATA data;
HANDLE h; HANDLE h;
#ifdef __CYGWIN__
char tempbuf[MAX_PATH];
#endif
if (getenv("PYTHONCASEOK") != NULL) if (getenv("PYTHONCASEOK") != NULL)
return 1; return 1;
#ifdef __CYGWIN__
cygwin32_conv_to_win32_path(buf, tempbuf);
h = FindFirstFile(tempbuf, &data);
#else
h = FindFirstFile(buf, &data); h = FindFirstFile(buf, &data);
#endif
if (h == INVALID_HANDLE_VALUE) { if (h == INVALID_HANDLE_VALUE) {
PyErr_Format(PyExc_NameError, PyErr_Format(PyExc_NameError,
"Can't find file for module %.100s\n(filename %.300s)", "Can't find file for module %.100s\n(filename %.300s)",
......
/* Leave this blank line here -- autoheader needs it! */ /* Leave this blank line here -- autoheader needs it! */
/* Define for AIX if your compiler is a genuine IBM xlC/xlC_r
and you want support for AIX C++ shared extension modules. */
#undef AIX_GENUINE_CPLUSPLUS
/* Define if your <unistd.h> contains bad prototypes for exec*() /* Define if your <unistd.h> contains bad prototypes for exec*()
(as it does on SGI IRIX 4.x) */ (as it does on SGI IRIX 4.x) */
#undef BAD_EXEC_PROTOTYPES #undef BAD_EXEC_PROTOTYPES
...@@ -9,16 +13,15 @@ ...@@ -9,16 +13,15 @@
(as it does on SCI ODT 3.0) */ (as it does on SCI ODT 3.0) */
#undef BAD_STATIC_FORWARD #undef BAD_STATIC_FORWARD
/* Define for AIX if your compiler is a genuine IBM xlC/xlC_r
and you want support for AIX C++ shared extension modules. */
#undef AIX_GENUINE_CPLUSPLUS
/* Define this if you have BeOS threads */ /* Define this if you have BeOS threads */
#undef BEOS_THREADS #undef BEOS_THREADS
/* Define if you have the Mach cthreads package */ /* Define if you have the Mach cthreads package */
#undef C_THREADS #undef C_THREADS
/* Defined when case of imported modules are checked against case of file. */
#undef CHECK_IMPORT_CASE
/* Define to `long' if <time.h> doesn't define. */ /* Define to `long' if <time.h> doesn't define. */
#undef clock_t #undef clock_t
...@@ -32,6 +35,9 @@ ...@@ -32,6 +35,9 @@
/* Define this if your time.h defines altzone */ /* Define this if your time.h defines altzone */
#undef HAVE_ALTZONE #undef HAVE_ALTZONE
/* Defined when any dynamic module loading is enabled */
#undef HAVE_DYNAMIC_LOADING
/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */ /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
#undef HAVE_GETC_UNLOCKED #undef HAVE_GETC_UNLOCKED
...@@ -50,12 +56,18 @@ ...@@ -50,12 +56,18 @@
/* Define this if you have the 6-arg version of gethostbyname_r() */ /* Define this if you have the 6-arg version of gethostbyname_r() */
#undef HAVE_GETHOSTBYNAME_R_6_ARG #undef HAVE_GETHOSTBYNAME_R_6_ARG
/* Defined to enable large file support when an off_t is bigger than a long
and long long is available and at least as big as an off_t. You may need
to add some flags for configuration and compilation to enable this mode.
E.g, for Solaris 2.7:
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" OPT="-O2 $CFLAGS" \
configure
*/
#undef HAVE_LARGEFILE_SUPPORT
/* Define this if you have the type long long */ /* Define this if you have the type long long */
#undef HAVE_LONG_LONG #undef HAVE_LONG_LONG
/* Define this if you have the type uintptr_t */
#undef HAVE_UINTPTR_T
/* Define if your compiler supports function prototypes */ /* Define if your compiler supports function prototypes */
#undef HAVE_PROTOTYPES #undef HAVE_PROTOTYPES
...@@ -66,12 +78,26 @@ ...@@ -66,12 +78,26 @@
(e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */ (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
#undef HAVE_STDARG_PROTOTYPES #undef HAVE_STDARG_PROTOTYPES
/* Define this if you have the type uintptr_t */
#undef HAVE_UINTPTR_T
/* Define if you have a useable wchar_t type defined in wchar.h; useable
means wchar_t must be 16-bit unsigned type. (see
Include/unicodeobject.h). */
#undef HAVE_USABLE_WCHAR_T
/* Define if the compiler provides a wchar.h header file. */
#undef HAVE_WCHAR_H
/* Define if malloc(0) returns a NULL pointer */ /* Define if malloc(0) returns a NULL pointer */
#undef MALLOC_ZERO_RETURNS_NULL #undef MALLOC_ZERO_RETURNS_NULL
/* Define if you have POSIX threads */ /* Define if you have POSIX threads */
#undef _POSIX_THREADS #undef _POSIX_THREADS
/* Define if you want to build an interpreter with many run-time checks */
#undef Py_DEBUG
/* Define to force use of thread-safe errno, h_errno, and other functions */ /* Define to force use of thread-safe errno, h_errno, and other functions */
#undef _REENTRANT #undef _REENTRANT
...@@ -81,6 +107,20 @@ ...@@ -81,6 +107,20 @@
/* Define to empty if the keyword does not work. */ /* Define to empty if the keyword does not work. */
#undef signed #undef signed
/* Define if i>>j for signed int i does not extend the sign bit
when i < 0
*/
#undef SIGNED_RIGHT_SHIFT_ZERO_FILLS
/* The number of bytes in an off_t. */
#undef SIZEOF_OFF_T
/* The number of bytes in a time_t. */
#undef SIZEOF_TIME_T
/* The number of bytes in a pthread_t. */
#undef SIZEOF_PTHREAD_T
/* sizeof(void *) */ /* sizeof(void *) */
#undef SIZEOF_VOID_P #undef SIZEOF_VOID_P
...@@ -103,24 +143,12 @@ ...@@ -103,24 +143,12 @@
/* Define if you want SIGFPE handled (see Include/pyfpe.h). */ /* Define if you want SIGFPE handled (see Include/pyfpe.h). */
#undef WANT_SIGFPE_HANDLER #undef WANT_SIGFPE_HANDLER
/* Define if the compiler provides a wchar.h header file. */
#undef HAVE_WCHAR_H
/* Define if you have a useable wchar_t type defined in wchar.h; useable
means wchar_t must be 16-bit unsigned type. (see
Include/unicodeobject.h). */
#undef HAVE_USABLE_WCHAR_T
/* Define if you want wctype.h functions to be used instead of the /* Define if you want wctype.h functions to be used instead of the
one supplied by Python itself. (see Include/unicodectype.h). */ one supplied by Python itself. (see Include/unicodectype.h). */
#undef WANT_WCTYPE_FUNCTIONS #undef WANT_WCTYPE_FUNCTIONS
/* Define if you want to use SGI (IRIX 4) dynamic linking. /* Define if you want to compile in cycle garbage collection */
This requires the "dl" library by Jack Jansen, #undef WITH_CYCLE_GC
ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
Don't bother on IRIX 5, it already has dynamic linking using SunOS
style shared libraries */
#undef WITH_SGI_DL
/* Define if you want to emulate SGI (IRIX 4) dynamic linking. /* Define if you want to emulate SGI (IRIX 4) dynamic linking.
This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4), This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
...@@ -138,47 +166,22 @@ ...@@ -138,47 +166,22 @@
linker (rld). Dyld is necessary to support frameworks. */ linker (rld). Dyld is necessary to support frameworks. */
#undef WITH_DYLD #undef WITH_DYLD
/* Define if you want to compile in rudimentary thread support */ /* Define if you want to use BSD db. */
#undef WITH_THREAD #undef WITH_LIBDB
/* Define if you want to compile in cycle garbage collection */
#undef WITH_CYCLE_GC
/* Define if you want to produce an OpenStep/Rhapsody framework /* Define if you want to produce an OpenStep/Rhapsody framework
(shared library plus accessory files). */ (shared library plus accessory files). */
#undef WITH_NEXT_FRAMEWORK #undef WITH_NEXT_FRAMEWORK
/* Define if you want to use BSD db. */ /* Define if you want to use SGI (IRIX 4) dynamic linking.
#undef WITH_LIBDB This requires the "dl" library by Jack Jansen,
ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
/* Define if you want to build an interpreter with many run-time checks */ Don't bother on IRIX 5, it already has dynamic linking using SunOS
#undef Py_DEBUG style shared libraries */
#undef WITH_SGI_DL
/* The number of bytes in an off_t. */
#undef SIZEOF_OFF_T
/* The number of bytes in a time_t. */
#undef SIZEOF_TIME_T
/* The number of bytes in a pthread_t. */
#undef SIZEOF_PTHREAD_T
/* Defined to enable large file support when an off_t is bigger than a long
and long long is available and at least as big as an off_t. You may need
to add some flags for configuration and compilation to enable this mode.
E.g, for Solaris 2.7:
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" OPT="-O2 $CFLAGS" \
configure
*/
#undef HAVE_LARGEFILE_SUPPORT
/* Defined when any dynamic module loading is enabled */
#undef HAVE_DYNAMIC_LOADING
/* Define if i>>j for signed int i does not extend the sign bit /* Define if you want to compile in rudimentary thread support */
when i < 0 #undef WITH_THREAD
*/
#undef SIGNED_RIGHT_SHIFT_ZERO_FILLS
/* Leave that blank line there-- autoheader needs it! */ /* Leave that blank line there-- autoheader needs it! */
...@@ -66,6 +66,10 @@ ...@@ -66,6 +66,10 @@
byte first (like Motorola and SPARC, unlike Intel and VAX). */ byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN #undef WORDS_BIGENDIAN
/* Define for AIX if your compiler is a genuine IBM xlC/xlC_r
and you want support for AIX C++ shared extension modules. */
#undef AIX_GENUINE_CPLUSPLUS
/* Define if your <unistd.h> contains bad prototypes for exec*() /* Define if your <unistd.h> contains bad prototypes for exec*()
(as it does on SGI IRIX 4.x) */ (as it does on SGI IRIX 4.x) */
#undef BAD_EXEC_PROTOTYPES #undef BAD_EXEC_PROTOTYPES
...@@ -74,16 +78,15 @@ ...@@ -74,16 +78,15 @@
(as it does on SCI ODT 3.0) */ (as it does on SCI ODT 3.0) */
#undef BAD_STATIC_FORWARD #undef BAD_STATIC_FORWARD
/* Define for AIX if your compiler is a genuine IBM xlC/xlC_r
and you want support for AIX C++ shared extension modules. */
#undef AIX_GENUINE_CPLUSPLUS
/* Define this if you have BeOS threads */ /* Define this if you have BeOS threads */
#undef BEOS_THREADS #undef BEOS_THREADS
/* Define if you have the Mach cthreads package */ /* Define if you have the Mach cthreads package */
#undef C_THREADS #undef C_THREADS
/* Defined when case of imported modules are checked against case of file. */
#undef CHECK_IMPORT_CASE
/* Define to `long' if <time.h> doesn't define. */ /* Define to `long' if <time.h> doesn't define. */
#undef clock_t #undef clock_t
...@@ -97,6 +100,9 @@ ...@@ -97,6 +100,9 @@
/* Define this if your time.h defines altzone */ /* Define this if your time.h defines altzone */
#undef HAVE_ALTZONE #undef HAVE_ALTZONE
/* Defined when any dynamic module loading is enabled */
#undef HAVE_DYNAMIC_LOADING
/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */ /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
#undef HAVE_GETC_UNLOCKED #undef HAVE_GETC_UNLOCKED
...@@ -112,12 +118,18 @@ ...@@ -112,12 +118,18 @@
/* Define this if you have the 6-arg version of gethostbyname_r() */ /* Define this if you have the 6-arg version of gethostbyname_r() */
#undef HAVE_GETHOSTBYNAME_R_6_ARG #undef HAVE_GETHOSTBYNAME_R_6_ARG
/* Defined to enable large file support when an off_t is bigger than a long
and long long is available and at least as big as an off_t. You may need
to add some flags for configuration and compilation to enable this mode.
E.g, for Solaris 2.7:
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" OPT="-O2 $CFLAGS" \
configure
*/
#undef HAVE_LARGEFILE_SUPPORT
/* Define this if you have the type long long */ /* Define this if you have the type long long */
#undef HAVE_LONG_LONG #undef HAVE_LONG_LONG
/* Define this if you have the type uintptr_t */
#undef HAVE_UINTPTR_T
/* Define if your compiler supports function prototypes */ /* Define if your compiler supports function prototypes */
#undef HAVE_PROTOTYPES #undef HAVE_PROTOTYPES
...@@ -128,12 +140,26 @@ ...@@ -128,12 +140,26 @@
(e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */ (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
#undef HAVE_STDARG_PROTOTYPES #undef HAVE_STDARG_PROTOTYPES
/* Define this if you have the type uintptr_t */
#undef HAVE_UINTPTR_T
/* Define if you have a useable wchar_t type defined in wchar.h; useable
means wchar_t must be 16-bit unsigned type. (see
Include/unicodeobject.h). */
#undef HAVE_USABLE_WCHAR_T
/* Define if the compiler provides a wchar.h header file. */
#undef HAVE_WCHAR_H
/* Define if malloc(0) returns a NULL pointer */ /* Define if malloc(0) returns a NULL pointer */
#undef MALLOC_ZERO_RETURNS_NULL #undef MALLOC_ZERO_RETURNS_NULL
/* Define if you have POSIX threads */ /* Define if you have POSIX threads */
#undef _POSIX_THREADS #undef _POSIX_THREADS
/* Define if you want to build an interpreter with many run-time checks */
#undef Py_DEBUG
/* Define to force use of thread-safe errno, h_errno, and other functions */ /* Define to force use of thread-safe errno, h_errno, and other functions */
#undef _REENTRANT #undef _REENTRANT
...@@ -143,6 +169,20 @@ ...@@ -143,6 +169,20 @@
/* Define to empty if the keyword does not work. */ /* Define to empty if the keyword does not work. */
#undef signed #undef signed
/* Define if i>>j for signed int i does not extend the sign bit
when i < 0
*/
#undef SIGNED_RIGHT_SHIFT_ZERO_FILLS
/* The number of bytes in an off_t. */
#undef SIZEOF_OFF_T
/* The number of bytes in a time_t. */
#undef SIZEOF_TIME_T
/* The number of bytes in a pthread_t. */
#undef SIZEOF_PTHREAD_T
/* Define to `int' if <sys/types.h> doesn't define. */ /* Define to `int' if <sys/types.h> doesn't define. */
#undef socklen_t #undef socklen_t
...@@ -159,24 +199,12 @@ ...@@ -159,24 +199,12 @@
/* Define if you want SIGFPE handled (see Include/pyfpe.h). */ /* Define if you want SIGFPE handled (see Include/pyfpe.h). */
#undef WANT_SIGFPE_HANDLER #undef WANT_SIGFPE_HANDLER
/* Define if the compiler provides a wchar.h header file. */
#undef HAVE_WCHAR_H
/* Define if you have a useable wchar_t type defined in wchar.h; useable
means wchar_t must be 16-bit unsigned type. (see
Include/unicodeobject.h). */
#undef HAVE_USABLE_WCHAR_T
/* Define if you want wctype.h functions to be used instead of the /* Define if you want wctype.h functions to be used instead of the
one supplied by Python itself. (see Include/unicodectype.h). */ one supplied by Python itself. (see Include/unicodectype.h). */
#undef WANT_WCTYPE_FUNCTIONS #undef WANT_WCTYPE_FUNCTIONS
/* Define if you want to use SGI (IRIX 4) dynamic linking. /* Define if you want to compile in cycle garbage collection */
This requires the "dl" library by Jack Jansen, #undef WITH_CYCLE_GC
ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
Don't bother on IRIX 5, it already has dynamic linking using SunOS
style shared libraries */
#undef WITH_SGI_DL
/* Define if you want to emulate SGI (IRIX 4) dynamic linking. /* Define if you want to emulate SGI (IRIX 4) dynamic linking.
This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4), This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
...@@ -194,47 +222,22 @@ ...@@ -194,47 +222,22 @@
linker (rld). Dyld is necessary to support frameworks. */ linker (rld). Dyld is necessary to support frameworks. */
#undef WITH_DYLD #undef WITH_DYLD
/* Define if you want to compile in rudimentary thread support */ /* Define if you want to use BSD db. */
#undef WITH_THREAD #undef WITH_LIBDB
/* Define if you want to compile in cycle garbage collection */
#undef WITH_CYCLE_GC
/* Define if you want to produce an OpenStep/Rhapsody framework /* Define if you want to produce an OpenStep/Rhapsody framework
(shared library plus accessory files). */ (shared library plus accessory files). */
#undef WITH_NEXT_FRAMEWORK #undef WITH_NEXT_FRAMEWORK
/* Define if you want to use BSD db. */ /* Define if you want to use SGI (IRIX 4) dynamic linking.
#undef WITH_LIBDB This requires the "dl" library by Jack Jansen,
ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
/* Define if you want to build an interpreter with many run-time checks */ Don't bother on IRIX 5, it already has dynamic linking using SunOS
#undef Py_DEBUG style shared libraries */
#undef WITH_SGI_DL
/* The number of bytes in an off_t. */
#undef SIZEOF_OFF_T
/* The number of bytes in a time_t. */
#undef SIZEOF_TIME_T
/* The number of bytes in a pthread_t. */
#undef SIZEOF_PTHREAD_T
/* Defined to enable large file support when an off_t is bigger than a long
and long long is available and at least as big as an off_t. You may need
to add some flags for configuration and compilation to enable this mode.
E.g, for Solaris 2.7:
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" OPT="-O2 $CFLAGS" \
configure
*/
#undef HAVE_LARGEFILE_SUPPORT
/* Defined when any dynamic module loading is enabled */
#undef HAVE_DYNAMIC_LOADING
/* Define if i>>j for signed int i does not extend the sign bit /* Define if you want to compile in rudimentary thread support */
when i < 0 #undef WITH_THREAD
*/
#undef SIGNED_RIGHT_SHIFT_ZERO_FILLS
/* The number of bytes in a char. */ /* The number of bytes in a char. */
#undef SIZEOF_CHAR #undef SIZEOF_CHAR
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1232,6 +1232,18 @@ else AC_ERROR(proper usage is --with-libc=STRING) ...@@ -1232,6 +1232,18 @@ else AC_ERROR(proper usage is --with-libc=STRING)
fi], fi],
[AC_MSG_RESULT(default LIBC=\"$LIBC\")]) [AC_MSG_RESULT(default LIBC=\"$LIBC\")])
# check for --with-check-import-case
AC_ARG_WITH(check-import-case,
[ --with-check-import-case enable imported module name case checking],,)
AC_MSG_CHECKING(for --with-check-import-case)
if test "$with_check_import_case"
then
AC_DEFINE(CHECK_IMPORT_CASE)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
# check for hypot() in math library # check for hypot() in math library
LIBS_SAVE=$LIBS LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM" LIBS="$LIBS $LIBM"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment