OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [net/] [tcpip/] [v2_0/] [include/] [sys/] [bsdtypes.h] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
//==========================================================================
2
//
3
//      include/sys/types.h
4
//
5
//      
6
//
7
//==========================================================================
8
//####BSDCOPYRIGHTBEGIN####
9
//
10
// -------------------------------------------
11
//
12
// Portions of this software may have been derived from OpenBSD or other sources,
13
// and are covered by the appropriate copyright disclaimers included herein.
14
//
15
// -------------------------------------------
16
//
17
//####BSDCOPYRIGHTEND####
18
//==========================================================================
19
//#####DESCRIPTIONBEGIN####
20
//
21
// Author(s):    gthomas
22
// Contributors: gthomas
23
// Date:         2000-01-10
24
// Purpose:      
25
// Description:  
26
//              
27
//
28
//####DESCRIPTIONEND####
29
//
30
//==========================================================================
31
 
32
 
33
/*      $OpenBSD: types.h,v 1.15 1999/02/15 18:53:57 millert Exp $      */
34
/*      $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $   */
35
 
36
/*-
37
 * Copyright (c) 1982, 1986, 1991, 1993
38
 *      The Regents of the University of California.  All rights reserved.
39
 * (c) UNIX System Laboratories, Inc.
40
 * All or some portions of this file are derived from material licensed
41
 * to the University of California by American Telephone and Telegraph
42
 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
43
 * the permission of UNIX System Laboratories, Inc.
44
 *
45
 * Redistribution and use in source and binary forms, with or without
46
 * modification, are permitted provided that the following conditions
47
 * are met:
48
 * 1. Redistributions of source code must retain the above copyright
49
 *    notice, this list of conditions and the following disclaimer.
50
 * 2. Redistributions in binary form must reproduce the above copyright
51
 *    notice, this list of conditions and the following disclaimer in the
52
 *    documentation and/or other materials provided with the distribution.
53
 * 3. All advertising materials mentioning features or use of this software
54
 *    must display the following acknowledgement:
55
 *      This product includes software developed by the University of
56
 *      California, Berkeley and its contributors.
57
 * 4. Neither the name of the University nor the names of its contributors
58
 *    may be used to endorse or promote products derived from this software
59
 *    without specific prior written permission.
60
 *
61
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
62
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
63
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
64
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
65
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
66
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
67
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
68
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
69
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
70
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
71
 * SUCH DAMAGE.
72
 *
73
 *      @(#)types.h     8.4 (Berkeley) 1/21/94
74
 */
75
 
76
#ifndef _SYS_TYPES_H_
77
#define _SYS_TYPES_H_
78
 
79
/* Machine type dependent parameters. */
80
#include <machine/types.h>
81
 
82
#include <machine/ansi.h>
83
#include <machine/endian.h>
84
 
85
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
86
typedef unsigned char   u_char;
87
typedef unsigned short  u_short;
88
typedef unsigned int    u_int;
89
typedef unsigned long   u_long;
90
 
91
typedef unsigned char   unchar;         /* Sys V compatibility */
92
typedef unsigned short  ushort;         /* Sys V compatibility */
93
typedef unsigned int    uint;           /* Sys V compatibility */
94
typedef unsigned long   ulong;          /* Sys V compatibility */
95
#endif
96
 
97
typedef u_int64_t       u_quad_t;       /* quads */
98
typedef int64_t         quad_t;
99
typedef quad_t *        qaddr_t;
100
 
101
typedef char *          caddr_t;        /* core address */
102
typedef int32_t         daddr_t;        /* disk address */
103
typedef u_int32_t       fixpt_t;        /* fixed point number */
104
typedef long            key_t;          /* IPC key (for Sys V IPC) */
105
typedef quad_t          rlim_t;         /* resource limit */
106
typedef int32_t         segsz_t;        /* segment size */
107
typedef int32_t         swblk_t;        /* swap offset */
108
typedef u_int32_t       useconds_t;     /* microseconds */
109
typedef int32_t         suseconds_t;    /* microseconds (signed) */
110
 
111
/*
112
 * XPG4.2 states that inclusion of <netinet/in.h> must pull these
113
 * in and that inclusion of <sys/socket.h> must pull in sa_family_t.
114
 * We put there here because there are other headers that require
115
 * these types and <sys/socket.h> and <netinet/in.h> will indirectly
116
 * include <sys/types.h>.  Thus we are compliant without too many hoops.
117
 */
118
typedef u_int32_t       in_addr_t;      /* base type for internet address */
119
typedef u_int16_t       in_port_t;      /* IP port type */
120
typedef u_int8_t        sa_family_t;    /* sockaddr address family type */
121
typedef u_int32_t       socklen_t;      /* length type for network syscalls */
122
 
123
/*
124
 * These belong in unistd.h, but are placed here too to ensure that
125
 * long arguments will be promoted to off_t if the program fails to
126
 * include that header or explicitly cast them to off_t.
127
 */
128
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
129
#ifndef _KERNEL
130
#include <sys/cdefs.h>
131
__BEGIN_DECLS
132
off_t    lseek __P((int, off_t, int));
133
int      ftruncate __P((int, off_t));
134
int      truncate __P((const char *, off_t));
135
__END_DECLS
136
#endif /* !_KERNEL */
137
#endif /* !defined(_POSIX_SOURCE) ... */
138
 
139
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
140
/* Major, minor numbers, dev_t's. */
141
#define major(x)        ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))
142
#define minor(x)        ((int32_t)((x) & 0xff))
143
#define makedev(x,y)    ((dev_t)(((x) << 8) | (y)))
144
#endif
145
 
146
#if 0 //def     _BSD_CLOCK_T_
147
typedef _BSD_CLOCK_T_   clock_t;
148
#undef  _BSD_CLOCK_T_
149
#endif
150
 
151
#ifndef __ECOS
152
#if 0 //def     _BSD_SIZE_T_
153
typedef _BSD_SIZE_T_    size_t;
154
#undef  _BSD_SIZE_T_
155
#endif
156
#endif
157
 
158
#if 0 //def     _BSD_SSIZE_T_
159
typedef _BSD_SSIZE_T_   ssize_t;
160
#undef  _BSD_SSIZE_T_
161
#endif
162
 
163
#if 0 //def     _BSD_TIME_T_
164
typedef _BSD_TIME_T_    time_t;
165
#undef  _BSD_TIME_T_
166
#endif
167
 
168
#if 0 //def     _BSD_CLOCKID_T_
169
typedef _BSD_CLOCKID_T_ clockid_t;
170
#undef  _BSD_CLOCKID_T_
171
#endif
172
 
173
#if 0 //def     _BSD_TIMER_T_
174
typedef _BSD_TIMER_T_   timer_t;
175
#undef  _BSD_TIMER_T_
176
#endif
177
 
178
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
179
 
180
#if defined(__STDC__) && defined(_KERNEL)
181
/*
182
 * Forward structure declarations for function prototypes.  We include the
183
 * common structures that cross subsystem boundaries here; others are mostly
184
 * used in the same place that the structure is defined.
185
 */
186
struct  proc;
187
struct  pgrp;
188
struct  ucred;
189
struct  rusage;
190
struct  file;
191
struct  buf;
192
struct  tty;
193
struct  uio;
194
#endif
195
 
196
#endif /* !defined(_POSIX_SOURCE) ... */
197
#endif /* !_SYS_TYPES_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.