diff options
Diffstat (limited to 'libc/sysdeps/linux/powerpc/bits')
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/fcntl.h | 7 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/ioctl-types.h | 74 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/ipc.h | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/kernel_stat.h | 10 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/msq.h | 10 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/sem.h | 24 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/shm.h | 20 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/stat.h | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/termios.h | 48 |
9 files changed, 126 insertions, 83 deletions
diff --git a/libc/sysdeps/linux/powerpc/bits/fcntl.h b/libc/sysdeps/linux/powerpc/bits/fcntl.h index 30f1e4e21..ef1beeca0 100644 --- a/libc/sysdeps/linux/powerpc/bits/fcntl.h +++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h @@ -54,6 +54,7 @@ # define O_DIRECT 0400000 /* Direct disk access. */ # define O_NOATIME 01000000 /* Do not set atime. */ # define O_PATH 010000000 /* Resolve pathname but do not open file. */ +# define O_TMPFILE 020040000 /* Atomically create nameless file. */ #endif #ifdef __USE_LARGEFILE64 @@ -101,11 +102,13 @@ # define F_SETLEASE 1024 /* Set a lease. */ # define F_GETLEASE 1025 /* Enquire what lease is active. */ # define F_NOTIFY 1026 /* Request notfications on a directory. */ -# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with - close-on-exit set on new fd. */ # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */ #endif +#if defined __USE_XOPEN2K8 || defined __USE_GNU +# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with + close-on-exit set on new fd. */ +#endif /* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/libc/sysdeps/linux/powerpc/bits/ioctl-types.h b/libc/sysdeps/linux/powerpc/bits/ioctl-types.h index 87b8265af..926061fa8 100644 --- a/libc/sysdeps/linux/powerpc/bits/ioctl-types.h +++ b/libc/sysdeps/linux/powerpc/bits/ioctl-types.h @@ -1,5 +1,77 @@ +/* Structure types for pre-termios terminal ioctls. Linux/powerpc version. + Copyright (C) 2014-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." #endif -#include <termios.h> +/* Get definition of constants for use with `ioctl'. */ +#include <asm/ioctls.h> + + +struct winsize + { + unsigned short int ws_row; + unsigned short int ws_col; + unsigned short int ws_xpixel; + unsigned short int ws_ypixel; + }; + +#define NCC 10 +struct termio + { + unsigned short int c_iflag; /* input mode flags */ + unsigned short int c_oflag; /* output mode flags */ + unsigned short int c_cflag; /* control mode flags */ + unsigned short int c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Mobitex module */ +#define N_R3964 9 /* Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Profibus */ +#define N_IRDA 11 /* Linux IR */ +#define N_SMSBLOCK 12 /* SMS block mode */ +#define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/libc/sysdeps/linux/powerpc/bits/ipc.h b/libc/sysdeps/linux/powerpc/bits/ipc.h index e21debf5d..f40ffbc24 100644 --- a/libc/sysdeps/linux/powerpc/bits/ipc.h +++ b/libc/sysdeps/linux/powerpc/bits/ipc.h @@ -50,12 +50,12 @@ struct ipc_perm #if 0 unsigned long __seq; /* Sequence number. */ unsigned int __pad2; - unsigned long long int __unused1; - unsigned long long int __unused2; + unsigned long long int __uclibc_unused1; + unsigned long long int __uclibc_unused2; #else __uint32_t __seq; /* Sequence number. */ __uint32_t __pad1; - __uint64_t __unused1; - __uint64_t __unused2; + __uint64_t __uclibc_unused1; + __uint64_t __uclibc_unused2; #endif }; diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_stat.h b/libc/sysdeps/linux/powerpc/bits/kernel_stat.h index 579b5b4e2..023eefeea 100644 --- a/libc/sysdeps/linux/powerpc/bits/kernel_stat.h +++ b/libc/sysdeps/linux/powerpc/bits/kernel_stat.h @@ -39,11 +39,11 @@ struct kernel_stat64 { long long st_size; /* Size of file, in bytes. */ long st_blksize; /* Optimal block size for I/O. */ long long st_blocks; /* Number 512-byte blocks allocated. */ - struct timespec st_atim; /* Time of last access. */ - struct timespec st_mtim; /* Time of last modification. */ - struct timespec st_ctim; /* Time of last status change. */ - unsigned long int __unused4; - unsigned long int __unused5; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + unsigned long int __uclibc_unused4; + unsigned long int __uclibc_unused5; }; #endif /* _BITS_STAT_STRUCT_H */ diff --git a/libc/sysdeps/linux/powerpc/bits/msq.h b/libc/sysdeps/linux/powerpc/bits/msq.h index 70d4f06e3..995f5157b 100644 --- a/libc/sysdeps/linux/powerpc/bits/msq.h +++ b/libc/sysdeps/linux/powerpc/bits/msq.h @@ -38,15 +38,15 @@ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ #if __WORDSIZE == 32 - unsigned int __unused1; + unsigned int __uclibc_unused1; #endif __time_t msg_stime; /* time of last msgsnd command */ #if __WORDSIZE == 32 - unsigned int __unused2; + unsigned int __uclibc_unused2; #endif __time_t msg_rtime; /* time of last msgrcv command */ #if __WORDSIZE == 32 - unsigned int __unused3; + unsigned int __uclibc_unused3; #endif __time_t msg_ctime; /* time of last change */ unsigned long __msg_cbytes; /* current number of bytes on queue */ @@ -54,8 +54,8 @@ struct msqid_ds msglen_t msg_qbytes; /* max number of bytes allowed on queue */ __pid_t msg_lspid; /* pid of last msgsnd() */ __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long __unused4; - unsigned long __unused5; + unsigned long __uclibc_unused4; + unsigned long __uclibc_unused5; }; #ifdef __USE_MISC diff --git a/libc/sysdeps/linux/powerpc/bits/sem.h b/libc/sysdeps/linux/powerpc/bits/sem.h index 271a607ca..8d338eac0 100644 --- a/libc/sysdeps/linux/powerpc/bits/sem.h +++ b/libc/sysdeps/linux/powerpc/bits/sem.h @@ -35,23 +35,39 @@ #define SETALL 17 /* set all semval's */ + /* Data structure describing a set of semaphores. */ struct semid_ds { struct ipc_perm sem_perm; /* operation permission struct */ #if __WORDSIZE == 32 - unsigned int __unused1; + unsigned int __uclibc_unused1; #endif +#if defined(__UCLIBC_USE_TIME64__) + unsigned long int __sem_otime_internal_1; /* last semop() time */ + unsigned long int __sem_otime_internal_2; +#else __time_t sem_otime; /* last semop() time */ +#endif #if __WORDSIZE == 32 - unsigned int __unused2; + unsigned int __uclibc_unused2; #endif +#if defined(__UCLIBC_USE_TIME64__) + unsigned long int __sem_ctime_internal_1; /* last time changed by semctl() */ + unsigned long int __sem_ctime_internal_2; +#else __time_t sem_ctime; /* last time changed by semctl() */ +#endif unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long __unused3; - unsigned long __unused4; +#if defined(__UCLIBC_USE_TIME64__) + __time_t sem_otime; + __time_t sem_ctime; +#endif + unsigned long __uclibc_unused3; + unsigned long __uclibc_unused4; }; + /* The user should define a union like the following to use it for arguments for `semctl'. diff --git a/libc/sysdeps/linux/powerpc/bits/shm.h b/libc/sysdeps/linux/powerpc/bits/shm.h index 63e7f6ed1..7ba17f8ad 100644 --- a/libc/sysdeps/linux/powerpc/bits/shm.h +++ b/libc/sysdeps/linux/powerpc/bits/shm.h @@ -50,26 +50,26 @@ struct shmid_ds { struct ipc_perm shm_perm; /* operation permission struct */ #if __WORDSIZE == 32 - unsigned int __unused1; + unsigned int __uclibc_unused1; #endif __time_t shm_atime; /* time of last shmat() */ #if __WORDSIZE == 32 - unsigned int __unused2; + unsigned int __uclibc_unused2; #endif __time_t shm_dtime; /* time of last shmdt() */ #if __WORDSIZE == 32 - unsigned int __unused3; + unsigned int __uclibc_unused3; #endif __time_t shm_ctime; /* time of last change by shmctl() */ #if __WORDSIZE == 32 - unsigned int __unused4; + unsigned int __uclibc_unused4; #endif size_t shm_segsz; /* size of segment in bytes */ __pid_t shm_cpid; /* pid of creator */ __pid_t shm_lpid; /* pid of last shmop */ shmatt_t shm_nattch; /* number of current attaches */ - unsigned long __unused5; - unsigned long __unused6; + unsigned long __uclibc_unused5; + unsigned long __uclibc_unused6; }; #ifdef __USE_MISC @@ -91,10 +91,10 @@ struct shminfo unsigned long int shmmni; unsigned long int shmseg; unsigned long int shmall; - unsigned long int __unused1; - unsigned long int __unused2; - unsigned long int __unused3; - unsigned long int __unused4; + unsigned long int __uclibc_unused1; + unsigned long int __uclibc_unused2; + unsigned long int __uclibc_unused3; + unsigned long int __uclibc_unused4; }; struct shm_info diff --git a/libc/sysdeps/linux/powerpc/bits/stat.h b/libc/sysdeps/linux/powerpc/bits/stat.h index a90043f8a..7494586b5 100644 --- a/libc/sysdeps/linux/powerpc/bits/stat.h +++ b/libc/sysdeps/linux/powerpc/bits/stat.h @@ -80,8 +80,8 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif - unsigned long int __unused4; - unsigned long int __unused5; + unsigned long int __uclibc_unused4; + unsigned long int __uclibc_unused5; }; @@ -120,8 +120,8 @@ struct stat64 __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif - unsigned long int __unused4; - unsigned long int __unused5; + unsigned long int __uclibc_unused4; + unsigned long int __uclibc_unused5; }; # endif /* __USE_LARGEFILE64 */ diff --git a/libc/sysdeps/linux/powerpc/bits/termios.h b/libc/sysdeps/linux/powerpc/bits/termios.h index ffd99a5e2..83380685f 100644 --- a/libc/sysdeps/linux/powerpc/bits/termios.h +++ b/libc/sysdeps/linux/powerpc/bits/termios.h @@ -256,23 +256,6 @@ struct ltchars { #define TIOCPKT_NOSTOP 16 #define TIOCPKT_DOSTOP 32 -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 10 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - /* c_cc characters */ #define _VINTR 0 #define _VQUIT 1 @@ -285,36 +268,5 @@ struct termio { #define _VEOL2 8 #define _VSWTC 9 -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ |