changed windows test symbols; removed debug printf from sockets
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 9f0358e..16bfe09 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -27,7 +27,7 @@
 /* This file is also used for Windows NT and MS-Win.  In that case the module
    actually calls itself 'nt', not 'posix', and a few functions are
    either unimplemented or implemented differently.  The source
-   assumes that for Windows NT, the macro 'NT' is defined independent
+   assumes that for Windows NT, the macro 'MS_WIN32' is defined independent
    of the compiler used.  Different compilers define their own feature
    test macro, e.g. '__BORLANDC__' or '_MSC_VER'. */
 
@@ -78,13 +78,14 @@
 #define HAVE_WAIT       1
 #else
 #ifdef _MSC_VER		/* Microsoft compiler */
-#ifdef NT
+#define HAVE_GETCWD     1
+#ifdef MS_WIN32
 #define HAVE_EXECV      1
 #define HAVE_PIPE       1
 #define HAVE_POPEN      1
 #define HAVE_SYSTEM	1
 #else /* 16-bit Windows */
-#endif /* NT */
+#endif /* !MS_WIN32 */
 #else			/* all other compilers */
 /* Unix functions that the configure script doesn't check for */
 #define HAVE_EXECV      1
@@ -125,7 +126,7 @@
 extern int lstat();
 extern int symlink();
 #else /* !HAVE_UNISTD_H */
-#if defined(__WATCOMC__)
+#if defined(__WATCOMC__) || defined(_MSC_VER)
 extern int mkdir PROTO((const char *));
 #else
 extern int mkdir PROTO((const char *, mode_t));
@@ -203,13 +204,13 @@
 #include <io.h>
 #include <process.h>
 #include <windows.h>
-#ifdef NT
+#ifdef MS_WIN32
 #define popen	_popen
 #define pclose	_pclose
 #else /* 16-bit Windows */
 #include <dos.h>
 #include <ctype.h>
-#endif /* NT */
+#endif /* MS_WIN32 */
 #endif /* _MSC_VER */
 
 #ifdef OS2
@@ -428,7 +429,7 @@
 	object *self;
 	object *args;
 {
-#if defined(NT) && !defined(HAVE_OPENDIR)
+#if defined(MS_WIN32) && !defined(HAVE_OPENDIR)
 
 	char *name;
 	int len;
@@ -484,7 +485,7 @@
 
 	return d;
 
-#else /* !NT */
+#else /* !MS_WIN32 */
 #ifdef _MSC_VER /* 16-bit Windows */
 
 #ifndef MAX_PATH
@@ -588,7 +589,7 @@
 	return d;
 
 #endif /* !_MSC_VER */
-#endif /* !NT */
+#endif /* !MS_WIN32 */
 }
 
 static object *
@@ -602,7 +603,7 @@
 	if (!newgetargs(args, "s|i", &path, &mode))
 		return NULL;
 	BGN_SAVE
-#if defined(__WATCOMC__)
+#if defined(__WATCOMC__) || defined(_MSC_VER)
 	res = mkdir(path);
 #else
 	res = mkdir(path, mode);
@@ -1219,7 +1220,7 @@
 		       (double)c / HZ);
 }
 #endif /* HAVE_TIMES */
-#if defined(NT) && !defined(HAVE_TIMES)
+#if defined(MS_WIN32) && !defined(HAVE_TIMES)
 #define HAVE_TIMES	/* so the method table will pick it up */
 static object *
 posix_times(self, args)
@@ -1239,7 +1240,7 @@
 		       (double)0,
 		       (double)0);
 }
-#endif /* NT */
+#endif /* MS_WIN32 */
 
 #ifdef HAVE_SETSID
 static object *
@@ -1502,7 +1503,7 @@
 	object *self;
 	object *args;
 {
-#if !defined(NT)
+#if !defined(MS_WIN32)
 	int fds[2];
 	int res;
 	if (!getargs(args, ""))
@@ -1513,7 +1514,7 @@
 	if (res != 0)
 		return posix_error();
 	return mkvalue("(ii)", fds[0], fds[1]);
-#else /* NT */
+#else /* MS_WIN32 */
 	HANDLE read, write;
 	BOOL ok;
 	if (!getargs(args, ""))
@@ -1524,7 +1525,7 @@
 	if (!ok)
 		return posix_error();
 	return mkvalue("(ii)", read, write);
-#endif /* NT */
+#endif /* MS_WIN32 */
 }
 #endif  /* HAVE_PIPE */
 
@@ -1716,7 +1717,7 @@
 	if (PosixError == NULL || dictinsert(d, "error", PosixError) != 0)
 		fatal("can't define nt.error");
 }
-#else /* !_MSC_VER */
+#else /* not a PC port */
 void
 initposix()
 {
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 5fd12f3..e76e12c 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -112,7 +112,7 @@
    it must be compiled by the C++ compiler, as it takes the address of
    a static data item exported from the main Python DLL.
 */
-#ifdef NT
+#ifdef MS_WINDOWS
 /* seem to be a few differences in the API */
 #define close closesocket
 #define NO_DUP /* Actually it exists on NT 3.5, but what the heck... */
@@ -169,7 +169,7 @@
 static PyObject *
 PySocket_Err()
 {
-#ifdef NT
+#ifdef MS_WINDOWS
 	if (WSAGetLastError()) {
 		PyObject *v;
 		v = Py_BuildValue("(is)", WSAGetLastError(), "winsock error");
@@ -757,7 +757,7 @@
 
 	if (!PyArg_ParseTuple(args, "|si", &mode, &bufsize))
 		return NULL;
-#ifdef NT
+#ifdef MS_WIN32
    if ( ((fd =  _open_osfhandle( s->sock_fd, _O_BINARY )) < 0) ||
         ((fd = dup(fd)) < 0) || ((fp = fdopen(fd, mode)) == NULL)) {
 #else
@@ -817,7 +817,7 @@
 		return NULL;
 	Py_BEGIN_ALLOW_THREADS
 	n = recvfrom(s->sock_fd, PyString_AsString(buf), len, flags,
-#ifndef NT
+#ifndef MS_WINDOWS
 		     (ANY *)addrbuf, &addrlen);
 #else
 		     (struct sockaddr *)addrbuf, &addrlen);
@@ -1250,7 +1250,7 @@
 }
 
 
-#ifdef NT
+#ifdef MS_WINDOWS
 
 /* Additional initialization and cleanup for NT/Windows */
 
@@ -1258,7 +1258,6 @@
 NTcleanup()
 {
 	WSACleanup();
-	fprintf(stderr, "WSACleanup called\n");
 }
 
 static int
@@ -1289,7 +1288,7 @@
 	return 0;
 }
 
-#endif /* NT */
+#endif /* MS_WINDOWS */
 
 
 /* Initialize this module.
@@ -1297,7 +1296,7 @@
    via a table in config.c, if config.c is compiled with USE_SOCKET
    defined.
 
-   For NT (which actually means any Windows variant (?)), this module
+   For MS_WINDOWS (which means any Windows variant), this module
    is actually called "_socket", and there's a wrapper "socket.py"
    which implements some missing functionality (such as makefile(),
    dup() and fromfd()).  The import of "_socket" may fail with an
@@ -1306,14 +1305,14 @@
    scheduled to be made at exit time.  */
 
 void
-#ifdef NT
+#ifdef MS_WINDOWS
 init_socket()
 #else
 initsocket()
 #endif
 {
 	PyObject *m, *d;
-#ifdef NT
+#ifdef MS_WINDOWS
 	if (!NTinit())
 		return;
 	m = Py_InitModule("_socket", PySocket_methods);