xref: /netbsd-src/sys/compat/linux/common/linux_olduname.h (revision 4c34be6b52a699cc7287e3b937a69ca90fd2ced9)
1 /*	$NetBSD: linux_olduname.h,v 1.1 1995/02/28 23:26:14 fvdl Exp $	*/
2 
3 /*
4  * Copyright (c) 1995 Frank van der Linden
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  * 3. All advertising materials mentioning features or use of this software
16  *    must display the following acknowledgement:
17  *      This product includes software developed for the NetBSD Project
18  *      by Frank van der Linden
19  * 4. The name of the author may not be used to endorse or promote products
20  *    derived from this software without specific prior written permission
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 #ifndef _LINUX_TYPES_H
35 #define _LINUX_TYPES_H
36 
37 
38 typedef unsigned short linux_uid_t;
39 typedef unsigned short linux_gid_t;
40 typedef unsigned short linux_dev_t;
41 typedef unsigned long linux_ino_t;
42 typedef unsigned short linux_mode_t;
43 typedef unsigned short linux_nlink_t;
44 typedef long linux_time_t;
45 typedef long linux_clock_t;
46 typedef long linux_off_t;
47 typedef int linux_pid_t;
48 typedef unsigned long linux_sigset_t;
49 typedef void (*linux_handler_t)(int);
50 
51 struct linux_statfs {
52 	int dummy;	/* Not filled in yet */
53 };
54 
55 /*
56  * Structure for uname(2)
57  */
58 struct linux_utsname {
59 	char l_sysname[65];
60 	char l_nodename[65];
61 	char l_release[65];
62 	char l_version[65];
63 	char l_machine[65];
64 	char l_domainname[65];
65 };
66 
67 struct linux_sigaction {
68 	void (*sa_handler)(int);
69 	linux_sigset_t sa_mask;
70 	unsigned long sa_flags;
71 	void (*sa_restorer)(void);
72 };
73 
74 /*
75  * Passed to the mmap() system call
76  */
77 struct linux_mmap {
78 	caddr_t lm_addr;
79 	int lm_len;
80 	int lm_prot;
81 	int lm_flags;
82 	int lm_fd;
83 	int lm_pos;
84 };
85 
86 /*
87  * Passed to the select() system call
88  */
89 struct linux_select {
90 	int nfds;
91 	fd_set *readfds;
92 	fd_set *writefds;
93 	fd_set *exceptfds;
94 	struct timeval *timeout;
95 };
96 
97 struct linux_stat {
98 	linux_dev_t		lst_dev;
99 	unsigned short		pad1;
100 	linux_ino_t		lst_ino;
101 	linux_mode_t		lst_mode;
102 	linux_nlink_t		lst_nlink;
103 	linux_uid_t		lst_uid;
104 	linux_gid_t		lst_gid;
105 	linux_dev_t		lst_rdev;
106 	unsigned short		pad2;
107 	linux_off_t		lst_size;
108 	unsigned long		lst_blksize;
109 	unsigned long		lst_blocks;
110 	linux_time_t		lst_atime;
111 	unsigned long		unused1;
112 	linux_time_t		lst_mtime;
113 	unsigned long		unused2;
114 	linux_time_t		lst_ctime;
115 	unsigned long		unused3;
116 	unsigned long		unused4;
117 	unsigned long		unused5;
118 };
119 
120 struct linux_tms {
121 	linux_clock_t ltms_utime;
122 	linux_clock_t ltms_stime;
123 	linux_clock_t ltms_cutime;
124 	linux_clock_t ltms_cstime;
125 };
126 
127 struct linux_utimbuf {
128 	linux_time_t l_actime;
129 	linux_time_t l_modtime;
130 };
131 
132 #endif /* !_LINUX_TYPES_H */
133