disable sstrip when using musl
[lede.git] / target / linux / ubicom32 / files / arch / ubicom32 / include / asm / posix_types.h
1 /*
2  * arch/ubicom32/include/asm/posix_types.h
3  *   Ubicom32 architecture posix types.
4  *
5  * (C) Copyright 2009, Ubicom, Inc.
6  * Copyright (C) 2004   Microtronix Datacom Ltd
7  *
8  * This file is part of the Ubicom32 Linux Kernel Port.
9  *
10  * The Ubicom32 Linux Kernel Port is free software: you can redistribute
11  * it and/or modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation, either version 2 of the
13  * License, or (at your option) any later version.
14  *
15  * The Ubicom32 Linux Kernel Port is distributed in the hope that it
16  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
17  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
18  * the GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with the Ubicom32 Linux Kernel Port.  If not,
22  * see <http://www.gnu.org/licenses/>.
23  *
24  * Ubicom32 implementation derived from (with many thanks):
25  *   arch/m68knommu
26  *   arch/blackfin
27  *   arch/parisc
28  */
29 #ifndef __ARCH_UBICOM32_POSIX_TYPES_H
30 #define __ARCH_UBICOM32_POSIX_TYPES_H
31
32 /*
33  * This file is generally used by user-level software, so you need to
34  * be a little careful about namespace pollution etc.  Also, we cannot
35  * assume GCC is being used.
36  */
37
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_timer_t;
53 typedef int             __kernel_clockid_t;
54 typedef int             __kernel_daddr_t;
55 typedef char *          __kernel_caddr_t;
56 typedef unsigned short  __kernel_uid16_t;
57 typedef unsigned short  __kernel_gid16_t;
58 typedef unsigned int    __kernel_uid32_t;
59 typedef unsigned int    __kernel_gid32_t;
60
61 typedef unsigned short  __kernel_old_uid_t;
62 typedef unsigned short  __kernel_old_gid_t;
63 typedef unsigned short  __kernel_old_dev_t;
64
65 #ifdef __GNUC__
66 typedef long long       __kernel_loff_t;
67 #endif
68
69 typedef struct {
70 #if defined(__KERNEL__) || defined(__USE_ALL)
71         int     val[2];
72 #else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
73         int     __val[2];
74 #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
75 } __kernel_fsid_t;
76
77 #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
78
79 #undef  __FD_SET
80 #define __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
81
82 #undef  __FD_CLR
83 #define __FD_CLR(d, set)        ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
84
85 #undef  __FD_ISSET
86 #define __FD_ISSET(d, set)      ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
87
88 #undef  __FD_ZERO
89 #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
90
91 #endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
92
93 #endif