|
|
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.3 ! root 20: /*
! 21: * Conditional macro definition for function calling type and variable type
! 22: * qualifiers.
! 23: */
! 24: #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
! 25:
! 26: /*
! 27: * Definitions for MS C8-32 (386/486) compiler
! 28: */
! 29: #define _CRTAPI1 __cdecl
! 30: #define _CRTAPI2 __cdecl
! 31:
! 32: #elif ( _MSC_VER == 600 )
! 33:
! 34: /*
! 35: * Definitions for old MS C6-386 compiler
! 36: */
! 37: #define _CRTAPI1 _cdecl
! 38: #define _CRTAPI2 _cdecl
! 39: #define _M_IX86 300
! 40:
! 41: #else
! 42:
! 43: /*
! 44: * Other compilers (e.g., MIPS)
! 45: */
! 46: #define _CRTAPI1
! 47: #define _CRTAPI2
! 48:
1.1.1.2 root 49: #endif
1.1 root 50:
1.1.1.3 ! root 51:
1.1 root 52: /* define NULL pointer value and the offset() macro */
53:
54: #ifndef NULL
55: #ifdef __cplusplus
56: #define NULL 0
57: #else
58: #define NULL ((void *)0)
59: #endif
60: #endif
61:
62:
63: #define offsetof(s,m) (size_t)&(((s *)0)->m)
64:
65:
66: /* declare reference to errno */
67:
68: #ifdef _MT
1.1.1.3 ! root 69: extern int * _CRTAPI1 _errno(void);
1.1 root 70: #define errno (*_errno())
71: #else
72: extern int errno;
73: #endif
74:
75:
76: /* define the implementation dependent size types */
77:
78: #ifndef _PTRDIFF_T_DEFINED
79: typedef int ptrdiff_t;
80: #define _PTRDIFF_T_DEFINED
81: #endif
82:
83: #ifndef _SIZE_T_DEFINED
84: typedef unsigned int size_t;
85: #define _SIZE_T_DEFINED
86: #endif
87:
88: #ifndef _WCHAR_T_DEFINED
89: typedef unsigned short wchar_t;
90: #define _WCHAR_T_DEFINED
91: #endif
92:
93:
94: #ifdef _MT
95:
96:
97:
1.1.1.3 ! root 98: extern unsigned long _CRTAPI1 __threadid(void);
1.1 root 99: #define _threadid (__threadid())
1.1.1.3 ! root 100: extern unsigned long _CRTAPI1 __threadhandle(void);
1.1 root 101:
102:
103:
104: #endif
105:
106: #ifdef __cplusplus
107: }
108: #endif
109:
110: #define _INC_STDDEF
111: #endif /* _INC_STDDEF */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.