Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a1f917

Browse files
committed
WINDOWS_LEAN_AND_MEAN: There is no such symbol, although a very few
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.
1 parent a81d220 commit 7a1f917

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

Modules/_localemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This software comes with no warranty. Use at your own risk.
2626
#endif
2727

2828
#if defined(MS_WINDOWS)
29-
#define WINDOWS_LEAN_AND_MEAN
29+
#define WIN32_LEAN_AND_MEAN
3030
#include <windows.h>
3131
#endif
3232

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ extern int lstat(const char *, struct stat *);
217217
#include <io.h>
218218
#include <process.h>
219219
#include "osdefs.h"
220-
#define WINDOWS_LEAN_AND_MEAN
220+
/* We don't want WIN32_LEAN_AND_MEAN here -- we need ShellExecute(). */
221221
#include <windows.h>
222222
#define popen _popen
223223
#define pclose _pclose

Objects/fileobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define fileno _fileno
1313
/* can simulate truncate with Win32 API functions; see file_truncate */
1414
#define HAVE_FTRUNCATE
15-
#define WINDOWS_LEAN_AND_MEAN
15+
#define WIN32_LEAN_AND_MEAN
1616
#include <windows.h>
1717
#endif
1818

PC/w9xpopen.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
* AKA solution to the problem described in KB: Q150956.
1515
*/
1616

17-
#define WINDOWS_LEAN_AND_MEAN
17+
#define WIN32_LEAN_AND_MEAN
1818
#include <windows.h>
1919
#include <stdio.h>
20+
#include <stdlib.h> /* for malloc and its friends */
2021

2122
const char *usage =
2223
"This program is used by Python's os.popen function\n"

0 commit comments

Comments
 (0)