[XDK] Move UNREACHABLE macro definition to ntbasedef.h

This commit is contained in:
Victor Perevertkin 2020-09-24 05:35:43 +03:00
parent 87a5311116
commit f7c58468f1
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
2 changed files with 8 additions and 5 deletions

View file

@ -9,12 +9,7 @@
#pragma once
#if defined(_MSC_VER)
#define UNREACHABLE __assume(0)
#define __builtin_expect(a,b) (a)
#elif defined(__GNUC__)
#define UNREACHABLE __builtin_unreachable()
#else
#error
#endif
//

View file

@ -800,6 +800,14 @@ $endif(_WINNT_)
#define DEFAULT_UNREACHABLE default: break
#endif
#if defined(__GNUC__) || defined(__clang__)
#define UNREACHABLE __builtin_unreachable()
#elif defined(_MSC_VER)
#define UNREACHABLE __assume(0)
#else
#define UNREACHABLE
#endif
#define VER_WORKSTATION_NT 0x40000000
#define VER_SERVER_NT 0x80000000
#define VER_SUITE_SMALLBUSINESS 0x00000001