STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 #define _INC_STDDEF
10 
11 #include <corecrt.h>
12 
14 
15 
16 
17 #ifdef __cplusplus
18  namespace std
19  {
20  typedef decltype(__nullptr) nullptr_t;
21  }
22 
23  using ::std::nullptr_t;
24 #endif
25 
26 
27 
28 #if _CRT_FUNCTIONS_REQUIRED
29 
30  _ACRTIMP int* __cdecl _errno(void);
31  #define errno (*_errno())
32 
33  _ACRTIMP errno_t __cdecl _set_errno(_In_ int _Value);
34  _ACRTIMP errno_t __cdecl _get_errno(_Out_ int* _Value);
35 
36 #endif // _CRT_FUNCTIONS_REQUIRED
37 
38 
39 
40 #if defined _MSC_VER && !defined _CRT_USE_BUILTIN_OFFSETOF
41  #ifdef __cplusplus
42  #define offsetof(s,m) ((size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
43  #else
44  #define offsetof(s,m) ((size_t)&(((s*)0)->m))
45  #endif
46 #else
47  #define offsetof(s,m) __builtin_offsetof(s,m)
48 #endif
49 
50 _ACRTIMP extern unsigned long __cdecl __threadid(void);
51 #define _threadid (__threadid())
52 _ACRTIMP extern uintptr_t __cdecl __threadhandle(void);
53 
54 
55 
#define _Out_
Definition: sal.h:342
#define _ACRTIMP
Definition: corecrt.h:27
int errno_t
Definition: corecrt.h:476
STL namespace.
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
unsigned int uintptr_t
Definition: vadefs.h:30
#define _In_
Definition: sal.h:305
_CRT_BEGIN_C_HEADER _ACRTIMP int *__cdecl _errno(void)
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
_In_ _Value
Definition: corecrt_wstdlib.h:65
_ACRTIMP errno_t __cdecl _get_errno(_Out_ int *_Value)
_ACRTIMP uintptr_t __cdecl __threadhandle(void)
_ACRTIMP unsigned long __cdecl __threadid(void)
_ACRTIMP errno_t __cdecl _set_errno(_In_ int _Value)