No empty .Rs/.Re
[netbsd-mini2440.git] / sys / compat / irix / irix_types.h
blob09f3d75a52ec77c748256fff7c1865d3c53592d7
1 /* $NetBSD: irix_types.h,v 1.18 2008/04/28 20:23:42 martin Exp $ */
3 /*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Emmanuel Dreyfus.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _IRIX_TYPES_H_
33 #define _IRIX_TYPES_H_
35 #include <sys/types.h>
37 #include <compat/svr4/svr4_types.h>
38 #include <compat/svr4/svr4_signal.h>
40 /* From IRIX's <limits.h> */
41 #define IRIX_PATH_MAX 1024
42 #define IRIX_NAME_MAX 255
44 /* From IRIX's <sys/signal.h> */
45 typedef struct {
46 __uint32_t bits[4];
47 } irix_sigset_t;
49 /* From IRIX's <sys/types.h> */
50 typedef __int32_t irix_app32_int_t;
51 typedef __uint32_t irix_app32_ulong_t;
52 typedef __int32_t irix_app32_long_t;
53 typedef __uint64_t irix_app32_ulong_long_t;
54 typedef __int64_t irix_app32_long_long_t;
55 typedef __uint32_t irix_ino_t;
56 typedef __int32_t irix_off_t;
57 typedef __uint32_t irix_app32_ptr_t;
58 typedef __uint64_t irix_k_sigset_t;
60 #if _MIPS_SZLONG == 32
61 typedef unsigned long irix_mode_t;
62 typedef unsigned long irix_dev_t;
63 typedef long irix_uid_t;
64 typedef long irix_gid_t;
65 typedef unsigned long irix_nlink_t;
66 typedef long irix_pid_t;
67 typedef long irix_time_t;
68 typedef unsigned long irix_size_t;
69 #endif
70 #if _MIPS_SZLONG == 64
71 typedef __uint32_t irix_dev_t;
72 typedef __uint32_t irix_mode_t;
73 typedef __int32_t irix_uid_t;
74 typedef __int32_t irix_gid_t;
75 typedef __uint32_t irix_nlink_t;
76 typedef __int32_t irix_pid_t;
77 typedef __int32_t irix_time_t;
78 typedef __uint32_t irix_size_t;
79 #endif
80 typedef __int32_t irix_blkcnt_t;
81 typedef __uint64_t irix_ino64_t;
82 typedef __int64_t irix_off64_t;
83 typedef __int64_t irix_blkcnt64_t;
85 /* From IRIX's <sys/ktypes.h> */
86 typedef irix_app32_long_long_t irix_irix5_n32_off_t;
87 typedef irix_app32_long_t irix_irix5_uid_t;
88 typedef irix_app32_long_t irix_irix5_clock_t;
89 typedef irix_app32_long_t irix_irix5_pid_t;
91 /* From IRIX's <sys/ktime.h> */
92 typedef irix_app32_long_t irix_irix5_time_t;
93 typedef struct irix_irix5_timespec {
94 irix_irix5_time_t tv_sec;
95 irix_app32_long_t tv_nsec;
96 } irix_irix5_timespec_t;
98 /* From IRIX's <sys/timespec.h> */
99 typedef struct irix___timespec {
100 irix_time_t tv_sec;
101 long tv_nsec;
102 } irix_timespec_t;
104 /* From IRIX's <sys/stat.h> */
105 #define IRIX__R3_STAT_VER 1
106 #define IRIX__STAT_VER 2
107 #define IRIX__STAT64_VER 3
108 struct irix_stat {
109 irix_dev_t ist_dev;
110 __uint32_t ist_pad1[3];
111 irix_ino_t ist_ino;
112 irix_mode_t ist_mode;
113 irix_nlink_t ist_nlink;
114 irix_uid_t ist_uid;
115 irix_gid_t ist_gid;
116 irix_dev_t ist_rdev;
117 __uint32_t ist_pad2[2];
118 irix_off_t ist_size;
119 __uint32_t ist_pad3;
120 irix_timespec_t ist_atim;
121 irix_timespec_t ist_mtim;
122 irix_timespec_t ist_ctim;
123 __int32_t ist_blksize;
124 irix_blkcnt_t ist_blocks;
125 char ist_fstype[16];
126 __int32_t ist_projid;
127 __uint32_t ist_pad4[7];
130 struct irix_stat64 {
131 irix_dev_t ist_dev;
132 __uint32_t ist_pad1[3];
133 irix_ino64_t ist_ino;
134 irix_mode_t ist_mode;
135 irix_nlink_t ist_nlink;
136 irix_uid_t ist_uid;
137 irix_gid_t ist_gid;
138 irix_dev_t ist_rdev;
139 __uint32_t ist_pad2[2];
140 irix_off64_t ist_size;
141 __uint32_t ist_pad3;
142 irix_timespec_t ist_atim;
143 irix_timespec_t ist_mtim;
144 irix_timespec_t ist_ctim;
145 __int32_t ist_blksize;
146 irix_blkcnt64_t ist_blocks;
147 char ist_fstype[16];
148 __int32_t ist_projid;
149 __uint32_t ist_pad4[7];
152 /* From IRIX's <sys/mount.h> */
153 typedef struct irix_mountid {
154 unsigned int ival[4];
155 } irix_mountid_t;
157 /* From IRIX's <sys/dirent.h> */
158 typedef struct irix_dirent {
159 irix_ino_t d_ino;
160 irix_off_t d_off;
161 unsigned short d_reclen;
162 char d_name[IRIX_NAME_MAX + 1];
163 } irix_dirent_t;
165 typedef struct irix_dirent64 {
166 irix_ino64_t d_ino;
167 irix_off64_t d_off;
168 unsigned short d_reclen;
169 char d_name[IRIX_NAME_MAX + 1];
170 } irix_dirent64_t;
172 /* From IRIX's <sys/utsname.h> */
173 #define IRIX_SYS_NMLN 257
174 struct irix_utsname {
175 char sysname[IRIX_SYS_NMLN];
176 char nodename[IRIX_SYS_NMLN];
177 char release[IRIX_SYS_NMLN];
178 char version[IRIX_SYS_NMLN];
179 char machine[IRIX_SYS_NMLN];
180 char m_type[IRIX_SYS_NMLN];
181 char base_rel[IRIX_SYS_NMLN];
182 char reserve5[IRIX_SYS_NMLN];
183 char reserve4[IRIX_SYS_NMLN];
184 char reserve3[IRIX_SYS_NMLN];
185 char reserve2[IRIX_SYS_NMLN];
186 char reserve1[IRIX_SYS_NMLN];
187 char reserve0[IRIX_SYS_NMLN];
191 #endif /* _IRIX_TYPES_H_ */