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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [net/] [bsd_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/bsdtypes.h
4
//
5
//==========================================================================
6
//####BSDCOPYRIGHTBEGIN####
7
//
8
// -------------------------------------------
9
//
10
// Portions of this software may have been derived from OpenBSD, 
11
// FreeBSD or other sources, and are covered by the appropriate
12
// copyright disclaimers included herein.
13
//
14
// Portions created by Red Hat are
15
// Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
16
//
17
// -------------------------------------------
18
//
19
//####BSDCOPYRIGHTEND####
20
//==========================================================================
21
 
22
#ifndef _SYS_BSDTYPES_H_
23
#define _SYS_BSDTYPES_H_
24
 
25
#include <cyg/infra/cyg_type.h>
26
#include <cyg/hal/hal_arch.h>
27
 
28
#define __BIT_TYPES_DEFINED__
29
#undef uint8_t
30
#undef uint16_t
31
#undef uint32_t
32
typedef __signed char              int8_t;
33
typedef unsigned char            u_int8_t;
34
typedef unsigned char             uint8_t;
35
typedef short                     int16_t;
36
typedef unsigned short          u_int16_t;
37
typedef unsigned short           uint16_t;
38
typedef int                       int32_t;
39
typedef unsigned int            u_int32_t;
40
typedef unsigned int             uint32_t;
41
typedef long long                 int64_t;
42
typedef unsigned long long      u_int64_t;
43
typedef unsigned long long       uint64_t;
44
 
45
// Types inherited from HAL 
46
 
47
typedef CYG_ADDRESS               vaddr_t;
48
typedef CYG_ADDRWORD              vsize_t;
49
typedef CYG_ADDRESS               paddr_t;
50
typedef CYG_ADDRWORD              psize_t;
51
 
52
typedef CYG_ADDRESS           vm_offset_t;
53
typedef CYG_ADDRWORD            vm_size_t;
54
 
55
// No good HAL definition for this
56
 
57
typedef CYG_ADDRWORD           register_t;
58
 
59
 
60
// From <arch/ansi.h>
61
/*
62
 * Types which are fundamental to the implementation and may appear in
63
 * more than one standard header are defined here.  Standard headers
64
 * then use:
65
 *      #ifdef  _BSD_SIZE_T_
66
 *      typedef _BSD_SIZE_T_ size_t;
67
 *      #undef  _BSD_SIZE_T_
68
 *      #endif
69
 */
70
#define _BSD_SSIZE_T_   int              /* byte count or error */
71
#define _BSD_CLOCKID_T_ int
72
#define _BSD_TIMER_T_   int
73
#ifndef __time_t_defined                 // As defined/used by eCos libc
74
#define _BSD_CLOCK_T_   cyg_int64        /* clock() */
75
#define _BSD_TIME_T_    cyg_count32      /* time() */
76
#endif
77
 
78
#endif // _MACHINE_TYPES_H_
79
 
80
// Standard BSD types
81
typedef unsigned char   u_char;
82
typedef unsigned short  u_short;
83
typedef unsigned int    u_int;
84
typedef unsigned long   u_long;
85
typedef char           *caddr_t;
86
 
87
typedef u_int64_t       u_quad_t;       /* quads */
88
typedef int64_t         quad_t;
89
typedef quad_t *        qaddr_t;
90
 
91
/*
92
 * XPG4.2 states that inclusion of <netinet/in.h> must pull these
93
 * in and that inclusion of <sys/socket.h> must pull in sa_family_t.
94
 * We put there here because there are other headers that require
95
 * these types and <sys/socket.h> and <netinet/in.h> will indirectly
96
 * include <sys/types.h>.  Thus we are compliant without too many hoops.
97
 */
98
typedef u_int32_t       in_addr_t;      /* base type for internet address */
99
typedef u_int16_t       in_port_t;      /* IP port type */
100
typedef u_int8_t        sa_family_t;    /* sockaddr address family type */
101
typedef u_int32_t       socklen_t;      /* length type for network syscalls */

powered by: WebSVN 2.1.0

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