Add copyrights, change to FSF.
[deliverable/binutils-gdb.git] / gdb / vx-share / vxWorks.h
CommitLineData
dd3b648e
RP
1/* vxWorks.h - VxWorks standard definitions header */
2
17eff8c1
SG
3/* Copyright 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1992 Free Software Foundation, Inc.
4
5 This code was donated by Wind River Systems, Inc. */
dd3b648e
RP
6
7/*
8modification history
9--------------------
1001z,05oct90,shl added copyright notice.
11 made #endif ANSI style.
1201y,28sep90,del added I960 defines.
1301x,29may90,del moved types to vxTypes.h
1401w,09apr90,jcf added timeout definitions.
1501v,24jan90,gae moved network configuration flags here from makefile's.
1601u,01sep88,mcl definition of INSTR dependent on processor family; added SPARC.
17 +gae added MC680X0 and defined CPU_FAMILY.
1801t,08apr89,dnw added ifdef to prevent inclusion of vxWorks.h more than once.
1901s,22jun88,dnw moved READ, WRITE, and UPDATE back here from ioLib.h.
2001r,22apr88,gae oops! forgot some #endif's in 01q.
2101q,12apr88,gae removed QUICK & WAIT; added STD_{IN,OUT,ERR}.
22 fixed #define's of FALSE, TRUE, etc.
23 moved READ, WRITE, and UPDATE to ioLib.h.
2401p,04dec87,dnw added undefine of MC68000 to get around Green Hills bug that
25 pre-defines MC68000.
2601o,12nov87,ecs added type ULONG.
2701n,08feb86,dnw added types INSTR, UINT, USHORT.
2801m,14oct85,rdc added BUS types.
2901l,16jul85,jlf added conditional for NULL and EOF.
3001k,24jun85,rdc installed condtional compile so we can include in
31 assembly language files. See instructions below.
32 Added System type macro and CPU type macro.
3301j,13jun85,dnw cleaned-up, removed more obsolete stuff to wrs.h
3401i,11sep84,jlf changed name from wrs.h to vxWorks.h. removed GLOBAL.
3501h,03jun84,dnw removed IGNORE declaration.
3601g,09apr84,jlf added MEMBER_SIZE macro.
3701f,14dec83,dnw added MSB, LSB macros
3801e,17nov83,jlf added STATUS type, for routines which return a status.
3901d,13jul83,dnw added NELEMENTS macro
4001c,14May83,dnw added OFFSET macro
4101b,17Feb83,dnw added stuff from Whitesmiths std.h
4201a,15Feb83,dnw written
43*/
44
45#ifndef INCvxWorksh
46#define INCvxWorksh
47
48#if !defined(NULL) || (NULL!=0)
49#define NULL 0
50#endif
51
52#if !defined(EOF) || (EOF!=(-1))
53#define EOF (-1)
54#endif
55
56#if !defined(FALSE) || (FALSE!=0)
57#define FALSE 0
58#endif
59
60#if !defined(TRUE) || (TRUE!=1)
61#define TRUE 1
62#endif
63
64
65#define NONE (-1) /* for times when NULL won't do */
66#define EOS '\0' /* C string terminator */
67
68
69/* return status values */
70
71#define OK 0
72#define ERROR (-1)
73
74/* timeout defines */
75
76#define NO_WAIT 0
77#define WAIT_FOREVER (-1)
78
79/* low-level I/O input, output, error fd's */
80
81#define STD_IN 0
82#define STD_OUT 1
83#define STD_ERR 2
84
85/* modes - must match O_RDONLY/O_WRONLY/O_RDWR in ioLib.h! */
86
87#define READ 0
88#define WRITE 1
89#define UPDATE 2
90
91/* SYSTEM types */
92
93#define V7 1 /* ATT version 7 */
94#define SYS_V 2 /* ATT System 5 */
95#define BSD_4_2 3 /* Berkeley BSD 4.2 */
96
97/* CPU types */
98
99/* The Green Hills compiler pre-defines "MC68000"!! */
100#ifdef MC68000
101#undef MC68000
102#endif
103
104#define MC68000 1
105#define MC68010 2
106#define MC68020 3
107#define MC68030 4
108#define MC68040 5
109#define MC680X0 9
110
111#define SPARC 10
112
113#ifndef I960
114#define I960 20
115#endif
116
117#define I960KB 21
118#define I960CA 22
119
120#if CPU==MC68000 || CPU==MC68010 || CPU==MC68020 || CPU==MC68030
121#define CPU_FAMILY MC680X0
122#endif /* CPU==MC68000 || CPU==MC68010 || CPU==MC68020 || CPU==MC68030 */
123
124#if CPU==SPARC
125#define CPU_FAMILY SPARC
126#endif /* CPU==SPARC */
127
128#if CPU==I960KB
129#define CPU_FAMILY I960
130#endif /* CPU==I960KB */
131
132#if CPU==I960CA
133#define CPU_FAMILY I960
134#endif /* CPU==I960CA */
135
136/* BUS types */
137
138#define VME_BUS 1
139#define MULTI_BUS 2
140
141/* network configuration parameters */
142
143#define INET /* include internet protocols */
144#define BSD 43 /* BSD 4.3 -like OS */
145#define BSDDEBUG /* turn on debug */
146#define GATEWAY /* tables to be initialized for gateway routing */
147
148/* common macros */
149
150#define MSB(x) (((x) >> 8) & 0xff) /* most signif byte of 2-byte integer */
151#define LSB(x) ((x) & 0xff) /* least signif byte of 2-byte integer*/
152
153#define OFFSET(structure, member) /* byte offset of member in structure*/\
154 ((int) &(((structure *) 0) -> member))
155
156#define MEMBER_SIZE(structure, member) /* size of a member of a structure */\
157 (sizeof (((structure *) 0) -> member))
158
159#define NELEMENTS(array) /* number of elements in an array */ \
160 (sizeof (array) / sizeof ((array) [0]))
161
162#define FOREVER for (;;)
163
164#define max(x, y) (((x) < (y)) ? (y) : (x))
165#define min(x, y) (((x) < (y)) ? (x) : (y))
166
167
168/* storage class specifier definitions */
169
170#define FAST register
171#define IMPORT extern
172#define LOCAL static
173
174
175/* include typedefs - must come after CPU_FAMILY definitions above */
176
177#include "vxTypes.h"
178
179#endif /* INCvxWorksh */
This page took 0.166637 seconds and 4 git commands to generate.