blob: b3e7483562f6d91531173a664b19963cba7526a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/* stdc.h 2.9.0 92/07/06
* - some #define hacks to attempt to allow either stdc or tradc */
/* Copyright (C) 1990 Damian Cugley */
#ifndef __STDC_H
#define __STDC_H
#include "config.h"
#ifndef __GNUC__
# define inline
# define NONRETURNING
#else
# define inline __inline__
# define NONRETURNING __volatile__
#endif
#ifdef __STDC__
typedef void *addr;
typedef const void *const_addr;
# define GLUE(x,y) x##y
#else
typedef char *addr, *const_addr;
# define GLUE(x,y) x/**/y
# define const
# define volitile
#endif /* __STDC__ */
/*
* ARGS is used so that when reading this file in trad C, the prototypes
* are ignored.
*/
#ifndef ARGS
# ifdef __STDC__
# define ARGS(X) X
# else
# define ARGS(X) ()
# endif
#endif
/*
* OK. ANSI C has a type size_t that is used for sizes of things.
* In the GNU C header files, this is unsigned long.
* In BSD, it appears this should be
* unsigned int for malloc et al. and int otherwise
* In SunOS ditto
* In V.2, ditto
*
* So I have 2 type names -- card and sizeof_t, both #define macros
* Since C does not do range-checking, card (as in cardinal)
* should be *signed* int, so that -ve numbers dont go *completely* mad.
*/
#ifdef __SDTC__
# ifndef NEEDPROTO
/* true STDC system */
# include <stddef.h>
# define sizeof_t size_t
# define card size_t
# define _SIZE_T
# endif
#endif
#ifndef sizeof_t
# define sizeof_t unsigned int
#endif
#ifndef card
# define card int
#endif
/*
* e.g.,
* addr malloc ARGS((sizeof_t));
* as opposed to
* void *malloc(size_t);
* or
* char *malloc();
* in ANSI C and tradc respectively.
*/
#endif
|