Annotation of mstools/h/stddef.h, revision 1.1.1.1

1.1       root        1: /***
                      2: *stddef.h - definitions/declarations for common constants, types, variables
                      3: *
                      4: *      Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved.
                      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: 
                     20: #if (_MSC_VER <= 600)
                     21: #define __cdecl _cdecl
                     22: #endif
                     23: 
                     24: /* define NULL pointer value and the offset() macro */
                     25: 
                     26: #ifndef NULL
                     27: #ifdef __cplusplus
                     28: #define NULL   0
                     29: #else
                     30: #define NULL   ((void *)0)
                     31: #endif
                     32: #endif
                     33: 
                     34: 
                     35: #define offsetof(s,m)  (size_t)&(((s *)0)->m)
                     36: 
                     37: 
                     38: /* declare reference to errno */
                     39: 
                     40: #ifdef _MT
                     41: extern int * _errno(void);
                     42: #define errno  (*_errno())
                     43: #else
                     44: extern int errno;
                     45: #endif
                     46: 
                     47: 
                     48: /* define the implementation dependent size types */
                     49: 
                     50: #ifndef _PTRDIFF_T_DEFINED
                     51: typedef int ptrdiff_t;
                     52: #define _PTRDIFF_T_DEFINED
                     53: #endif
                     54: 
                     55: #ifndef _SIZE_T_DEFINED
                     56: typedef unsigned int size_t;
                     57: #define _SIZE_T_DEFINED
                     58: #endif
                     59: 
                     60: #ifndef _WCHAR_T_DEFINED
                     61: typedef unsigned short wchar_t;
                     62: #define _WCHAR_T_DEFINED
                     63: #endif
                     64: 
                     65: 
                     66: #ifdef _MT
                     67: 
                     68: 
                     69: 
                     70: extern unsigned long  __threadid(void);
                     71: #define _threadid      (__threadid())
                     72: extern unsigned long  __threadhandle(void);
                     73: #define _threadhandle  (__threadhandle())
                     74: 
                     75: 
                     76: 
                     77: #endif
                     78: 
                     79: #ifdef __cplusplus
                     80: }
                     81: #endif
                     82: 
                     83: #define _INC_STDDEF
                     84: #endif /* _INC_STDDEF */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.