Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2875 dpurdie 1
#pragma force_top_level
2
#pragma include_only_once
3
 
4
/* stddef.h: ANSI 'C' (X3J11 Oct 88) library header, section 4.1.4 */
5
/* Copyright (C) Codemist Ltd., 1988                            */
6
/* Copyright (C) Advanced Risc Machines Ltd., 1991              */
7
/* version 0.05 */
8
 
9
/*
10
 * The following types and macros are defined in several headers referred to in
11
 * the descriptions of the functions declared in that header. They are also
12
 * defined in this header file.
13
 */
14
 
15
#ifndef __stddef_h
16
#define __stddef_h
17
 
18
typedef int ptrdiff_t;
19
#ifndef __STDC__
20
#   define ptrdiff_t int   /* ANSI bans this -- delete unless pcc wants.   */
21
    /* the signed integral type of the result of subtracting two pointers. */
22
#endif
23
 
24
#ifndef __size_t
25
#  define __size_t 1
26
typedef unsigned int size_t;   /* others (e.g. <stdio.h>) define */
27
   /* the unsigned integral type of the result of the sizeof operator. */
28
#endif
29
 
30
#ifndef __wchar_t
31
#  define __wchar_t 1
32
typedef int wchar_t;                         /* also in <stdlib.h> */
33
   /*
34
    * An integral type whose range of values can represent distinct codes for
35
    * all members of the largest extended character set specified among the
36
    * supported locales; the null character shall have the code value zero and
37
    * each member of the basic character set shall have a code value when used
38
    * as the lone character in an integer character constant.
39
    */
40
#endif
41
 
42
#ifndef NULL  /* this hack is so that <stdio.h> can also define it */
43
#  define NULL 0
44
   /* null pointer constant. */
45
#endif
46
 
47
#define offsetof(type, member) \
48
    ((size_t)((char *)&(((___type type *)0)->member) - (char *)0))
49
   /*
50
    * expands to an integral constant expression that has type size_t, the
51
    * value of which is the offset in bytes, from the beginning of a structure
52
    * designated by type, of the member designated by the identifier (if the
53
    * specified member is a bit-field, the behaviour is undefined).
54
    */
55
#endif
56
 
57
/* end of stddef.h */