From 7bf75551f0e18568435901a4362466a08646aca2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Jul 2002 21:44:15 +0000 Subject: Update. 2002-07-09 Martin Schwidefsky * sysdeps/s390/bits/byteswap.h: Unified 31/64 bit byteswap.h. * sysdeps/s390/s390-32/bits/byteswap.h: Remove. * sysdeps/s390/s390-64/bits/byteswap.h: Remove. * sysdeps/s390/bits/link.h: Unified 31/64 bit link.h. * sysdeps/s390/s390-32/bits/link.h: Remove. * sysdeps/s390/s390-64/bits/link.h: Remove. * sysdeps/s390/bits/setjmp.h: Unified 31/64 bit setjmp.h. * sysdeps/s390/s390-32/bits/setjmp.h: Remove. * sysdeps/s390/s390-64/bits/setjmp.h: Remove. * sysdeps/s390/bits/wordsize.h: New file. * sysdeps/unix/sysv/linux/s390/bits/elfclass.h: Unified 31/64 bit elfclass.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Unified 31/64 bit fcntl.h. * sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h: Remove. * sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/ipc.h: Unified 31/64 bit ipc.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/mman.h: Unified 31/64 bit mman.h. * sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h: Remove. * sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/msq.h: Unified 31/64 bit msq.h. * ysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/resource.h: Unified 31/64 bit resource.h. * sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h: Remove. * sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/sem.h: Unified 31/64 bit sem.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/shm.h: Unified 31/64 bit shm.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Unified 31/64 bit sigaction.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/siginfo.h: Unified 31/64 bit siginfo.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h: Remove. * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/socket.h: Unified 31/64 bit socket.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/stat.h: Unified 31/64 bit stat.h. * sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h: Remove. * sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h: Remove. * sysdeps/unix/sysv/linux/s390/bits/types.h: Unified 31/64 bit types.h. * sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h: Remove. * sysdeps/unix/sysv/linux/s390/net/route.h: New file. * sysdeps/unix/sysv/linux/s390/sys/procfs.h: Unified 31/64 bit procfs.h. * sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h: Remove. * sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h: Remove. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Unified 31/64 bit ucontext.h. * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Remove. * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Remove. --- ChangeLog | 58 ++++ sysdeps/s390/bits/byteswap.h | 146 +++++++++ sysdeps/s390/bits/link.h | 13 + sysdeps/s390/bits/setjmp.h | 59 ++++ sysdeps/s390/bits/wordsize.h | 7 + sysdeps/s390/s390-32/bits/byteswap.h | 91 ------ sysdeps/s390/s390-32/bits/link.h | 5 - sysdeps/s390/s390-32/bits/setjmp.h | 52 ---- sysdeps/s390/s390-64/bits/byteswap.h | 96 ------ sysdeps/s390/s390-64/bits/link.h | 5 - sysdeps/s390/s390-64/bits/setjmp.h | 52 ---- sysdeps/unix/sysv/linux/s390/bits/elfclass.h | 39 +++ sysdeps/unix/sysv/linux/s390/bits/fcntl.h | 199 +++++++++++++ sysdeps/unix/sysv/linux/s390/bits/ipc.h | 61 ++++ sysdeps/unix/sysv/linux/s390/bits/mman.h | 94 ++++++ sysdeps/unix/sysv/linux/s390/bits/msq.h | 84 ++++++ sysdeps/unix/sysv/linux/s390/bits/resource.h | 219 ++++++++++++++ sysdeps/unix/sysv/linux/s390/bits/sem.h | 92 ++++++ sysdeps/unix/sysv/linux/s390/bits/shm.h | 100 +++++++ sysdeps/unix/sysv/linux/s390/bits/sigaction.h | 110 +++++++ sysdeps/unix/sysv/linux/s390/bits/siginfo.h | 308 +++++++++++++++++++ sysdeps/unix/sysv/linux/s390/bits/socket.h | 325 +++++++++++++++++++++ sysdeps/unix/sysv/linux/s390/bits/stat.h | 194 ++++++++++++ sysdeps/unix/sysv/linux/s390/bits/types.h | 161 ++++++++++ sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h | 179 ------------ sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h | 93 ------ .../unix/sysv/linux/s390/s390-32/bits/resource.h | 209 ------------- sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h | 134 --------- sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h | 118 -------- .../unix/sysv/linux/s390/s390-32/sys/ucontext.h | 84 ------ .../unix/sysv/linux/s390/s390-64/bits/elfclass.h | 34 --- sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h | 174 ----------- sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h | 78 ----- sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h | 94 ------ sysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h | 68 ----- .../unix/sysv/linux/s390/s390-64/bits/resource.h | 201 ------------- sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h | 85 ------ sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h | 87 ------ .../unix/sysv/linux/s390/s390-64/bits/sigaction.h | 75 ----- .../unix/sysv/linux/s390/s390-64/bits/siginfo.h | 297 ------------------- .../unix/sysv/linux/s390/s390-64/bits/sigstack.h | 59 ---- sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h | 315 -------------------- sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h | 107 ------- sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h | 115 -------- sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h | 118 -------- .../unix/sysv/linux/s390/s390-64/sys/ucontext.h | 84 ------ sysdeps/unix/sysv/linux/s390/sys/procfs.h | 123 ++++++++ sysdeps/unix/sysv/linux/s390/sys/ucontext.h | 88 ++++++ 48 files changed, 2480 insertions(+), 3109 deletions(-) create mode 100644 sysdeps/s390/bits/byteswap.h create mode 100644 sysdeps/s390/bits/link.h create mode 100644 sysdeps/s390/bits/setjmp.h create mode 100644 sysdeps/s390/bits/wordsize.h delete mode 100644 sysdeps/s390/s390-32/bits/byteswap.h delete mode 100644 sysdeps/s390/s390-32/bits/link.h delete mode 100644 sysdeps/s390/s390-32/bits/setjmp.h delete mode 100644 sysdeps/s390/s390-64/bits/byteswap.h delete mode 100644 sysdeps/s390/s390-64/bits/link.h delete mode 100644 sysdeps/s390/s390-64/bits/setjmp.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/elfclass.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/ipc.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/mman.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/msq.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/resource.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/sem.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/shm.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/sigaction.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/siginfo.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/socket.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/stat.h create mode 100644 sysdeps/unix/sysv/linux/s390/bits/types.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h create mode 100644 sysdeps/unix/sysv/linux/s390/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/s390/sys/ucontext.h diff --git a/ChangeLog b/ChangeLog index c399d9908e..8a65319f52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,61 @@ +2002-07-09 Martin Schwidefsky + + * sysdeps/s390/bits/byteswap.h: Unified 31/64 bit byteswap.h. + * sysdeps/s390/s390-32/bits/byteswap.h: Remove. + * sysdeps/s390/s390-64/bits/byteswap.h: Remove. + * sysdeps/s390/bits/link.h: Unified 31/64 bit link.h. + * sysdeps/s390/s390-32/bits/link.h: Remove. + * sysdeps/s390/s390-64/bits/link.h: Remove. + * sysdeps/s390/bits/setjmp.h: Unified 31/64 bit setjmp.h. + * sysdeps/s390/s390-32/bits/setjmp.h: Remove. + * sysdeps/s390/s390-64/bits/setjmp.h: Remove. + * sysdeps/s390/bits/wordsize.h: New file. + * sysdeps/unix/sysv/linux/s390/bits/elfclass.h: Unified 31/64 bit + elfclass.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Unified 31/64 bit fcntl.h. + * sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h: Remove. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/ipc.h: Unified 31/64 bit ipc.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Unified 31/64 bit mman.h. + * sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h: Remove. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/msq.h: Unified 31/64 bit msq.h. + * ysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/resource.h: Unified 31/64 bit + resource.h. + * sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h: Remove. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/sem.h: Unified 31/64 bit sem.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/shm.h: Unified 31/64 bit shm.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Unified 31/64 bit + sigaction.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/siginfo.h: Unified 31/64 bit + siginfo.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h: Remove. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/socket.h: Unified 31/64 bit + socket.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/stat.h: Unified 31/64 bit stat.h. + * sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h: Remove. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h: Remove. + * sysdeps/unix/sysv/linux/s390/bits/types.h: Unified 31/64 bit types.h. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h: Remove. + * sysdeps/unix/sysv/linux/s390/net/route.h: New file. + * sysdeps/unix/sysv/linux/s390/sys/procfs.h: Unified 31/64 bit + procfs.h. + * sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h: Remove. + * sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h: Remove. + * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Unified 31/64 bit + ucontext.h. + * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Remove. + * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Remove. + 2002-07-11 Ulrich Drepper * Versions.def (libc): Add GLIBC_2.3. diff --git a/sysdeps/s390/bits/byteswap.h b/sysdeps/s390/bits/byteswap.h new file mode 100644 index 0000000000..6a4b4ae425 --- /dev/null +++ b/sysdeps/s390/bits/byteswap.h @@ -0,0 +1,146 @@ +/* Macros to swap the order of bytes in integer values. s390 version. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#if !defined _BYTESWAP_H && !defined _NETINET_IN_H +# error "Never use directly; include instead." +#endif + +#include + +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + +#define __bswap_constant_16(x) \ + ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) + +/* Swap bytes in 16 bit value. */ +#if defined __GNUC__ && __GNUC__ >= 2 +# if __WORDSIZE == 64 +# define __bswap_16(x) \ + (__extension__ \ + ({ unsigned short int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_16 (x); \ + else { \ + unsigned short int __tmp = (unsigned short int) (x); \ + __asm__ __volatile__ ( \ + "lrvh %0,%1" \ + : "=&d" (__v) : "m" (__tmp) ); \ + } \ + __v; })) +# else +# define __bswap_16(x) \ + (__extension__ \ + ({ unsigned short int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_16 (x); \ + else { \ + unsigned short int __tmp = (unsigned short int) (x); \ + __asm__ __volatile__ ( \ + "sr %0,%0\n" \ + "la 1,%1\n" \ + "icm %0,2,1(1)\n" \ + "ic %0,0(1)" \ + : "=&d" (__v) : "m" (__tmp) : "1"); \ + } \ + __v; })) +# endif +#else +/* This is better than nothing. */ +#define __bswap_16(x) __bswap_constant_16 (x) +#endif + +/* Swap bytes in 32 bit value. */ +#define __bswap_constant_32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) + +#if defined __GNUC__ && __GNUC__ >= 2 +# if __WORDSIZE == 64 +# define __bswap_32(x) \ + (__extension__ \ + ({ unsigned int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_32 (x); \ + else { \ + unsigned int __tmp = (unsigned int) (x); \ + __asm__ __volatile__ ( \ + "lrv %0,%1" \ + : "=&d" (__v) : "m" (__tmp)); \ + } \ + __v; })) +# else +# define __bswap_32(x) \ + (__extension__ \ + ({ unsigned int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_32 (x); \ + else { \ + unsigned int __tmp = (unsigned int) (x); \ + __asm__ __volatile__ ( \ + "la 1,%1\n" \ + "icm %0,8,3(1)\n" \ + "icm %0,4,2(1)\n" \ + "icm %0,2,1(1)\n" \ + "ic %0,0(1)" \ + : "=&d" (__v) : "m" (__tmp) : "1"); \ + } \ + __v; })) +# endif +#else +# define __bswap_32(x) __bswap_constant_32 (x) +#endif + +/* Swap bytes in 64 bit value. */ +#define __bswap_constant_64(x) \ + ((((x)&0xff00000000000000) >> 56) | (((x)&0x00ff000000000000) >> 40) | \ + (((x)&0x0000ff0000000000) >> 24) | (((x)&0x000000ff00000000) >> 8) | \ + (((x)&0x00000000ff000000) << 8) | (((x)&0x0000000000ff0000) << 24) | \ + (((x)&0x000000000000ff00) << 40) | (((x)&0x00000000000000ff) << 56)) + +#if defined __GNUC__ && __GNUC__ >= 2 +# if __WORDSIZE == 64 +# define __bswap_64(x) \ + (__extension__ \ + ({ unsigned long __w; \ + if (__builtin_constant_p (x)) \ + __w = __bswap_constant_64 (x); \ + else { \ + unsigned long __tmp = (unsigned long) (x); \ + __asm__ __volatile__ ( \ + "lrvg %0,%1" \ + : "=&d" (__w) : "m" (__tmp)); \ + } \ + __w; })) +# else +# define __bswap_64(x) \ + __extension__ \ + ({ union { unsigned long long int __ll; \ + unsigned long int __l[2]; } __w, __r; \ + __w.__ll = (x); \ + __r.__l[0] = __bswap_32 (__w.__l[1]); \ + __r.__l[1] = __bswap_32 (__w.__l[0]); \ + __r.__ll; }) +# endif +#else +# define __bswap_64(x) __bswap_constant_64 (x) +#endif + +#endif /* _BITS_BYTESWAP_H */ diff --git a/sysdeps/s390/bits/link.h b/sysdeps/s390/bits/link.h new file mode 100644 index 0000000000..fc1fba363a --- /dev/null +++ b/sysdeps/s390/bits/link.h @@ -0,0 +1,13 @@ +#if __WORDSIZE == 64 +struct link_map_machine + { + Elf64_Addr plt; /* Address of .plt + 0x2e */ + Elf64_Addr gotplt; /* Address of .got + 0x18 */ + }; +#else +struct link_map_machine + { + Elf32_Addr plt; /* Address of .plt + 0x2c */ + Elf32_Addr gotplt; /* Address of .got + 0x0c */ + }; +#endif diff --git a/sysdeps/s390/bits/setjmp.h b/sysdeps/s390/bits/setjmp.h new file mode 100644 index 0000000000..35bc9a53f3 --- /dev/null +++ b/sysdeps/s390/bits/setjmp.h @@ -0,0 +1,59 @@ +/* Copyright (C) 2000, 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* Define the machine-dependent type `jmp_buf'. IBM s390 version. */ + +#ifndef __S390_SETJMP_H__ +#define __S390_SETJMP_H__ + +#include + +#define __JB_GPR6 0 +#define __JB_GPR7 1 +#define __JB_GPR8 2 +#define __JB_GPR9 3 +#define __JB_GPR10 4 +#define __JB_GPR11 5 +#define __JB_GPR12 6 +#define __JB_GPR13 7 +#define __JB_GPR14 8 +#define __JB_GPR15 9 + +#ifndef _ASM + +typedef struct { + /* We save registers 6-15. */ + long int __gregs[10]; + +#if __WORDSIZE == 64 + /* We save fpu registers 1, 3, 5 and 7. */ + long __fpregs[8]; +#else + /* We save fpu registers 4 and 6. */ + long __fpregs[4]; +#endif +} __jmp_buf[1]; + +#endif + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf)->__gregs[__JB_GPR15]) + +#endif /* __S390_SETJMP_H__ */ diff --git a/sysdeps/s390/bits/wordsize.h b/sysdeps/s390/bits/wordsize.h new file mode 100644 index 0000000000..4f50d8586c --- /dev/null +++ b/sysdeps/s390/bits/wordsize.h @@ -0,0 +1,7 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __s390x__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +#endif diff --git a/sysdeps/s390/s390-32/bits/byteswap.h b/sysdeps/s390/s390-32/bits/byteswap.h deleted file mode 100644 index ae128042f1..0000000000 --- a/sysdeps/s390/s390-32/bits/byteswap.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Macros to swap the order of bytes in integer values. s390 version. - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use directly; include instead." -#endif - -#ifndef _BITS_BYTESWAP_H -#define _BITS_BYTESWAP_H 1 - -#define __bswap_constant_16(x) \ - ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) - -/* Swap bytes in 16 bit value. */ -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned short int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_16 (x); \ - else { \ - unsigned short int __tmp = (unsigned short int) (x); \ - __asm__ __volatile__ ( \ - "sr %0,%0\n" \ - "la 1,%1\n" \ - "icm %0,2,1(1)\n" \ - "ic %0,0(1)" \ - : "=&d" (__v) : "m" (__tmp) : "1"); \ - } \ - __v; })) -#else -/* This is better than nothing. */ -#define __bswap_16(x) __bswap_constant_16 (x) -#endif - -/* Swap bytes in 32 bit value. */ -#define __bswap_constant_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) - -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ - else { \ - unsigned int __tmp = (unsigned int) (x); \ - __asm__ __volatile__ ( \ - "la 1,%1\n" \ - "icm %0,8,3(1)\n" \ - "icm %0,4,2(1)\n" \ - "icm %0,2,1(1)\n" \ - "ic %0,0(1)" \ - : "=&d" (__v) : "m" (__tmp) : "1"); \ - } \ - __v; })) -#else -# define __bswap_32(x) __bswap_constant_32 (x) -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_64(x) \ - __extension__ \ - ({ union { unsigned long long int __ll; \ - unsigned long int __l[2]; } __w, __r; \ - __w.__ll = (x); \ - __r.__l[0] = __bswap_32 (__w.__l[1]); \ - __r.__l[1] = __bswap_32 (__w.__l[0]); \ - __r.__ll; }) -#endif - -#endif /* _BITS_BYTESWAP_H */ diff --git a/sysdeps/s390/s390-32/bits/link.h b/sysdeps/s390/s390-32/bits/link.h deleted file mode 100644 index 962cf56851..0000000000 --- a/sysdeps/s390/s390-32/bits/link.h +++ /dev/null @@ -1,5 +0,0 @@ -struct link_map_machine - { - Elf32_Addr plt; /* Address of .plt + 0x2c */ - Elf32_Addr gotplt; /* Address of .got + 0x0c */ - }; diff --git a/sysdeps/s390/s390-32/bits/setjmp.h b/sysdeps/s390/s390-32/bits/setjmp.h deleted file mode 100644 index 607cdaf11a..0000000000 --- a/sysdeps/s390/s390-32/bits/setjmp.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2000, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Define the machine-dependent type `jmp_buf'. IBM s390 version. */ - -#ifndef __S390_SETJMP_H__ -#define __S390_SETJMP_H__ - -#define __JB_GPR6 0 -#define __JB_GPR7 1 -#define __JB_GPR8 2 -#define __JB_GPR9 3 -#define __JB_GPR10 4 -#define __JB_GPR11 5 -#define __JB_GPR12 6 -#define __JB_GPR13 7 -#define __JB_GPR14 8 -#define __JB_GPR15 9 - -#ifndef _ASM - -typedef struct { - /* We save registers 6-15. */ - long int __gregs[10]; - - /* We save fpu registers 4 and 6. */ - long __fpregs[4]; -} __jmp_buf[1]; - -#endif - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf)->__gregs[__JB_GPR15]) - -#endif /* __S390_SETJMP_H__ */ diff --git a/sysdeps/s390/s390-64/bits/byteswap.h b/sysdeps/s390/s390-64/bits/byteswap.h deleted file mode 100644 index b8cfdb2cb5..0000000000 --- a/sysdeps/s390/s390-64/bits/byteswap.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Macros to swap the order of bytes in integer values. 64 bit S/390 version. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use directly; include instead." -#endif - -#ifndef _BITS_BYTESWAP_H -#define _BITS_BYTESWAP_H 1 - -#define __bswap_constant_16(x) \ - ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) - -/* Swap bytes in 16 bit value. */ -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned short int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_16 (x); \ - else { \ - unsigned short int __tmp = (unsigned short int) (x); \ - __asm__ __volatile__ ( \ - "lrvh %0,%1" \ - : "=&d" (__v) : "m" (__tmp) ); \ - } \ - __v; })) -#else -/* This is better than nothing. */ -#define __bswap_16(x) __bswap_constant_16 (x) -#endif - -/* Swap bytes in 32 bit value. */ -#define __bswap_constant_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) - -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ - else { \ - unsigned int __tmp = (unsigned int) (x); \ - __asm__ __volatile__ ( \ - "lrv %0,%1" \ - : "=&d" (__v) : "m" (__tmp)); \ - } \ - __v; })) -#else -# define __bswap_32(x) __bswap_constant_32 (x) -#endif - -/* Swap bytes in 64 bit value. */ -#define __bswap_constant_64(x) \ - ((((x)&0xff00000000000000) >> 56) | (((x)&0x00ff000000000000) >> 40) | \ - (((x)&0x0000ff0000000000) >> 24) | (((x)&0x000000ff00000000) >> 8) | \ - (((x)&0x00000000ff000000) << 8) | (((x)&0x0000000000ff0000) << 24) | \ - (((x)&0x000000000000ff00) << 40) | (((x)&0x00000000000000ff) << 56)) - -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_64(x) \ - (__extension__ \ - ({ unsigned long __w; \ - if (__builtin_constant_p (x)) \ - __w = __bswap_constant_64 (x); \ - else { \ - unsigned long __tmp = (unsigned long) (x); \ - __asm__ __volatile__ ( \ - "lrvg %0,%1" \ - : "=&d" (__w) : "m" (__tmp)); \ - } \ - __w; })) -#else -# define __bswap_64(x) __bswap_constant_64 (x) -#endif - -#endif /* _BITS_BYTESWAP_H */ diff --git a/sysdeps/s390/s390-64/bits/link.h b/sysdeps/s390/s390-64/bits/link.h deleted file mode 100644 index 34add4ffaa..0000000000 --- a/sysdeps/s390/s390-64/bits/link.h +++ /dev/null @@ -1,5 +0,0 @@ -struct link_map_machine - { - Elf64_Addr plt; /* Address of .plt + 0x2e */ - Elf64_Addr gotplt; /* Address of .got + 0x18 */ - }; diff --git a/sysdeps/s390/s390-64/bits/setjmp.h b/sysdeps/s390/s390-64/bits/setjmp.h deleted file mode 100644 index 1bb3645f9c..0000000000 --- a/sysdeps/s390/s390-64/bits/setjmp.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Define the machine-dependent type `jmp_buf'. 64 bit S/390 version. */ - -#ifndef __S390_SETJMP_H__ -#define __S390_SETJMP_H__ - -#define __JB_GPR6 0 -#define __JB_GPR7 1 -#define __JB_GPR8 2 -#define __JB_GPR9 3 -#define __JB_GPR10 4 -#define __JB_GPR11 5 -#define __JB_GPR12 6 -#define __JB_GPR13 7 -#define __JB_GPR14 8 -#define __JB_GPR15 9 - -#ifndef _ASM - -typedef struct { - /* We save registers 6-15. */ - long int __gregs[10]; - - /* We save fpu registers 4 and 6. */ - long __fpregs[8]; -} __jmp_buf[1]; - -#endif - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf)->__gregs[__JB_GPR15]) - -#endif /* __S390_SETJMP_H__ */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/elfclass.h b/sysdeps/unix/sysv/linux/s390/bits/elfclass.h new file mode 100644 index 0000000000..dd3d028093 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/elfclass.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This file specifies the native word size of the machine, which indicates + the ELF file class used for executables and shared objects on this + machine. */ + +#ifndef _LINK_H +# error "Never use directly; include instead." +#endif + +#include + +#define __ELF_NATIVE_CLASS __WORDSIZE + +#if __WORDSIZE == 64 +/* 64 bit Linux for S/390 is exceptional as it has .hash section with + 64 bit entries. */ +typedef uint64_t Elf_Symndx; +#else +/* 32 bit Linux for S/390 has normal .hash section entries with 32 bits. */ +typedef uint32_t Elf_Symndx; +#endif diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h new file mode 100644 index 0000000000..3fd044a934 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h @@ -0,0 +1,199 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 2000, 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_GNU +# define O_DIRECT 040000 /* Direct disk access. */ +# define O_DIRECTORY 0200000 /* Must be a directory. */ +# define O_NOFOLLOW 0400000 /* Do not follow links. */ +#endif + +#ifdef __USE_LARGEFILE64 +# if __WORDSIZE == 64 +/* Not necessary, files are always with 64bit off_t. */ +# define O_LARGEFILE 0 +# else +# define O_LARGEFILE 0100000 +# endif +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#if __WORDSIZE == 64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +/* Not necessary, we always have 64-bit offsets. */ +# define F_GETLK64 5 /* Get record locking info. */ +# define F_SETLK64 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 7 /* Set record locking info (blocking). */ +#else +# ifndef __USE_FILE_OFFSET64 +# define F_GETLK 5 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +# else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +# endif +# define F_GETLK64 12 /* Get record locking info. */ +# define F_SETLK64 13 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 14 /* Set record locking info (blocking). */ +#endif + +#if defined __USE_BSD || defined __USE_XOPEN2K +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +#endif + +#ifdef __USE_GNU +# 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. */ +#endif + +/* For F_[GET|SET]FL. */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* for old implementation of bsd flock () */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# if __WORDSIZE == 64 +# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ +# else +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +# endif +#endif diff --git a/sysdeps/unix/sysv/linux/s390/bits/ipc.h b/sysdeps/unix/sysv/linux/s390/bits/ipc.h new file mode 100644 index 0000000000..e3a82d0c40 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/ipc.h @@ -0,0 +1,61 @@ +/* Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_IPC_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +#define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ +#if __WORDSIZE == 64 + __mode_t mode; /* Read/write permission. */ +#else + unsigned short int mode; /* Read/write permission. */ + unsigned short int __pad1; +#endif + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad2; + unsigned long int __unused1; + unsigned long int __unused2; + }; diff --git a/sysdeps/unix/sysv/linux/s390/bits/mman.h b/sysdeps/unix/sysv/linux/s390/bits/mman.h new file mode 100644 index 0000000000..35a8d18428 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/mman.h @@ -0,0 +1,94 @@ +/* Definitions for POSIX memory map interface. Linux/s390 version. + Copyright (C) 2000, 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_GROWSUP 0x0200 /* Register stack-like segment */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x2000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/s390/bits/msq.h b/sysdeps/unix/sysv/linux/s390/bits/msq.h new file mode 100644 index 0000000000..ecdd03e170 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/msq.h @@ -0,0 +1,84 @@ +/* Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Define options for message queue functions. */ +#define MSG_NOERROR 010000 /* no error if message is too big */ +#ifdef __USE_GNU +# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#endif + +/* Types used in the structure definition. */ +typedef unsigned long int msgqnum_t; +typedef unsigned long int msglen_t; + + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ + __time_t msg_stime; /* time of last msgsnd command */ +#if __WORDSIZE != 64 + unsigned long int __unused1; +#endif + __time_t msg_rtime; /* time of last msgrcv command */ +#if __WORDSIZE != 64 + unsigned long int __unused2; +#endif + __time_t msg_ctime; /* time of last change */ +#if __WORDSIZE != 64 + unsigned long int __unused3; +#endif + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + 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 int __unused4; + unsigned long int __unused5; +}; + +#ifdef __USE_MISC + +# define msg_cbytes __msg_cbytes + +/* ipcs ctl commands */ +# define MSG_STAT 11 +# define MSG_INFO 12 + +/* buffer for msgctl calls IPC_INFO, MSG_INFO */ +struct msginfo + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + unsigned short int msgseg; + }; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/resource.h b/sysdeps/unix/sysv/linux/s390/bits/resource.h new file mode 100644 index 0000000000..dd0f463fc2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/resource.h @@ -0,0 +1,219 @@ +/* Bit values & structures for resource limits. Linux version. + Copyright (C) 2000, 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of processes. */ + RLIMIT_NPROC = 6, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Number of open files. */ + RLIMIT_NOFILE = 7, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 8, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + /* Address space limit. */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIMIT_NLIMITS = 11, + RLIM_NLIMITS = RLIMIT_NLIMITS +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#if __WORDSIZE == 64 +# define RLIM_INFINITY ~0UL +#else +# ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int) (~0UL)) +# else +# define RLIM_INFINITY 0xffffffffffffffffuLL +# endif +#endif + +#ifdef __USE_LARGEFILE64 +# if __WORDSIZE == 64 +# define RLIM64_INFINITY ~0UL +# else +# define RLIM64_INFINITY 0xffffffffffffffffuLL +# endif +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#if __WORDSIZE != 64 && !defined(__USE_FILE_OFFSET64) +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif + +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; diff --git a/sysdeps/unix/sysv/linux/s390/bits/sem.h b/sysdeps/unix/sysv/linux/s390/bits/sem.h new file mode 100644 index 0000000000..1fb152c3af --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/sem.h @@ -0,0 +1,92 @@ +/* Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* Flags for `semop'. */ +#define SEM_UNDO 0x1000 /* undo the operation on exit */ + +/* Commands for `semctl'. */ +#define GETPID 11 /* get sempid */ +#define GETVAL 12 /* get semval */ +#define GETALL 13 /* get all semval's */ +#define GETNCNT 14 /* get semncnt */ +#define GETZCNT 15 /* get semzcnt */ +#define SETVAL 16 /* set semval */ +#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 */ + __time_t sem_otime; /* last semop() time */ +#if __WORDSIZE != 64 + unsigned long int __unused1; +#endif + __time_t sem_ctime; /* last time changed by semctl() */ +#if __WORDSIZE != 64 + unsigned long int __unused2; +#endif + unsigned long int sem_nsems; /* number of semaphores in set */ + unsigned long int __unused3; + unsigned long int __unused4; +}; + +/* The user should define a union like the following to use it for arguments + for `semctl'. + + union semun + { + int val; <= value for SETVAL + struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET + unsigned short int *array; <= array for GETALL & SETALL + struct seminfo *__buf; <= buffer for IPC_INFO + }; + + Previous versions of this file used to define this union but this is + incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether + one must define the union or not. */ +#define _SEM_SEMUN_UNDEFINED 1 + +#ifdef __USE_MISC + +/* ipcs ctl cmds */ +# define SEM_STAT 18 +# define SEM_INFO 19 + +struct seminfo +{ + int semmap; + int semmni; + int semmns; + int semmnu; + int semmsl; + int semopm; + int semume; + int semusz; + int semvmx; + int semaem; +}; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/shm.h b/sysdeps/unix/sysv/linux/s390/bits/shm.h new file mode 100644 index 0000000000..38e0e92add --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/shm.h @@ -0,0 +1,100 @@ +/* Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* Permission flag for shmget. */ +#define SHM_R 0400 /* or S_IRUGO from */ +#define SHM_W 0200 /* or S_IWUGO from */ + +/* Flags for `shmat'. */ +#define SHM_RDONLY 010000 /* attach read-only else read-write */ +#define SHM_RND 020000 /* round attach address to SHMLBA */ +#define SHM_REMAP 040000 /* take-over region on attach */ + +/* Commands for `shmctl'. */ +#define SHM_LOCK 11 /* lock segment (root only) */ +#define SHM_UNLOCK 12 /* unlock segment (root only) */ + + +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; + +/* Data structure describing a set of semaphores. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ + __time_t shm_atime; /* time of last shmat() */ +#if __WORDSIZE != 64 + unsigned long int __unused1; +#endif + __time_t shm_dtime; /* time of last shmdt() */ +#if __WORDSIZE != 64 + unsigned long int __unused2; +#endif + __time_t shm_ctime; /* time of last change by shmctl() */ +#if __WORDSIZE != 64 + unsigned long int __unused3; +#endif + __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 int __unused4; + unsigned long int __unused5; + }; + +#ifdef __USE_MISC + +/* ipcs ctl commands */ +# define SHM_STAT 13 +# define SHM_INFO 14 + +/* shm_mode upper byte flags */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ + +struct shminfo + { + unsigned long int shmmax; + unsigned long int shmmin; + 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; + }; + +struct shm_info + { + int used_ids; + unsigned long int shm_tot; /* total allocated shm */ + unsigned long int shm_rss; /* total resident shm */ + unsigned long int shm_swp; /* total swapped shm */ + unsigned long int swap_attempts; + unsigned long int swap_successes; + }; + +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/sigaction.h b/sysdeps/unix/sysv/linux/s390/bits/sigaction.h new file mode 100644 index 0000000000..308cb5bd7a --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/sigaction.h @@ -0,0 +1,110 @@ +/* Definitions for 31 & 64 bit S/390 sigaction. + Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + +#include + +#if __WORDSIZE == 64 +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else + __sighandler_t sa_handler; +#endif + + /* Special flags. */ + unsigned long int sa_flags; + + /* Restore handler. */ + void (*sa_restorer) (void); + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + }; +#else +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else + __sighandler_t sa_handler; +#endif + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + + /* Restore handler. */ + void (*sa_restorer) (void); + }; +#endif + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ +#define SA_SIGINFO 4 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_UNIX98 || defined __USE_MISC +# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ +# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when + its handler is being executed. */ +# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ + +/* Some aliases for the SA_ constants. */ +# define SA_NOMASK SA_NODEFER +# define SA_ONESHOT SA_RESETHAND +# define SA_STACK SA_ONSTACK +#endif + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 0 /* Block signals. */ +#define SIG_UNBLOCK 1 /* Unblock signals. */ +#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/siginfo.h b/sysdeps/unix/sysv/linux/s390/bits/siginfo.h new file mode 100644 index 0000000000..1df3732624 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/siginfo.h @@ -0,0 +1,308 @@ +/* siginfo_t, sigevent and constants. S/390 version. + Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#if !defined _SIGNAL_H && !defined __need_siginfo_t \ + && !defined __need_sigevent_t +# error "Never include this file directly. Use instead" +#endif + +#include + +#if (!defined __have_sigval_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t \ + || defined __need_sigevent_t)) +# define __have_sigval_t 1 + +/* Type for data associated with a signal. */ +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +#endif + +#if (!defined __have_siginfo_t \ + && (defined _SIGNAL_H || defined __need_siginfo_t)) +# define __have_siginfo_t 1 + +# define __SI_MAX_SIZE 128 +# if __WORDSIZE == 64 +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) +# endif + +typedef struct siginfo + { + int si_signo; /* Signal number. */ + int si_errno; /* If non-zero, an errno value associated with + this signal, as defined in . */ + int si_code; /* Signal code. */ + + union + { + int _pad[__SI_PAD_SIZE]; + + /* kill(). */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + } _kill; + + /* POSIX.1b timers. */ + struct + { + unsigned int _timer1; + unsigned int _timer2; + } _timer; + + /* POSIX.1b signals. */ + struct + { + __pid_t si_pid; /* Sending process ID. */ + __uid_t si_uid; /* Real user ID of sending process. */ + sigval_t si_sigval; /* Signal value. */ + } _rt; + + /* SIGCHLD. */ + struct + { + __pid_t si_pid; /* Which child. */ + __uid_t si_uid; /* Real user ID of sending process. */ + int si_status; /* Exit value or signal. */ + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ + struct + { + void *si_addr; /* Faulting insn/memory ref. */ + int si_trapno; + } _sigfault; + + /* SIGPOLL. */ + struct + { + long int si_band; /* Band event for SIGPOLL. */ + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; + + +/* X/Open requires some more fields with fixed names. */ +# define si_pid _sifields._kill.si_pid +# define si_uid _sifields._kill.si_uid +# define si_timer1 _sifields._timer._timer1 +# define si_timer2 _sifields._timer._timer2 +# define si_status _sifields._sigchld.si_status +# define si_utime _sifields._sigchld.si_utime +# define si_stime _sifields._sigchld.si_stime +# define si_value _sifields._rt.si_sigval +# define si_int _sifields._rt.si_sigval.sival_int +# define si_ptr _sifields._rt.si_sigval.sival_ptr +# define si_addr _sifields._sigfault.si_addr +# define si_trapno _sifields._sigfault.si_trapno +# define si_band _sifields._sigpoll.si_band +# define si_fd _sifields._sigpoll.si_fd + + +/* Values for `si_code'. Positive values are reserved for kernel-generated + signals. */ +enum +{ + SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ +# define SI_ASYNCNL SI_ASYNCNL + SI_SIGIO, /* Sent by queued SIGIO. */ +# define SI_SIGIO SI_SIGIO + SI_ASYNCIO, /* Sent by AIO completion. */ +# define SI_ASYNCIO SI_ASYNCIO + SI_MESGQ, /* Sent by real time mesq state change. */ +# define SI_MESGQ SI_MESGQ + SI_TIMER, /* Sent by timer expiration. */ +# define SI_TIMER SI_TIMER + SI_QUEUE, /* Sent by sigqueue. */ +# define SI_QUEUE SI_QUEUE + SI_USER, /* Sent by kill, sigsend, raise. */ +# define SI_USER SI_USER + SI_KERNEL = 0x80 /* Send by kernel. */ +#define SI_KERNEL SI_KERNEL +}; + + +/* `si_code' values for SIGILL signal. */ +enum +{ + ILL_ILLOPC = 1, /* Illegal opcode. */ +# define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, /* Illegal operand. */ +# define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, /* Illegal addressing mode. */ +# define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, /* Illegal trap. */ +# define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, /* Privileged opcode. */ +# define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, /* Privileged register. */ +# define ILL_PRVREG ILL_PRVREG + ILL_COPROC, /* Coprocessor error. */ +# define ILL_COPROC ILL_COPROC + ILL_BADSTK /* Internal stack error. */ +# define ILL_BADSTK ILL_BADSTK +}; + +/* `si_code' values for SIGFPE signal. */ +enum +{ + FPE_INTDIV = 1, /* Integer divide by zero. */ +# define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, /* Integer overflow. */ +# define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, /* Floating point divide by zero. */ +# define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, /* Floating point overflow. */ +# define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, /* Floating point underflow. */ +# define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, /* Floating point inexact result. */ +# define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, /* Floating point invalid operation. */ +# define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB /* Subscript out of range. */ +# define FPE_FLTSUB FPE_FLTSUB +}; + +/* `si_code' values for SIGSEGV signal. */ +enum +{ + SEGV_MAPERR = 1, /* Address not mapped to object. */ +# define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR /* Invalid permissions for mapped object. */ +# define SEGV_ACCERR SEGV_ACCERR +}; + +/* `si_code' values for SIGBUS signal. */ +enum +{ + BUS_ADRALN = 1, /* Invalid address alignment. */ +# define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, /* Non-existant physical address. */ +# define BUS_ADRERR BUS_ADRERR + BUS_OBJERR /* Object specific hardware error. */ +# define BUS_OBJERR BUS_OBJERR +}; + +/* `si_code' values for SIGTRAP signal. */ +enum +{ + TRAP_BRKPT = 1, /* Process breakpoint. */ +# define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE /* Process trace trap. */ +# define TRAP_TRACE TRAP_TRACE +}; + +/* `si_code' values for SIGCHLD signal. */ +enum +{ + CLD_EXITED = 1, /* Child has exited. */ +# define CLD_EXITED CLD_EXITED + CLD_KILLED, /* Child was killed. */ +# define CLD_KILLED CLD_KILLED + CLD_DUMPED, /* Child terminated abnormally. */ +# define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, /* Traced child has trapped. */ +# define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, /* Child has stopped. */ +# define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED /* Stopped child has continued. */ +# define CLD_CONTINUED CLD_CONTINUED +}; + +/* `si_code' values for SIGPOLL signal. */ +enum +{ + POLL_IN = 1, /* Data input available. */ +# define POLL_IN POLL_IN + POLL_OUT, /* Output buffers available. */ +# define POLL_OUT POLL_OUT + POLL_MSG, /* Input message available. */ +# define POLL_MSG POLL_MSG + POLL_ERR, /* I/O error. */ +# define POLL_ERR POLL_ERR + POLL_PRI, /* High priority input available. */ +# define POLL_PRI POLL_PRI + POLL_HUP /* Device disconnected. */ +# define POLL_HUP POLL_HUP +}; + +# undef __need_siginfo_t +#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ + + +#if (defined _SIGNAL_H || defined __need_sigevent_t) \ + && !defined __have_sigevent_t +# define __have_sigevent_t 1 + +/* Structure to transport application-defined values with signals. */ +# define __SIGEV_MAX_SIZE 64 +# if __WORDSIZE == 64 +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) +# else +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) +# endif + +/* Forward declaration of the `pthread_attr_t' type. */ +struct __pthread_attr_s; + +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[__SIGEV_PAD_SIZE]; + + struct + { + void (*_function) (sigval_t); /* Function to start. */ + struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ + } _sigev_thread; + } _sigev_un; + } sigevent_t; + +/* POSIX names to access some of the members. */ +# define sigev_notify_function _sigev_un._sigev_thread._function +# define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +/* `sigev_notify' values. */ +enum +{ + SIGEV_SIGNAL = 0, /* Notify via signal. */ +# define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, /* Other notification: meaningless. */ +# define SIGEV_NONE SIGEV_NONE + SIGEV_THREAD /* Deliver via thread creation. */ +# define SIGEV_THREAD SIGEV_THREAD +}; + +#endif /* have _SIGNAL_H. */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/socket.h b/sysdeps/unix/sysv/linux/s390/bits/socket.h new file mode 100644 index 0000000000..0bdd8db8ae --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/socket.h @@ -0,0 +1,325 @@ +/* System-specific socket constants and types. Linux/s390 version. + Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef __BITS_SOCKET_H +#define __BITS_SOCKET_H + +#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +# error "Never include directly; use instead." +#endif + +#include + +#define __need_size_t +#define __need_NULL +#include + +#include +#include + +/* Type for length arguments in socket calls. */ +#ifndef __socklen_t_defined +typedef __socklen_t socklen_t; +# define __socklen_t_defined +#endif + +/* Types of sockets. */ +enum __socket_type +{ + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + SOCK_RAW = 3, /* Raw protocol interface. */ +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, /* Reliably-delivered messages. */ +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_PACKET = 10 /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ +#define SOCK_PACKET SOCK_PACKET +}; + +/* Protocol families. */ +#define PF_UNSPEC 0 /* Unspecified. */ +#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +#define PF_INET 2 /* IP protocol family. */ +#define PF_AX25 3 /* Amateur Radio AX.25. */ +#define PF_IPX 4 /* Novell Internet Protocol. */ +#define PF_APPLETALK 5 /* Appletalk DDP. */ +#define PF_NETROM 6 /* Amateur radio NetROM. */ +#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +#define PF_ATMPVC 8 /* ATM PVCs. */ +#define PF_X25 9 /* Reserved for X.25 project. */ +#define PF_INET6 10 /* IP version 6. */ +#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +#define PF_DECnet 12 /* Reserved for DECnet project. */ +#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +#define PF_SECURITY 14 /* Security callback pseudo AF. */ +#define PF_KEY 15 /* PF_KEY key management API. */ +#define PF_NETLINK 16 +#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +#define PF_PACKET 17 /* Packet family. */ +#define PF_ASH 18 /* Ash. */ +#define PF_ECONET 19 /* Acorn Econet. */ +#define PF_ATMSVC 20 /* ATM SVCs. */ +#define PF_SNA 22 /* Linux SNA Project */ +#define PF_IRDA 23 /* IRDA sockets. */ +#define PF_PPPOX 24 /* PPPoX sockets. */ +#define PF_WANPIPE 25 /* Wanpipe API sockets. */ +#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ +#define PF_MAX 32 /* For now.. */ + +/* Address families. */ +#define AF_UNSPEC PF_UNSPEC +#define AF_LOCAL PF_LOCAL +#define AF_UNIX PF_UNIX +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_AX25 PF_AX25 +#define AF_IPX PF_IPX +#define AF_APPLETALK PF_APPLETALK +#define AF_NETROM PF_NETROM +#define AF_BRIDGE PF_BRIDGE +#define AF_ATMPVC PF_ATMPVC +#define AF_X25 PF_X25 +#define AF_INET6 PF_INET6 +#define AF_ROSE PF_ROSE +#define AF_DECnet PF_DECnet +#define AF_NETBEUI PF_NETBEUI +#define AF_SECURITY PF_SECURITY +#define AF_KEY PF_KEY +#define AF_NETLINK PF_NETLINK +#define AF_ROUTE PF_ROUTE +#define AF_PACKET PF_PACKET +#define AF_ASH PF_ASH +#define AF_ECONET PF_ECONET +#define AF_ATMSVC PF_ATMSVC +#define AF_SNA PF_SNA +#define AF_IRDA PF_IRDA +#define AF_PPPOX PF_PPPOX +#define AF_WANPIPE PF_WANPIPE +#define AF_BLUETOOTH PF_BLUETOOTH +#define AF_MAX PF_MAX + +/* Socket level values. Others are defined in the appropriate headers. + + XXX These definitions also should go into the appropriate headers as + far as they are available. */ +#define SOL_RAW 255 +#define SOL_DECNET 261 +#define SOL_X25 262 +#define SOL_PACKET 263 +#define SOL_ATM 264 /* ATM layer (cell level). */ +#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +#define SOL_IRDA 266 + +/* Maximum queue length specifiable by listen. */ +#define SOMAXCONN 128 + +/* Get the definition of the macro to define the common sockaddr members. */ +#include + +/* Structure describing a generic socket address. */ +struct sockaddr + { + __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ + char sa_data[14]; /* Address data. */ + }; + + +/* Structure large enough to hold any socket address (with the historical + exception of AF_UNIX). We reserve 128 bytes. */ +#if ULONG_MAX > 0xffffffff +# define __ss_aligntype __uint64_t +#else +# define __ss_aligntype __uint32_t +#endif +#define _SS_SIZE 128 +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) + +struct sockaddr_storage + { + __SOCKADDR_COMMON (ss_); /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; + }; + + +/* Bits in the FLAGS argument to `send', `recv', et al. */ +enum + { + MSG_OOB = 0x01, /* Process out-of-band data. */ +#define MSG_OOB MSG_OOB + MSG_PEEK = 0x02, /* Peek at incoming messages. */ +#define MSG_PEEK MSG_PEEK + MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +#define MSG_DONTROUTE MSG_DONTROUTE +#ifdef __USE_GNU + /* DECnet uses a different name. */ + MSG_TRYHARD = MSG_DONTROUTE, +# define MSG_TRYHARD MSG_DONTROUTE +#endif + MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +#define MSG_CTRUNC MSG_CTRUNC + MSG_PROXY = 0x10, /* Supply or ask second address. */ +#define MSG_PROXY MSG_PROXY + MSG_TRUNC = 0x20, +#define MSG_TRUNC MSG_TRUNC + MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +#define MSG_DONTWAIT MSG_DONTWAIT + MSG_EOR = 0x80, /* End of record. */ +#define MSG_EOR MSG_EOR + MSG_WAITALL = 0x100, /* Wait for a full request. */ +#define MSG_WAITALL MSG_WAITALL + MSG_FIN = 0x200, +#define MSG_FIN MSG_FIN + MSG_SYN = 0x400, +#define MSG_SYN MSG_SYN + MSG_CONFIRM = 0x800, /* Confirm path validity. */ +#define MSG_CONFIRM MSG_CONFIRM + MSG_RST = 0x1000, +#define MSG_RST MSG_RST + MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +#define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ +#define MSG_NOSIGNAL MSG_NOSIGNAL + MSG_MORE = 0x8000 /* Sender will send more. */ +#define MSG_MORE MSG_MORE + }; + + +/* Structure describing messages sent by + `sendmsg' and received by `recvmsg'. */ +struct msghdr + { + void *msg_name; /* Address to send to/receive from. */ + socklen_t msg_namelen; /* Length of address data. */ + + struct iovec *msg_iov; /* Vector of data to send/receive into. */ +#if __WORDSIZE == 64 + size_t msg_iovlen; /* Number of elements in the vector. */ +#else + int msg_iovlen; /* Number of elements in the vector. */ +#endif + + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ +#if __WORDSIZE == 64 + size_t msg_controllen; /* Ancillary data buffer length. */ +#else + socklen_t msg_controllen; /* Ancillary data buffer length. */ +#endif + + int msg_flags; /* Flags on received message. */ + }; + +/* Structure used for storage of ancillary data object information. */ +struct cmsghdr + { + size_t cmsg_len; /* Length of data in cmsg_data plus length + of cmsghdr structure. */ + int cmsg_level; /* Originating protocol. */ + int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ +#endif + }; + +/* Ancillary data object manipulation macros. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +#else +# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +#endif +#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +#define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & (size_t) ~(sizeof (size_t) - 1)) +#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + + CMSG_ALIGN (sizeof (struct cmsghdr))) +#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) + +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) __THROW; +#ifdef __USE_EXTERN_INLINES +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif +_EXTERN_INLINE struct cmsghdr * +__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ + return 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + /* No more entries. */ + return 0; + return __cmsg; +} +#endif /* Use `extern inline'. */ + +/* Socket level message types. This must match the definitions in + . */ +enum + { + SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ +#define SCM_RIGHTS SCM_RIGHTS +#ifdef __USE_BSD + SCM_CREDENTIALS = 0x02, /* Credentials passing. */ +# define SCM_CREDENTIALS SCM_CREDENTIALS +#endif + __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ + }; + +/* User visible structure for SCM_CREDENTIALS message */ + +struct ucred +{ + pid_t pid; /* PID of sending process. */ + uid_t uid; /* UID of sending process. */ + gid_t gid; /* GID of sending process. */ +}; + +/* Get socket manipulation related informations from kernel headers. */ +#include + + +/* Structure used to manipulate the SO_LINGER option. */ +struct linger + { + int l_onoff; /* Nonzero to linger on close. */ + int l_linger; /* Time to linger. */ + }; + +#endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/stat.h b/sysdeps/unix/sysv/linux/s390/bits/stat.h new file mode 100644 index 0000000000..419a4151c1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/stat.h @@ -0,0 +1,194 @@ +/* Copyright (C) 2000, 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif + +#include + +#if __WORDSIZE == 64 +/* Versions of the `struct stat' data structure. */ +# define _STAT_VER_KERNEL 0 +# define _STAT_VER_LINUX 1 +# define _STAT_VER _STAT_VER_LINUX + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 +#else +/* Versions of the `struct stat' data structure. */ +# define _STAT_VER_LINUX_OLD 1 +# define _STAT_VER_KERNEL 1 +# define _STAT_VER_SVR4 2 +# define _STAT_VER_LINUX 3 +# define _STAT_VER _STAT_VER_LINUX + +/* Versions of the `xmknod' interface. */ +# define _MKNOD_VER_LINUX 1 +# define _MKNOD_VER_SVR4 2 +# define _MKNOD_VER _MKNOD_VER_LINUX +#endif + +#if __WORDSIZE == 64 +struct stat + { + __dev_t st_dev; /* Device. */ + __ino_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ + __time_t st_atime; /* Time of last access. */ + long int __reserved0; /* Reserved for atime.nanoseconds. */ + __time_t st_mtime; /* Time of last modification. */ + long int __reserved1; /* Reserved for mtime.nanoseconds. */ + __time_t st_ctime; /* Time of last status change. */ + long int __reserved2; /* Reserved for ctime.nanoseconds. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ + long int __unused[3]; + }; +#else +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; +# ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +# else + __ino_t __st_ino; /* 32bit file serial number. */ +# endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; +# ifndef __USE_FILE_OFFSET64 + unsigned long int __unused4; + unsigned long int __unused5; +# else + __ino64_t st_ino; /* File serial number. */ +# endif + }; +#endif + +#ifdef __USE_LARGEFILE64 +# if __WORDSIZE == 64 +/* Note stat64 is the same shape as stat. */ +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ + __time_t st_atime; /* Time of last access. */ + long int __reserved0; /* Reserved for atime.nanoseconds. */ + __time_t st_mtime; /* Time of last modification. */ + long int __reserved1; /* Reserved for mtime.nanoseconds. */ + __time_t st_ctime; /* Time of last status change. */ + long int __reserved2; /* Reserved for ctime.nanoseconds. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + long int __unused[3]; + }; +# else +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + __time_t st_atime; /* Time of last access. */ + unsigned long int __unused1; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int __unused2; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int __unused3; + __ino64_t st_ino; /* File serial number. */ + }; +# endif +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/types.h b/sysdeps/unix/sysv/linux/s390/bits/types.h new file mode 100644 index 0000000000..693fcee1cf --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/bits/types.h @@ -0,0 +1,161 @@ +/* Copyright (C) 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_TYPES_H +#define _BITS_TYPES_H 1 + +#include + +#define __need_size_t +#include + +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; +#if __WORDSIZE == 64 +typedef unsigned long __u_quad_t; +typedef long __quad_t; +#else +# ifdef __GLIBC_HAVE_LONG_LONG +__extension__ typedef unsigned long long int __u_quad_t; +__extension__ typedef long long int __quad_t; +# else +typedef struct + { + long int __val[2]; + } __quad_t; +typedef struct + { + __u_long __val[2]; + } __u_quad_t; +# endif +#endif +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +#if __WORDSIZE == 64 +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +#else +# ifdef __GLIBC_HAVE_LONG_LONG +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; +# endif +#endif +typedef __quad_t *__qaddr_t; + +typedef __u_quad_t __dev_t; /* Type of device numbers. */ +typedef __u_int __uid_t; /* Type of user identifications. */ +typedef __u_int __gid_t; /* Type of group identifications. */ +typedef __u_long __ino_t; /* Type of file serial numbers. */ +typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ +typedef __u_long __nlink_t; /* Type of file link counts. */ +typedef long int __off_t; /* Type of file sizes and offsets. */ +typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ +typedef int __pid_t; /* Type of process identifications. */ +typedef long __ssize_t; /* Type of a byte count, or error. */ +typedef __u_long __rlim_t; /* Type of resource counts. */ +typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ +typedef __u_int __id_t; /* General type for ID. */ + +typedef struct + { + int __val[2]; + } __fsid_t; /* Type of file system IDs. */ + +/* Everythin' else. */ +typedef int __daddr_t; /* The type of a disk address. */ +typedef char *__caddr_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ + +typedef long int __clock_t; + +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +typedef int __key_t; + +/* Used in `struct shmid_ds'. */ +#if __WORDSIZE == 64 +typedef int __ipc_pid_t; +#else +typedef unsigned short int __ipc_pid_t; +#endif + +/* Type to represent block size. */ +typedef long int __blksize_t; + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef long int __blkcnt_t; +typedef __quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef __u_long __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef __u_long __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + +/* Type of file serial numbers. */ +typedef __u_quad_t __ino64_t; + +/* Type of file sizes and offsets. */ +typedef __loff_t __off64_t; + +/* Used in XTI. */ +typedef int __t_scalar_t; +typedef unsigned int __t_uscalar_t; + +/* Duplicates info from stdint.h but this is used in unistd.h. */ +typedef long int __intptr_t; + +/* Duplicate info from sys/socket.h. */ +typedef unsigned int __socklen_t; + + +/* Now add the thread types. */ +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include +#endif + +#endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h deleted file mode 100644 index 240a3dc6f0..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h +++ /dev/null @@ -1,179 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FCNTL_H -# error "Never use directly; include instead." -#endif - - -#include - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 - -#ifdef __USE_GNU -# define O_DIRECT 040000 /* Direct disk access. */ -# define O_DIRECTORY 0200000 /* Must be a directory. */ -# define O_NOFOLLOW 0400000 /* Do not follow links. */ -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0100000 -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifndef __USE_FILE_OFFSET64 -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW 7 /* Set record locking info (blocking). */ -#else -# define F_GETLK F_GETLK64 /* Get record locking info. */ -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ -# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ -#endif -#define F_GETLK64 12 /* Get record locking info. */ -#define F_SETLK64 13 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 14 /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_XOPEN2K -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# 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. */ -#endif - -/* For F_[GET|SET]FL. */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ -#define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* operations for bsd flock(), also used by the kernel implementation */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -#ifdef __USE_GNU -# define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ -# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ -#endif - -#ifdef __USE_GNU -/* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#else - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -#endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h b/sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h deleted file mode 100644 index 2926b04064..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Definitions for POSIX memory map interface. Linux/s390 version. - Copyright (C) 2000, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MMAN_H -# error "Never use directly; include instead." -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -/* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h b/sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h deleted file mode 100644 index 204c293584..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h +++ /dev/null @@ -1,209 +0,0 @@ -/* Bit values & structures for resource limits. Linux version. - Copyright (C) 2000, 2001, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - /* Address space limit. */ - RLIMIT_AS = 9, -#define RLIMIT_AS RLIMIT_AS - - /* Number of processes. */ - RLIMIT_NPROC = 6, -#define RLIMIT_NPROC RLIMIT_NPROC - - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS - - RLIMIT_NLIMITS = 11, - RLIM_NLIMITS = RLIMIT_NLIMITS -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((unsigned long int) (~0UL)) -#else -# define RLIM_INFINITY 0xffffffffffffffffuLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0xffffffffffffffffuLL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h b/sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h deleted file mode 100644 index 4e06b059ef..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 1 -#define _STAT_VER_KERNEL 1 -#define _STAT_VER_SVR4 2 -#define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 1 -#define _MKNOD_VER_SVR4 2 -#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino_t __st_ino; /* 32bit file serial number. */ -#endif - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; -#ifndef __USE_FILE_OFFSET64 - unsigned long int __unused4; - unsigned long int __unused5; -#else - __ino64_t st_ino; /* File serial number. */ -#endif - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned int __pad1; - - __ino_t __st_ino; /* 32bit file serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - __ino64_t st_ino; /* File serial number. */ - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. Note that these macros always evaluate to zero. But - they do it by enforcing the correct use of the macros. */ -#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h b/sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h deleted file mode 100644 index 112d86d322..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 2000, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_PROCFS_H -#define _SYS_PROCFS_H 1 - -/* This is somewhat modelled after the file of the same name on SVR4 - systems. It provides a definition of the core file format for ELF - used on Linux. It doesn't have anything to do with the /proc file - system, even though Linux has one. - - Anyway, the whole purpose of this file is for GDB and GDB only. - Don't read too much into it. Don't use it for anything other than - GDB unless you know what you are doing. */ - -#include -#include -#include -#include -#include - -__BEGIN_DECLS - -typedef greg_t elf_greg_t; -#define ELF_NGREG NGREG -typedef gregset_t elf_gregset_t; -typedef fpreg_t elf_fpreg_t; -typedef fpregset_t elf_fpregset_t; - -/* Signal info. */ -struct elf_siginfo - { - int si_signo; /* Signal number. */ - int si_code; /* Extra code. */ - int si_errno; /* Errno. */ - }; - - -/* Definitions to generate Intel SVR4-like core files. These mostly - have the same names as the SVR4 types with "elf_" tacked on the - front to prevent clashes with Linux definitions, and the typedef - forms have been avoided. This is mostly like the SVR4 structure, - but more Linuxy, with things that Linux does not support and which - GDB doesn't really use excluded. */ - -struct elf_prstatus - { - struct elf_siginfo pr_info; /* Info associated with signal. */ - short int pr_cursig; /* Current signal. */ - unsigned long int pr_sigpend; /* Set of pending signals. */ - unsigned long int pr_sighold; /* Set of held signals. */ - __pid_t pr_pid; - __pid_t pr_ppid; - __pid_t pr_pgrp; - __pid_t pr_sid; - struct timeval pr_utime; /* User time. */ - struct timeval pr_stime; /* System time. */ - struct timeval pr_cutime; /* Cumulative user time. */ - struct timeval pr_cstime; /* Cumulative system time. */ - elf_gregset_t pr_reg; /* GP registers. */ - int pr_fpvalid; /* True if math copro being used. */ - }; - - -#define ELF_PRARGSZ (80) /* Number of chars for args. */ - -struct elf_prpsinfo - { - char pr_state; /* Numeric process state. */ - char pr_sname; /* Char for pr_state. */ - char pr_zomb; /* Zombie. */ - char pr_nice; /* Nice val. */ - unsigned long int pr_flag; /* Flags. */ - unsigned short int pr_uid; - unsigned short int pr_gid; - int pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* Filename of executable. */ - char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ - }; - -/* The rest of this file provides the types for emulation of the - Solaris interfaces that should be implemented by - users of libthread_db. */ - -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef elf_gregset_t prgregset_t; -typedef elf_fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore have only one PID type. */ -typedef __pid_t lwpid_t; - -/* Process status and info. In the end we do provide typedefs for them. */ -typedef struct elf_prstatus prstatus_t; -typedef struct elf_prpsinfo prpsinfo_t; - -__END_DECLS - -#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h b/sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h deleted file mode 100644 index dfc7968a83..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. - Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 -/* Forward definition to avoid parse errors */ -struct ucontext; -typedef struct ucontext ucontext_t; -#include -#include - -/* We need the signal context definitions even if they are not used - included in . */ -#include - -/* Type for a program status word. */ -typedef struct -{ - unsigned long mask; - unsigned long addr; -} __attribute__ ((aligned(8))) __psw_t; - -/* Type for a general-purpose register. */ -typedef unsigned long greg_t; - -/* And the whole bunch of them. We should have used `struct s390_regs', - but to avoid name space pollution and since the tradition says that - the register set is an array, we make gregset_t a simple array - that has the same size as s390_regs. This is needed for the - elf_prstatus structure. */ -#define NGREG 36 -/* Must match kernels psw_t alignment. */ -typedef greg_t gregset_t[NGREG] __attribute__ ((aligned(8))); - -typedef union - { - double d; - float f; - } fpreg_t; - -/* Register set for the floating-point registers. */ -typedef struct - { - unsigned int fpc; - fpreg_t fprs[16]; - } fpregset_t; - -/* Context to describe whole processor state. */ -typedef struct - { - __psw_t psw; - unsigned long gregs[16]; - unsigned int aregs[16]; - fpregset_t fpregs; - } mcontext_t; - -/* Userlevel context. */ -struct ucontext - { - unsigned long int uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - __sigset_t uc_sigmask; - }; - - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h deleted file mode 100644 index e78ba8256a..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use directly; include instead." -#endif - -#include - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* 64 bit Linux for S/390 is exceptional as it has .hash section with - 64 bit entries. */ -typedef uint64_t Elf_Symndx; diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h deleted file mode 100644 index 87605f9bf7..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h +++ /dev/null @@ -1,174 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux for 64 bit S/390. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FCNTL_H -# error "Never use directly; include instead." -#endif - - -#include - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 -#define O_DIRECT 040000 - -#ifdef __USE_GNU -# define O_DIRECTORY 0200000 /* must be a directory */ -# define O_NOFOLLOW 0400000 /* don't follow links */ -#endif - -#ifdef __USE_LARGEFILE64 -/* Not necessary, files are always with 64bit off_t. */ -# define O_LARGEFILE 0 -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW 7 /* Set record locking info (blocking). */ - -/* Not necessary, we always have 64-bit offsets. */ -#define F_GETLK64 5 /* Get record locking info. */ -#define F_SETLK64 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 7 /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_XOPEN2K -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# 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. */ -#endif - -/* For F_[GET|SET]FL. */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ -#define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -#ifdef __USE_GNU -# define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ -# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ -#endif - - -#ifdef __USE_GNU -/* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -#endif - -/* We don't need to support __USE_FILE_OFFSET64. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ -#endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h deleted file mode 100644 index 0b1bc7ebaa..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_IPC_H -# error "Never use directly; include instead." -#endif - -#include - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -#define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - __mode_t mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __unused1; - unsigned long int __unused2; - }; - - - -__BEGIN_DECLS - -/* The actual system call: all functions are multiplexed by this. */ -extern int __ipc __P ((int __call, int __first, int __second, int __third, - void *__ptr)); - -__END_DECLS - -/* The codes for the functions to use the multiplexer `__ipc'. */ -#define IPCOP_semop 1 -#define IPCOP_semget 2 -#define IPCOP_semctl 3 -#define IPCOP_msgsnd 11 -#define IPCOP_msgrcv 12 -#define IPCOP_msgget 13 -#define IPCOP_msgctl 14 -#define IPCOP_shmat 21 -#define IPCOP_shmdt 22 -#define IPCOP_shmget 23 -#define IPCOP_shmctl 24 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h deleted file mode 100644 index 2da4914243..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Definitions for POSIX memory map interface. 64 bit S/390 version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MMAN_H -# error "Never use directly; include instead." -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -/* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_GROWSUP 0x0200 /* Register stack-like segment */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 0x1 /* Sync memory asynchronously. */ -#define MS_SYNC 0x4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 0x2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 0x1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 0x2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h deleted file mode 100644 index 6643c83696..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MSG_H -#error "Never use directly; include instead." -#endif - -#include - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#define MSG_EXCEPT 020000 /* recv any msg except of specified type */ - - -/* Structure of record for one message inside the kernel. - The type `struct __msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __time_t msg_stime; /* time of last msgsnd command */ - __time_t msg_rtime; /* time of last msgrcv command */ - __time_t msg_ctime; /* time of last change */ - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - unsigned long int msg_qnum; /* number of messages currently on queue */ - unsigned long int 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 int __unused1; - unsigned long int __unused2; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h deleted file mode 100644 index 1df6871813..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h +++ /dev/null @@ -1,201 +0,0 @@ -/* Bit values & structures for resource limits. 64 bit S/390 version. - Copyright (C) 2001, 2002 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Number of processes. */ - RLIMIT_NPROC = 6, -#define RLIMIT_NPROC RLIMIT_NPROC - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - /* Address space limit (?) */ - RLIMIT_AS = 9, -#define RLIMIT_AS RLIMIT_AS - - /* Maximum number of file locks. */ - RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS RLIMIT_LOCKS - - RLIMIT_NLIMITS = 11, - RLIM_NLIMITS = RLIMIT_NLIMITS -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -# define RLIM_INFINITY ~0UL - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY ~0UL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -typedef __rlim64_t rlim_t; -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h deleted file mode 100644 index 1ab1c85d81..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SEM_H -# error "Never include directly; use instead." -#endif - -#include - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#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 */ - __time_t sem_otime; /* last semop() time */ - __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused1; - unsigned long int __unused2; -}; - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h deleted file mode 100644 index fa8aa250f8..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SHM_H -# error "Never include directly; use instead." -#endif - -#include - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from */ -#define SHM_W 0200 /* or S_IWUGO from */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - - -/* Data structure describing a set of semaphores. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - size_t shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - unsigned long int shm_nattch; /* number of current attaches */ - unsigned long int __unused1; - unsigned long int __unused2; - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ - -struct shminfo - { - unsigned long int shmmax; - unsigned long int shmmin; - 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; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h deleted file mode 100644 index 38af8d8654..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Definitions for 64 bit S/390 sigaction. 64 bit S/390 version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SIGNAL_H -# error "Never include directly; use instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Special flags. */ - unsigned long int sa_flags; - - /* Restore handler. */ - void (*sa_restorer) (void); - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */ -#define SA_SIGINFO 0x00000004 -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal - when its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historic no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* for blocking signals */ -#define SIG_UNBLOCK 1 /* for unblocking signals */ -#define SIG_SETMASK 2 /* for setting the signal mask */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h deleted file mode 100644 index eb69c68d64..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h +++ /dev/null @@ -1,297 +0,0 @@ -/* siginfo_t, sigevent and constants. 64 bit S/390 version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use instead" -#endif - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in . */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - int si_trapno; - } _sigfault; - - /* SIGPOLL. */ - struct - { - long int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_trapno _sifields._sigfault.si_trapno -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD -}; - -#endif /* have _SIGNAL_H. */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h deleted file mode 100644 index e19549acf5..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h +++ /dev/null @@ -1,59 +0,0 @@ -/* sigstack, sigaltstack definitions. 64 bit S/390 version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SIGNAL_H -# error "Never include this file directly. Use instead" -#endif - -#ifndef _SIGSTACK_H -#define _SIGSTACK_H 1 - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - __ptr_t ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - __ptr_t ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; - -#endif /* bits/sigstack.h */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h deleted file mode 100644 index 3b689563e0..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h +++ /dev/null @@ -1,315 +0,0 @@ -/* System-specific socket constants and types. Linux/s390 version. - Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H 1 - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include directly; use instead." -#endif - -#define __need_size_t -#define __need_NULL -#include - -#include -#include - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ -#define MSG_MORE MSG_MORE - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - . */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h deleted file mode 100644 index 50ad1b1daf..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_KERNEL 0 -#define _STAT_VER_LINUX 1 -#define _STAT_VER _STAT_VER_LINUX - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 0 - -struct stat - { - __dev_t st_dev; /* Device. */ - __ino_t st_ino; /* File serial number. */ - __nlink_t st_nlink; /* Link count. */ - __mode_t st_mode; /* File mode. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - int pad0; - __dev_t st_rdev; /* Device number, if device. */ - __off_t st_size; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - long int __reserved0; /* Reserved for atime.nanoseconds. */ - __time_t st_mtime; /* Time of last modification. */ - long int __reserved1; /* Reserved for mtime.nanoseconds. */ - __time_t st_ctime; /* Time of last status change. */ - long int __reserved2; /* Reserved for ctime.nanoseconds. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ - long int __unused[3]; - }; - -#ifdef __USE_LARGEFILE64 -/* Note stat64 is the same shape as stat. */ -struct stat64 - { - __dev_t st_dev; /* Device. */ - __ino64_t st_ino; /* File serial number. */ - __nlink_t st_nlink; /* Link count. */ - __mode_t st_mode; /* File mode. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - int pad0; - __dev_t st_rdev; /* Device number, if device. */ - __off_t st_size; /* Size of file, in bytes. */ - __time_t st_atime; /* Time of last access. */ - long int __reserved0; /* Reserved for atime.nanoseconds. */ - __time_t st_mtime; /* Time of last modification. */ - long int __reserved1; /* Reserved for mtime.nanoseconds. */ - __time_t st_ctime; /* Time of last status change. */ - long int __reserved2; /* Reserved for ctime.nanoseconds. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ - long int __unused[3]; - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. */ -#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h b/sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h deleted file mode 100644 index cb40434926..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include - -#define __need_size_t -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short int __u_short; -typedef unsigned int __u_int; -typedef unsigned long int __u_long; -typedef unsigned long int __u_quad_t; -typedef long int __quad_t; -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -typedef signed long int __int64_t; -typedef unsigned long int __uint64_t; -typedef __quad_t *__qaddr_t; - -typedef __uint64_t __dev_t; /* Type of device numbers. */ -typedef __uint32_t __uid_t; /* Type of user identifications. */ -typedef __uint32_t __gid_t; /* Type of group identifications. */ -typedef __uint64_t __ino_t; /* Type of file serial numbers. */ -typedef __uint64_t __ino64_t; /* "" (LFS) */ -typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */ -typedef __uint64_t __nlink_t; /* Type of file link counts. */ -typedef __int64_t __off_t; /* Type of file sizes and offsets. */ -typedef __int64_t __off64_t; /* "" (LFS) */ -typedef __int64_t __loff_t; /* Type of file sizes and offsets. */ -typedef __int32_t __pid_t; /* Type of process identifications. */ -typedef __int64_t __ssize_t; /* Type of a byte count, or error. */ -typedef __uint64_t __rlim_t; /* Type of resource counts. */ -typedef __uint64_t __rlim64_t; /* "" (LFS) */ -typedef __int64_t __blkcnt_t; /* Type to count nr disk blocks. */ -typedef __int64_t __blkcnt64_t; /* "" (LFS) */ -typedef __uint64_t __fsblkcnt_t; /* Type to count file system blocks. */ -typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */ -typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */ -typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */ -typedef __uint32_t __id_t; /* General type for IDs. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* Type of a disk address. */ -typedef char *__caddr_t; /* Type of a core address. */ -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ -typedef long int __clock_t; -typedef int __key_t; /* Type of a SYSV IPC key. */ - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - -/* Used in `struct shmid_ds'. */ -typedef int __ipc_pid_t; - -/* type to represent block size. */ -typedef long int __blksize_t; - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - -/* Used in XTI. */ -typedef int __t_scalar_t; -typedef unsigned int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef long int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include -#endif - -#endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h b/sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h deleted file mode 100644 index 492b1aa943..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_PROCFS_H -#define _SYS_PROCFS_H 1 - -/* This is somewhat modelled after the file of the same name on SVR4 - systems. It provides a definition of the core file format for ELF - used on Linux. It doesn't have anything to do with the /proc file - system, even though Linux has one. - - Anyway, the whole purpose of this file is for GDB and GDB only. - Don't read too much into it. Don't use it for anything other than - GDB unless you know what you are doing. */ - -#include -#include -#include -#include -#include - -__BEGIN_DECLS - -typedef greg_t elf_greg_t; -#define ELF_NGREG NGREG -typedef gregset_t elf_gregset_t; -typedef fpreg_t elf_fpreg_t; -typedef fpregset_t elf_fpregset_t; - -/* Signal info. */ -struct elf_siginfo - { - int si_signo; /* Signal number. */ - int si_code; /* Extra code. */ - int si_errno; /* Errno. */ - }; - - -/* Definitions to generate Intel SVR4-like core files. These mostly - have the same names as the SVR4 types with "elf_" tacked on the - front to prevent clashes with Linux definitions, and the typedef - forms have been avoided. This is mostly like the SVR4 structure, - but more Linuxy, with things that Linux does not support and which - GDB doesn't really use excluded. */ - -struct elf_prstatus - { - struct elf_siginfo pr_info; /* Info associated with signal. */ - short int pr_cursig; /* Current signal. */ - unsigned long int pr_sigpend; /* Set of pending signals. */ - unsigned long int pr_sighold; /* Set of held signals. */ - __pid_t pr_pid; - __pid_t pr_ppid; - __pid_t pr_pgrp; - __pid_t pr_sid; - struct timeval pr_utime; /* User time. */ - struct timeval pr_stime; /* System time. */ - struct timeval pr_cutime; /* Cumulative user time. */ - struct timeval pr_cstime; /* Cumulative system time. */ - elf_gregset_t pr_reg; /* GP registers. */ - int pr_fpvalid; /* True if math copro being used. */ - }; - - -#define ELF_PRARGSZ (80) /* Number of chars for args. */ - -struct elf_prpsinfo - { - char pr_state; /* Numeric process state. */ - char pr_sname; /* Char for pr_state. */ - char pr_zomb; /* Zombie. */ - char pr_nice; /* Nice val. */ - unsigned long int pr_flag; /* Flags. */ - unsigned int pr_uid; - unsigned int pr_gid; - int pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* Filename of executable. */ - char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ - }; - -/* The rest of this file provides the types for emulation of the - Solaris interfaces that should be implemented by - users of libthread_db. */ - -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef elf_gregset_t prgregset_t; -typedef elf_fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore have only one PID type. */ -typedef __pid_t lwpid_t; - -/* Process status and info. In the end we do provide typedefs for them. */ -typedef struct elf_prstatus prstatus_t; -typedef struct elf_prpsinfo prpsinfo_t; - -__END_DECLS - -#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h b/sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h deleted file mode 100644 index 336178e758..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 -/* Forward definition to avoid parse errors */ -struct ucontext; -typedef struct ucontext ucontext_t; -#include -#include - -/* We need the signal context definitions even if they are not used - included in . */ -#include - -/* Type for a program status word. */ -typedef struct -{ - unsigned long mask; - unsigned long addr; -} __attribute__ ((aligned(8))) __psw_t; - -/* Type for a general-purpose register. */ -typedef unsigned long greg_t; - -/* And the whole bunch of them. We should have used `struct s390_regs', - but to avoid name space pollution and since the tradition says that - the register set is an array, we make gregset_t a simple array - that has the same size as s390_regs. This is needed for the - elf_prstatus structure. */ -#define NGREG 27 -/* Must match kernels psw_t alignment. */ -typedef greg_t gregset_t[NGREG] __attribute__ ((aligned(8))); - -typedef union - { - double d; - float f; - } fpreg_t; - -/* Register set for the floating-point registers. */ -typedef struct - { - unsigned int fpc; - fpreg_t fprs[16]; - } fpregset_t; - -/* Context to describe whole processor state. */ -typedef struct - { - __psw_t psw; - unsigned long gregs[16]; - unsigned int aregs[16]; - fpregset_t fpregs; - } mcontext_t; - -/* Userlevel context. */ -struct ucontext - { - unsigned long int uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - __sigset_t uc_sigmask; - }; - - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/s390/sys/procfs.h b/sysdeps/unix/sysv/linux/s390/sys/procfs.h new file mode 100644 index 0000000000..e4aaa39fe1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/sys/procfs.h @@ -0,0 +1,123 @@ +/* Copyright (C) 2000, 2001, 2002 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somewhat modelled after the file of the same name on SVR4 + systems. It provides a definition of the core file format for ELF + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ + +#include +#include +#include +#include +#include + +__BEGIN_DECLS + +typedef greg_t elf_greg_t; +#define ELF_NGREG NGREG +typedef gregset_t elf_gregset_t; +typedef fpreg_t elf_fpreg_t; +typedef fpregset_t elf_fpregset_t; + +/* Signal info. */ +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args. */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ +#if __WORDSIZE == 64 + unsigned int pr_uid; + unsigned int pr_gid; +#else + unsigned short int pr_uid; + unsigned short int pr_gid; +#endif + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + +/* The rest of this file provides the types for emulation of the + Solaris interfaces that should be implemented by + users of libthread_db. */ + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + +/* Process status and info. In the end we do provide typedefs for them. */ +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/s390/sys/ucontext.h b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h new file mode 100644 index 0000000000..4e32361c3b --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h @@ -0,0 +1,88 @@ +/* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 +/* Forward definition to avoid parse errors */ +struct ucontext; +typedef struct ucontext ucontext_t; +#include +#include + +/* We need the signal context definitions even if they are not used + included in . */ +#include + +/* Type for a program status word. */ +typedef struct +{ + unsigned long mask; + unsigned long addr; +} __attribute__ ((aligned(8))) __psw_t; + +/* Type for a general-purpose register. */ +typedef unsigned long greg_t; + +/* And the whole bunch of them. We should have used `struct s390_regs', + but to avoid name space pollution and since the tradition says that + the register set is an array, we make gregset_t a simple array + that has the same size as s390_regs. This is needed for the + elf_prstatus structure. */ +#if __WORDSIZE == 64 +# define NGREG 27 +#else +# define NGREG 36 +#endif +/* Must match kernels psw_t alignment. */ +typedef greg_t gregset_t[NGREG] __attribute__ ((aligned(8))); + +typedef union + { + double d; + float f; + } fpreg_t; + +/* Register set for the floating-point registers. */ +typedef struct + { + unsigned int fpc; + fpreg_t fprs[16]; + } fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + __psw_t psw; + unsigned long gregs[16]; + unsigned int aregs[16]; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + }; + + +#endif /* sys/ucontext.h */ -- cgit v1.2.3