diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-08-04 02:38:59 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-08-04 02:38:59 (GMT) |
commit | 70214ad55d475ab9b719ab0d908e48385bad981d (patch) | |
tree | fb2ed6d6f8958fbfacef41d99545fba214366770 /Modules/winreparse.h | |
parent | 0c859f362c77f705a235a1a8513313e5d6d01c84 (diff) | |
download | cpython-70214ad55d475ab9b719ab0d908e48385bad981d.zip cpython-70214ad55d475ab9b719ab0d908e48385bad981d.tar.gz cpython-70214ad55d475ab9b719ab0d908e48385bad981d.tar.bz2 |
Issue #17599: Use unique _Py_REPARSE_DATA_BUFFER etc names to avoid conflict
The conflict occurs with Min GW, which already defines REPARSE_DATA_BUFFER.
Also, Min GW uses a lowercase <windows.h> filename.
Diffstat (limited to 'Modules/winreparse.h')
-rw-r--r-- | Modules/winreparse.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Modules/winreparse.h b/Modules/winreparse.h index 66f7775..28049c9 100644 --- a/Modules/winreparse.h +++ b/Modules/winreparse.h @@ -2,7 +2,7 @@ #define Py_WINREPARSE_H #ifdef MS_WINDOWS -#include <Windows.h> +#include <windows.h> #ifdef __cplusplus extern "C" { @@ -10,9 +10,10 @@ extern "C" { /* The following structure was copied from http://msdn.microsoft.com/en-us/library/ff552012.aspx as the required - include doesn't seem to be present in the Windows SDK (at least as included - with Visual Studio Express). */ -typedef struct _REPARSE_DATA_BUFFER { + include km\ntifs.h isn't present in the Windows SDK (at least as included + with Visual Studio Express). Use unique names to avoid conflicting with + the structure as defined by Min GW. */ +typedef struct { ULONG ReparseTag; USHORT ReparseDataLength; USHORT Reserved; @@ -38,11 +39,11 @@ typedef struct _REPARSE_DATA_BUFFER { UCHAR DataBuffer[1]; } GenericReparseBuffer; }; -} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; +} _Py_REPARSE_DATA_BUFFER, *_Py_PREPARSE_DATA_BUFFER; -#define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER,\ - GenericReparseBuffer) -#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 ) +#define _Py_REPARSE_DATA_BUFFER_HEADER_SIZE \ + FIELD_OFFSET(_Py_REPARSE_DATA_BUFFER, GenericReparseBuffer) +#define _Py_MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 ) #ifdef __cplusplus } |