1#ifndef __ASM_NIOS2_POSIX_TYPES_H_ 2#define __ASM_NIOS2_POSIX_TYPES_H_ 3 4/* 5 * This file is generally used by user-level software, so you need to 6 * be a little careful about namespace pollution etc. Also, we cannot 7 * assume GCC is being used. 8 */ 9 10typedef unsigned short __kernel_dev_t; 11typedef unsigned long __kernel_ino_t; 12typedef unsigned short __kernel_mode_t; 13typedef unsigned short __kernel_nlink_t; 14typedef long __kernel_off_t; 15typedef int __kernel_pid_t; 16typedef unsigned short __kernel_ipc_pid_t; 17typedef unsigned short __kernel_uid_t; 18typedef unsigned short __kernel_gid_t; 19typedef unsigned long __kernel_size_t; 20typedef long __kernel_ssize_t; 21typedef int __kernel_ptrdiff_t; 22typedef long __kernel_time_t; 23typedef long __kernel_suseconds_t; 24typedef long __kernel_clock_t; 25typedef int __kernel_daddr_t; 26typedef char * __kernel_caddr_t; 27typedef unsigned short __kernel_uid16_t; 28typedef unsigned short __kernel_gid16_t; 29typedef unsigned int __kernel_uid32_t; 30typedef unsigned int __kernel_gid32_t; 31 32typedef unsigned short __kernel_old_uid_t; 33typedef unsigned short __kernel_old_gid_t; 34 35#ifdef __GNUC__ 36typedef long long __kernel_loff_t; 37#endif 38 39typedef struct { 40#if defined(__KERNEL__) || defined(__USE_ALL) 41 int val[2]; 42#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ 43 int __val[2]; 44#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ 45} __kernel_fsid_t; 46 47#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) 48 49#undef __FD_SET 50#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) 51 52#undef __FD_CLR 53#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) 54 55#undef __FD_ISSET 56#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) 57 58#undef __FD_ZERO 59#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) 60 61#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ 62 63#endif /* __ASM_NIOS2_POSIX_TYPES_H_ */ 64