mirror of
https://github.com/reactos/reactos.git
synced 2026-06-02 01:11:03 +08:00
Addendum to commit 73b54ce2a6.
Conditionally define it on the `_MSC_VER >= 1915, and add the other
`MIDL_PASS` and co. guard checks as in the official Windows PSDK.
Additionally, no-op the define for Clang to silence the following
warnings:
```
sdk\include\ddk\ntddk.h(2050,35): warning: __declspec attribute 'no_init_all' is not supported [-Wignored-attributes]
sdk\include\psdk\ntdef.h(40,95): note: expanded from macro 'DECLSPEC_NOINITALL'
```
Granted, this may be due to the fact our GitHub actions currently use
Clang 13.0.1:
```
-- The C compiler identification is Clang 13.0.1 with MSVC-like command-line
-- The CXX compiler identification is Clang 13.0.1 with MSVC-like command-line
```
while support for `no_init_all` may have been added for Clang 22.0.0,
if https://clang.llvm.org/docs/AttributeReference.html#no-init-all is correct.
(See PR https://github.com/llvm/llvm-project/pull/116847 )
90 lines
1.9 KiB
C
90 lines
1.9 KiB
C
/*
|
|
* winnt.h
|
|
*
|
|
* Windows NT native definitions for user mode
|
|
*
|
|
* This file is part of the ReactOS PSDK package.
|
|
*
|
|
* This file is auto-generated from ReactOS XDK.
|
|
*
|
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
|
*
|
|
* This source code is offered for use in the public domain. You may
|
|
* use, modify or distribute it freely.
|
|
*
|
|
* This code is distributed in the hope that it will be useful but
|
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
|
* DISCLAIMED. This includes but is not limited to warranties of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#ifndef _WINNT_
|
|
#define _WINNT_
|
|
|
|
/* We require WDK / VS 2008 or newer */
|
|
#if defined(_MSC_VER) && (_MSC_VER < 1500)
|
|
#error Compiler too old!
|
|
#endif
|
|
|
|
#include <ctype.h>
|
|
//#include <winapifamily.h>
|
|
#ifdef __GNUC__
|
|
#include <msvctarget.h>
|
|
#endif
|
|
#include <specstrings.h>
|
|
#include <kernelspecs.h>
|
|
|
|
#include <excpt.h>
|
|
#include <basetsd.h>
|
|
#include <guiddef.h>
|
|
#include <intrin.h>
|
|
|
|
#undef __need_wchar_t
|
|
#include <winerror.h>
|
|
#include <stddef.h>
|
|
#include <sdkddkver.h>
|
|
#ifndef RC_INVOKED
|
|
#include <string.h>
|
|
#endif
|
|
|
|
/* Silence some MSVC warnings */
|
|
#ifdef _MSC_VER
|
|
#pragma warning(push)
|
|
#pragma warning(disable:4201)
|
|
#pragma warning(disable:4214)
|
|
#endif
|
|
|
|
#ifndef DECLSPEC_NOINITALL
|
|
#if defined(_MSC_VER) && (!defined(__clang__) || (__clang_major__ >= 22)) && \
|
|
(_MSC_VER >= 1915) && !defined(MIDL_PASS) && !defined(SORTPP_PASS) && !defined(RC_INVOKED)
|
|
#define DECLSPEC_NOINITALL __pragma(warning(push)) __pragma(warning(disable:4845)) __declspec(no_init_all) __pragma(warning(pop))
|
|
#else
|
|
#define DECLSPEC_NOINITALL
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
$define(_WINNT_)
|
|
$define(ULONG=DWORD)
|
|
$define(USHORT=WORD)
|
|
$define(UCHAR=BYTE)
|
|
$include(ntbasedef.h)
|
|
$include(memaccess.h)
|
|
$include(interlocked.h)
|
|
$include(ketypes.h)
|
|
$include(extypes.h)
|
|
$include(rtltypes.h)
|
|
$include(rtlfuncs.h)
|
|
$include(winnt_old.h)
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif /* _WINNT_ */
|