ReactOS 0.4.16-dev-2104-gb84fa49
stddef.h
Go to the documentation of this file.
1//
2// stddef.h
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// The C <stddef.h> Standard Library header.
7//
8#pragma once
9#ifndef _INC_STDDEF // include guard for 3rd party interop
10#define _INC_STDDEF
11
12#include <corecrt.h>
13
14#pragma warning(push)
15#pragma warning(disable: _UCRT_DISABLED_WARNINGS)
17
19
20
21
22#ifdef __cplusplus
23 namespace std
24 {
25 typedef decltype(__nullptr) nullptr_t;
26 }
27
28 using ::std::nullptr_t;
29#endif
30
31
32
33#if _CRT_FUNCTIONS_REQUIRED
34
35 _ACRTIMP int* __cdecl _errno(void);
36 #define errno (*_errno())
37
40
41#endif // _CRT_FUNCTIONS_REQUIRED
42
43
44
45#if defined _MSC_VER && !defined __clang__ && !defined _CRT_USE_BUILTIN_OFFSETOF
46 #ifdef __cplusplus
47 #define offsetof(s,m) ((::size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
48 #else
49 #define offsetof(s,m) ((size_t)&(((s*)0)->m))
50 #endif
51#else
52 #define offsetof(s,m) __builtin_offsetof(s,m)
53#endif
54
55_ACRTIMP extern unsigned long __cdecl __threadid(void);
56#define _threadid (__threadid())
58
59
60
63#pragma warning(pop) // _UCRT_DISABLED_WARNINGS
64#endif // _INC_STDDEF
int *CDECL _errno(void)
Definition: errno.c:215
int CDECL _set_errno(int value)
Definition: errno.c:255
int CDECL _get_errno(int *pValue)
Definition: errno.c:231
int errno_t
Definition: corecrt.h:249
#define __cdecl
Definition: corecrt.h:121
#define _ACRTIMP
Definition: corecrt.h:153
unsigned int uintptr_t
Definition: corecrt.h:185
_ACRTIMP __msvcrt_ulong __cdecl __threadid(void)
Definition: threadid.c:8
_ACRTIMP __msvcrt_ulong __cdecl __threadhandle(void)
Definition: threadid.c:16
Definition: features.h:417
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition: corecrt.h:109
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition: corecrt.h:117
_In_ _Value
#define _CRT_END_C_HEADER
Definition: vcruntime.h:42
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:40