|
|
1.1 root 1: /***
2: *stddef.h - definitions/declarations for common constants, types, variables
3: *
1.1.1.2 ! root 4: * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
1.1 root 5: *
6: *Purpose:
7: * This file contains definitions and declarations for some commonly
8: * used constants, types, and variables.
9: * [ANSI]
10: *
11: ****/
12:
13: #ifndef _INC_STDDEF
14:
15: #ifdef __cplusplus
16: extern "C" {
17: #endif
18:
19:
1.1.1.2 ! root 20: #ifndef MIPS
1.1 root 21: #if (_MSC_VER <= 600)
22: #define __cdecl _cdecl
23: #endif
1.1.1.2 ! root 24: #endif
1.1 root 25:
26: /* define NULL pointer value and the offset() macro */
27:
28: #ifndef NULL
29: #ifdef __cplusplus
30: #define NULL 0
31: #else
32: #define NULL ((void *)0)
33: #endif
34: #endif
35:
36:
37: #define offsetof(s,m) (size_t)&(((s *)0)->m)
38:
39:
40: /* declare reference to errno */
41:
42: #ifdef _MT
43: extern int * _errno(void);
44: #define errno (*_errno())
45: #else
46: extern int errno;
47: #endif
48:
49:
50: /* define the implementation dependent size types */
51:
52: #ifndef _PTRDIFF_T_DEFINED
53: typedef int ptrdiff_t;
54: #define _PTRDIFF_T_DEFINED
55: #endif
56:
57: #ifndef _SIZE_T_DEFINED
58: typedef unsigned int size_t;
59: #define _SIZE_T_DEFINED
60: #endif
61:
62: #ifndef _WCHAR_T_DEFINED
63: typedef unsigned short wchar_t;
64: #define _WCHAR_T_DEFINED
65: #endif
66:
67:
68: #ifdef _MT
69:
70:
71:
72: extern unsigned long __threadid(void);
73: #define _threadid (__threadid())
74: extern unsigned long __threadhandle(void);
75:
76:
77:
78: #endif
79:
80: #ifdef __cplusplus
81: }
82: #endif
83:
84: #define _INC_STDDEF
85: #endif /* _INC_STDDEF */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.