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/_winapi.c | |
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/_winapi.c')
-rw-r--r-- | Modules/_winapi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c index f4da8aa..91d4f01 100644 --- a/Modules/_winapi.c +++ b/Modules/_winapi.c @@ -486,7 +486,7 @@ _winapi_CreateJunction_impl(PyObject *module, LPWSTR src_path, const USHORT prefix_len = 4; USHORT print_len = 0; USHORT rdb_size = 0; - PREPARSE_DATA_BUFFER rdb = NULL; + _Py_PREPARSE_DATA_BUFFER rdb = NULL; /* Junction point creation */ HANDLE junction = NULL; @@ -542,18 +542,18 @@ _winapi_CreateJunction_impl(PyObject *module, LPWSTR src_path, - the size of the print name in bytes - the size of the substitute name in bytes - the size of two NUL terminators in bytes */ - rdb_size = REPARSE_DATA_BUFFER_HEADER_SIZE + + rdb_size = _Py_REPARSE_DATA_BUFFER_HEADER_SIZE + sizeof(rdb->MountPointReparseBuffer) - sizeof(rdb->MountPointReparseBuffer.PathBuffer) + /* Two +1's for NUL terminators. */ (prefix_len + print_len + 1 + print_len + 1) * sizeof(WCHAR); - rdb = (PREPARSE_DATA_BUFFER)PyMem_RawMalloc(rdb_size); + rdb = (_Py_PREPARSE_DATA_BUFFER)PyMem_RawMalloc(rdb_size); if (rdb == NULL) goto cleanup; memset(rdb, 0, rdb_size); rdb->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; - rdb->ReparseDataLength = rdb_size - REPARSE_DATA_BUFFER_HEADER_SIZE; + rdb->ReparseDataLength = rdb_size - _Py_REPARSE_DATA_BUFFER_HEADER_SIZE; rdb->MountPointReparseBuffer.SubstituteNameOffset = 0; rdb->MountPointReparseBuffer.SubstituteNameLength = (prefix_len + print_len) * sizeof(WCHAR); |