Patch #1495999: Part two of Windows CE changes.
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
diff --git a/Include/pyport.h b/Include/pyport.h
index 47b9f70..be6c51f 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -240,10 +240,10 @@
  * to your pyconfig.h. Python code beyond this should check HAVE_STAT and
  * HAVE_FSTAT instead.
  * Also
- *      #define DONT_HAVE_SYS_STAT_H
- * if <sys/stat.h> doesn't exist on your platform, and
+ *      #define HAVE_SYS_STAT_H
+ * if <sys/stat.h> exists on your platform, and
  *      #define HAVE_STAT_H
- * if <stat.h> does (don't look at me -- ths mess is inherited).
+ * if <stat.h> does.
  */
 #ifndef DONT_HAVE_STAT
 #define HAVE_STAT
@@ -258,7 +258,7 @@
 #include "unixstuff.h"
 #endif
 
-#ifndef DONT_HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
 #if defined(PYOS_OS2) && defined(PYCC_GCC)
 #include <sys/types.h>
 #endif