]> granicus.if.org Git - python/commitdiff
WINDOWS_LEAN_AND_MEAN: There is no such symbol, although a very few
authorTim Peters <tim.peters@gmail.com>
Sun, 14 Jul 2002 22:14:19 +0000 (22:14 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 14 Jul 2002 22:14:19 +0000 (22:14 +0000)
MSDN sample programs use it, apparently in error.  The correct name
is WIN32_LEAN_AND_MEAN.  After switching to the correct name, in two
cases more was needed because the code actually relied on things that
disappear when WIN32_LEAN_AND_MEAN is defined.

Modules/_localemodule.c
Modules/posixmodule.c
Objects/fileobject.c
PC/w9xpopen.c

index 80c2767cde216639ac8e84cf1953d2ff77d44ddc..5ed3eaf73d936b327a4a0ee87d58b905d7dce911 100644 (file)
@@ -26,7 +26,7 @@ This software comes with no warranty. Use at your own risk.
 #endif
 
 #if defined(MS_WINDOWS)
-#define WINDOWS_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif
 
index 163263f79ad6bb0035fddae0d8929c5fb134ecff..4d9c93d592754e3b70babc132b71e03a9e46f88d 100644 (file)
@@ -217,7 +217,7 @@ extern int lstat(const char *, struct stat *);
 #include <io.h>
 #include <process.h>
 #include "osdefs.h"
-#define WINDOWS_LEAN_AND_MEAN
+/* We don't want WIN32_LEAN_AND_MEAN here -- we need ShellExecute(). */
 #include <windows.h>
 #define popen  _popen
 #define pclose _pclose
index a42502ba27b2214ef33147475b41c9f861efa82b..0b9bab82fd9dc23eed63bfafc7306d19b00ed1de 100644 (file)
@@ -12,7 +12,7 @@
 #define fileno _fileno
 /* can simulate truncate with Win32 API functions; see file_truncate */
 #define HAVE_FTRUNCATE
-#define WINDOWS_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif
 
index 8c063ac0c66c7f31d491ce200b28c1f46eac2c5b..95fc277c8854f4eff07d772615e2c4a01069d526 100644 (file)
  * AKA solution to the problem described in KB: Q150956.
  */    
 
-#define WINDOWS_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdio.h>
+#include <stdlib.h>  /* for malloc and its friends */
 
 const char *usage =
 "This program is used by Python's os.popen function\n"