ReactOS 0.4.16-dev-1059-gb1cf981
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
#define __cdecl
Definition: accygwin.h:79
_In_ _Value
unsigned int uintptr_t
Definition: intrin.h:47
Definition: features.h:417
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
_CRTIMP int *__cdecl _errno(void)
Definition: errno.c:17
errno_t __cdecl _get_errno(_Out_ int *_Value)
errno_t __cdecl _set_errno(_In_ int _Value)
_CRTIMP uintptr_t __cdecl __threadhandle(void)
Definition: threadid.c:16
_CRTIMP unsigned long __cdecl __threadid(void)
Definition: threadid.c:8
int errno_t
Definition: corecrt.h:615
#define _ACRTIMP
Definition: corecrt.h:138
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition: corecrt.h:109
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition: corecrt.h:117
#define _CRT_END_C_HEADER
Definition: vcruntime.h:42
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:40