Skip to content

Commit

Permalink
[PSDK][WIN32SS] Fix WINNT in ddraw.h; remove NT_BUILD_ENVIRONMENT usage
Browse files Browse the repository at this point in the history
Keep compatibility with MS PSDK ddraw.h file by using WINNT instead of
_WINNT_ in the preprocessor conditional test.
Incidentally this allows also removing those #define NT_BUILD_ENVIRONMENT
in the win32ss modules.

See commit 5fcfaf2 (r42346).
  • Loading branch information
HBelusca committed Nov 22, 2023
1 parent f5563ad commit 0e88f04
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion sdk/include/psdk/ddraw.h
Expand Up @@ -7,7 +7,7 @@
#include <objbase.h>
#else
#define IUnknown void
#if !defined(NT_BUILD_ENVIRONMENT) && !defined(_WINNT_)
#if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT)
#define CO_E_NOTINITIALIZED 0x800401F0L
#endif
#endif
Expand Down
1 change: 0 additions & 1 deletion win32ss/pch.h
Expand Up @@ -55,7 +55,6 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;

#include <winerror.h>
#include <wingdi.h>
#define NT_BUILD_ENVIRONMENT
#define _ENGINE_EXPORT_
#include <winddi.h>
#define OEMRESOURCE
Expand Down
1 change: 0 additions & 1 deletion win32ss/reactx/dxapi/dxapi_driver.h
Expand Up @@ -3,7 +3,6 @@
#include <windef.h>
#include <winerror.h>
#include <wingdi.h>
#define NT_BUILD_ENVIRONMENT
#include <winddi.h>

#include <ddkmapi.h>
Expand Down
4 changes: 0 additions & 4 deletions win32ss/reactx/dxg/dxg_int.h
Expand Up @@ -5,14 +5,10 @@

/* Win32 Headers */
#define WINBASEAPI
#define STARTF_USESIZE 2
#define STARTF_USEPOSITION 4
#define NT_BUILD_ENVIRONMENT

#define DDHMG_HANDLE_LIMIT 0x200000
#define DDHMG_HTOI(DdHandle) ((DWORD_PTR)DdHandle & (DDHMG_HANDLE_LIMIT-1))


#include <windef.h>
#include <winerror.h>
#include <wingdi.h>
Expand Down

1 comment on commit 0e88f04

@JoachimHenze
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit did introduce regression:
https://jira.reactos.org/browse/CORE-19400 MSVC 'warning C4005: 'CO_E_NOTINITIALIZED': macro redefinition'

Please sign in to comment.