]> git.sur5r.net Git - u-boot/blob - include/asm-blackfin/posix_types.h
Add missing Blackfin files.
[u-boot] / include / asm-blackfin / posix_types.h
1 /*
2  * U-boot - posix_types.h
3  *
4  * Copyright (c) 2005 blackfin.uclinux.org
5  *
6  * (C) Copyright 2000-2004
7  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
8  *
9  * See file CREDITS for list of people who contributed to this
10  * project.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License as
14  * published by the Free Software Foundation; either version 2 of
15  * the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25  * MA 02111-1307 USA
26  */
27
28 #ifndef __ARCH_BLACKFIN_POSIX_TYPES_H
29 #define __ARCH_BLACKFIN_POSIX_TYPES_H
30
31 /*
32  * This file is generally used by user-level software, so you need to
33  * be a little careful about namespace pollution etc.  Also, we cannot
34  * assume GCC is being used.
35  */
36
37 typedef unsigned short __kernel_dev_t;
38 typedef unsigned long __kernel_ino_t;
39 typedef unsigned short __kernel_mode_t;
40 typedef unsigned short __kernel_nlink_t;
41 typedef long __kernel_off_t;
42 typedef int __kernel_pid_t;
43 typedef unsigned short __kernel_ipc_pid_t;
44 typedef unsigned short __kernel_uid_t;
45 typedef unsigned short __kernel_gid_t;
46 typedef unsigned int __kernel_size_t;
47 typedef int __kernel_ssize_t;
48 typedef int __kernel_ptrdiff_t;
49 typedef long __kernel_time_t;
50 typedef long __kernel_suseconds_t;
51 typedef long __kernel_clock_t;
52 typedef int __kernel_daddr_t;
53 typedef char *__kernel_caddr_t;
54 typedef unsigned short __kernel_uid16_t;
55 typedef unsigned short __kernel_gid16_t;
56 typedef unsigned int __kernel_uid32_t;
57 typedef unsigned int __kernel_gid32_t;
58
59 typedef unsigned short __kernel_old_uid_t;
60 typedef unsigned short __kernel_old_gid_t;
61
62 #ifdef __GNUC__
63 typedef long long __kernel_loff_t;
64 #endif
65
66 typedef struct {
67 #if defined(__KERNEL__) || defined(__USE_ALL)
68         int val[2];
69 #else                           /* !defined(__KERNEL__) && !defined(__USE_ALL) */
70         int __val[2];
71 #endif                          /* !defined(__KERNEL__) && !defined(__USE_ALL) */
72 } __kernel_fsid_t;
73
74 #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
75
76 #undef  __FD_SET
77 #define __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
78
79 #undef  __FD_CLR
80 #define __FD_CLR(d, set)        ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
81
82 #undef  __FD_ISSET
83 #define __FD_ISSET(d, set)      ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
84
85 #undef  __FD_ZERO
86 #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
87
88 #endif  /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
89
90 #endif