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 _).
diff --git a/Python/import.c b/Python/import.c
index e3a70c7..a97d0c6 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1010,7 +1010,7 @@
 
 #ifdef CHECK_IMPORT_CASE
 
-#ifdef MS_WIN32
+#if defined(MS_WIN32) || defined(__CYGWIN__)
 #include <windows.h>
 #include <ctype.h>
 
@@ -1039,14 +1039,26 @@
 	return 1;
 }
 
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>
+#endif
+
 static int
 check_case(char *buf, int len, int namelen, char *name)
 {
 	WIN32_FIND_DATA data;
 	HANDLE h;
+#ifdef __CYGWIN__
+	char tempbuf[MAX_PATH];
+#endif
 	if (getenv("PYTHONCASEOK") != NULL)
 		return 1;
+#ifdef __CYGWIN__
+	cygwin32_conv_to_win32_path(buf, tempbuf);
+	h = FindFirstFile(tempbuf, &data);
+#else
 	h = FindFirstFile(buf, &data);
+#endif
 	if (h == INVALID_HANDLE_VALUE) {
 		PyErr_Format(PyExc_NameError,
 		  "Can't find file for module %.100s\n(filename %.300s)",