From: Ulrich Drepper Date: Thu, 28 Sep 2000 23:32:48 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/libc-2_1_95~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0386a0da3369e271bbfc03d54c49ba4ab62cd3a;p=platform%2Fupstream%2Fglibc.git Update. 2000-09-28 Franz Sirl * sysdeps/unix/sysv/linux/kernel-features.h: Add __ASSUME_IPC64, only define it for powerpc for kernel >= 2.4.0. * sysdeps/unix/sysv/linux/msgctl.c: Test for __ASSUME_IPC64, not __ASSUME_32BITUIDS. * sysdeps/unix/sysv/linux/semctl.c: Likewise. * sysdeps/unix/sysv/linux/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Sync with kernel. * sysdeps/unix/sysv/linux/powerpc/bits/msq.h: New file. * sysdeps/unix/sysv/linux/powerpc/bits/sem.h: New file. * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: New file. 2000-09-28 Martin Schwidefsksy * sysdeps/s390/atomicity.h: Fix compare_and_swap. * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_GETLK64,F_SETLK64,F_SETLKW64): Use values from 2.4.0-test8. 2000-09-28 Denis Joseph Barrow * sysdeps/unix/sysv/linux/s390/sys/procfs.h: Use definitions from ucontext.h. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Fix ucontext structure. 2000-09-27 Andreas Schwab * math/Makefile (distribute): Explicitly add the long double test sources, to get them included even if long double is not supported. 2000-09-27 Jes Sorensen * elf/soinit.c (struct object): Move definition to gccframe.h and include it. Problem identified by HJ Lu. * sysdeps/ia64/gccframe.h: New file. ia64 specific version of struct object to be searched for frame unwind info. * sysdeps/generic/gccframe.h: New file. Generic version of struct object to be searched for frame unwind info. 2000-09-28 Ulrich Drepper * manual/errno.texi: Correct error text for ENXIO. Reported by Jörg Schilling . 2000-09-27 Jes Sorensen * sysdeps/ia64/fpu/fsetexcptflg.c (fesetexceptflag): Set the exception status bits rather than the exception disable bits. Don't include math.h. * sysdeps/ia64/fpu/fgetexcptflg.c (fegetexceptflag): Report the status of exceptions currently raised rather than which exceptions are enabled. * sysdeps/ia64/fpu/fclrexcpt.c (feclearexcept): Typecase to fenv_t rather than unsigned long int. * sysdeps/ia64/fpu/fedisblxcpt.c (fedisableexcept): Only disable the exceptions actually requested by the caller and not just disable all exceptions. * sysdeps/ia64/fpu/feenablxcpt.c (feenableexcept): Exceptions on the ia64 are enabled by clearing the respective bits in the fpsr, not setting them. * sysdeps/ia64/bits/fenv.h: typedef fexcept_t and fenv_t to unsigned long int rather than unsigned long to be consistent with the coding conventions. 2000-09-20 H.J. Lu * sysdeps/ia64/fpu/fesetenv.c (fesetenv): Use fenv_t instead of unsigned long int. * sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise. 2000-09-28 Ulrich Drepper * string/bits/string2.h: Unify #if usage. 2000-09-27 Jakub Jelinek * math/test-fenv.c (feexcp_mask_test): If enabling all exceptions and disabling underflow or overflow, disable inexact as well. * sysdeps/gnu/netinet/tcp.h: Add tcp_info defines and types. --- diff --git a/ChangeLog b/ChangeLog index c9dd393..6a12531 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,91 @@ +2000-09-28 Franz Sirl + + * sysdeps/unix/sysv/linux/kernel-features.h: Add __ASSUME_IPC64, only + define it for powerpc for kernel >= 2.4.0. + * sysdeps/unix/sysv/linux/msgctl.c: Test for __ASSUME_IPC64, not + __ASSUME_32BITUIDS. + * sysdeps/unix/sysv/linux/semctl.c: Likewise. + * sysdeps/unix/sysv/linux/shmctl.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Sync with kernel. + * sysdeps/unix/sysv/linux/powerpc/bits/msq.h: New file. + * sysdeps/unix/sysv/linux/powerpc/bits/sem.h: New file. + * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: New file. + +2000-09-28 Martin Schwidefsksy + + * sysdeps/s390/atomicity.h: Fix compare_and_swap. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h + (F_GETLK64,F_SETLK64,F_SETLKW64): Use values from 2.4.0-test8. + +2000-09-28 Denis Joseph Barrow + + * sysdeps/unix/sysv/linux/s390/sys/procfs.h: Use definitions from + ucontext.h. + * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Fix ucontext structure. + +2000-09-27 Andreas Schwab + + * math/Makefile (distribute): Explicitly add the long double test + sources, to get them included even if long double is not supported. + +2000-09-27 Jes Sorensen + + * elf/soinit.c (struct object): Move definition to gccframe.h and + include it. Problem identified by HJ Lu. + + * sysdeps/ia64/gccframe.h: New file. ia64 specific version of + struct object to be searched for frame unwind info. + * sysdeps/generic/gccframe.h: New file. Generic version of + struct object to be searched for frame unwind info. + +2000-09-28 Ulrich Drepper + + * manual/errno.texi: Correct error text for ENXIO. + Reported by Jörg Schilling . + +2000-09-27 Jes Sorensen + + * sysdeps/ia64/fpu/fsetexcptflg.c (fesetexceptflag): Set the + exception status bits rather than the exception disable bits. + Don't include math.h. + + * sysdeps/ia64/fpu/fgetexcptflg.c (fegetexceptflag): Report the + status of exceptions currently raised rather than which exceptions + are enabled. + + * sysdeps/ia64/fpu/fclrexcpt.c (feclearexcept): Typecase to fenv_t + rather than unsigned long int. + + * sysdeps/ia64/fpu/fedisblxcpt.c (fedisableexcept): Only disable + the exceptions actually requested by the caller and not just + disable all exceptions. + + * sysdeps/ia64/fpu/feenablxcpt.c (feenableexcept): Exceptions on + the ia64 are enabled by clearing the respective bits in the fpsr, + not setting them. + + * sysdeps/ia64/bits/fenv.h: typedef fexcept_t and fenv_t to + unsigned long int rather than unsigned long to be consistent with + the coding conventions. + +2000-09-20 H.J. Lu + + * sysdeps/ia64/fpu/fesetenv.c (fesetenv): Use fenv_t instead of + unsigned long int. + * sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise. + +2000-09-28 Ulrich Drepper + + * string/bits/string2.h: Unify #if usage. + +2000-09-27 Jakub Jelinek + + * math/test-fenv.c (feexcp_mask_test): If enabling all exceptions + and disabling underflow or overflow, disable inexact as well. + 2000-09-26 Andreas Jaeger - * sysdeps/gnu/netinet/tcp.h: Add tcp_info defines and types. + * sysdeps/gnu/netinet/tcp.h: Add tcp_info defines and types. * sysdeps/unix/sysv/linux/sys/mount.h (enum): New flag MS_BIND. diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 4c281da..4dce416 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,7 @@ +2000-09-28 Martin Schwidefsksy + + * sysdeps/s390/pt-machine.h: Make %a0 the thread register. + 2000-09-28 Ulrich Drepper * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP diff --git a/linuxthreads/sysdeps/s390/pt-machine.h b/linuxthreads/sysdeps/s390/pt-machine.h index 8de4a1a..a006efc 100644 --- a/linuxthreads/sysdeps/s390/pt-machine.h +++ b/linuxthreads/sysdeps/s390/pt-machine.h @@ -30,12 +30,13 @@ testandset (int *spinlock) int ret; __asm__ __volatile__( + " la 1,%1\n" " lhi 0,1\n" " l %0,%1\n" - "0: cs %0,0,%1\n" + "0: cs %0,0,0(1)\n" " jl 0b" : "=&d" (ret), "+m" (*spinlock) - : : "0", "cc"); + : : "0", "1", "cc"); return ret; } @@ -46,6 +47,25 @@ testandset (int *spinlock) #define CURRENT_STACK_FRAME stack_pointer register char * stack_pointer __asm__ ("15"); +/* Return the thread descriptor for the current thread. + S/390 registers uses access register 0 as "thread register". */ +#define THREAD_SELF ({ \ + register pthread_descr __self; \ + __asm__ ("ear %0,%%a0" : "=d" (__self) ); \ + __self; \ +}) + +/* Initialize the thread-unique value. */ +#define INIT_THREAD_SELF(descr, nr) ({ \ + __asm__ ("sar %%a0,%0" : : "d" (descr) ); \ +}) + +/* Access to data in the thread descriptor is easy. */ +#define THREAD_GETMEM(descr, member) THREAD_SELF->member +#define THREAD_GETMEM_NC(descr, member) THREAD_SELF->member +#define THREAD_SETMEM(descr, member, value) THREAD_SELF->member = (value) +#define THREAD_SETMEM_NC(descr, member, value) THREAD_SELF->member = (value) + /* Compare-and-swap for semaphores. */ @@ -57,14 +77,15 @@ __compare_and_swap(long int *p, long int oldval, long int newval) int retval; __asm__ __volatile__( + " la 1,%1\n" " lr 0,%2\n" - " cs 0,%3,%1\n" + " cs 0,%3,0(1)\n" " ipm %0\n" " srl %0,28\n" "0:" : "=&d" (retval), "+m" (*p) : "d" (oldval) , "d" (newval) - : "cc", "0"); + : "cc", "0", "1" ); return retval == 0; } diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 454fdbf..705414c 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2000-09-28 Ulrich Drepper + + * locales/ar_SA: Last non entries removed. + Patch by Martin Strassburger . + 2000-09-26 Ulrich Drepper * charmaps/KSX1001: Removed. It's not sufficient for a charmap and diff --git a/sysdeps/s390/atomicity.h b/sysdeps/s390/atomicity.h index 0c97f40..a5347de 100644 --- a/sysdeps/s390/atomicity.h +++ b/sysdeps/s390/atomicity.h @@ -61,13 +61,15 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval) int retval; __asm__ __volatile__( - " cs %2,%3,%1\n" + " la 1,%1\n" + " lr 0,%2\n" + " cs 0,%3,0(1)\n" " ipm %0\n" " srl %0,28\n" "0:" : "=&r" (retval), "+m" (*p) : "d" (oldval) , "d" (newval) - : "memory", "cc"); + : "memory", "0", "1", "cc"); return !retval; } diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 9639be3..563a7e9 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -110,15 +110,23 @@ # define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 #endif -/* Linux 2.3.39 introduced 32bit UID/GIDs. Some platforms had 32 bit - type all along. */ +/* Linux 2.3.39 introduced 32bit UID/GIDs and IPC64. Some platforms had 32 + bit type all along. */ #if __LINUX_KERNEL_VERSION >= 131879 || defined __powerpc__ || defined __mips__ # define __ASSUME_32BITUIDS 1 +# ifndef __powerpc__ +# define __ASSUME_IPC64 1 +# endif # ifdef __sparc__ # define __ASSUME_SETRESUID_SYSCALL 1 # endif #endif +/* Linux 2.4.0 on PPC introduced a correct IPC64. */ +#if __LINUX_KERNEL_VERSION >= 132096 && defined __powerpc__ +# define __ASSUME_IPC64 1 +#endif + /* We can use the LDTs for threading with Linux 2.3.99 and newer. */ #if __LINUX_KERNEL_VERSION >= 131939 # define __ASSUME_LDT_WORKS 1 diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c index fb0ad56..7c43e55 100644 --- a/sysdeps/unix/sysv/linux/msgctl.c +++ b/sysdeps/unix/sysv/linux/msgctl.c @@ -65,7 +65,7 @@ compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0); int __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) { -#if __ASSUME_32BITUIDS > 0 +#if __ASSUME_IPC64 > 0 return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd | __IPC_64, 0, CHECK_1 (buf)); #else diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h b/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h index 74b3d49..60c6094 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h @@ -48,7 +48,10 @@ struct ipc_perm __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 long int __seq; /* Sequence number. */ + unsigned int __pad1; + unsigned long long int __unused1; + unsigned long long int __unused2; }; diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/msq.h b/sysdeps/unix/sysv/linux/powerpc/bits/msq.h new file mode 100644 index 0000000..45caff5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/msq.h @@ -0,0 +1,77 @@ +/* Copyright (C) 1995, 1996, 1997, 2000 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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 */ +#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 */ + unsigned int __unused1; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned int __unused2; + __time_t msg_rtime; /* time of last msgrcv command */ + unsigned int __unused3; + __time_t msg_ctime; /* time of last change */ + unsigned long __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 __unused4; + unsigned long __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/powerpc/bits/sem.h b/sysdeps/unix/sysv/linux/powerpc/bits/sem.h new file mode 100644 index 0000000..18a9ff4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/sem.h @@ -0,0 +1,87 @@ +/* Copyright (C) 1995, 1996, 1997, 1998, 2000 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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 */ + unsigned int __unused1; + __time_t sem_otime; /* last semop() time */ + unsigned int __unused2; + __time_t sem_ctime; /* last time changed by semctl() */ + unsigned long int sem_nsems; /* number of semaphores in set */ + unsigned long __unused3; + unsigned long __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/powerpc/bits/shm.h b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h new file mode 100644 index 0000000..2150023 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h @@ -0,0 +1,94 @@ +/* Copyright (C) 1995, 1996, 1997, 2000 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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) */ + + +/* 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 */ + unsigned int __unused1; + __time_t shm_atime; /* time of last shmat() */ + unsigned int __unused2; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned int __unused3; + __time_t shm_ctime; /* time of last change by shmctl() */ + unsigned int __unused4; + size_t shm_segsz; /* size of segment in bytes */ + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ + unsigned long __unused5; + unsigned long __unused6; + }; + +#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/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h index a54784a..637bffa 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h @@ -65,14 +65,18 @@ #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). */ - -/* XXX missing */ -#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 +# 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). */ diff --git a/sysdeps/unix/sysv/linux/s390/sys/procfs.h b/sysdeps/unix/sysv/linux/s390/sys/procfs.h index ee00621..8b60338 100644 --- a/sysdeps/unix/sysv/linux/s390/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/s390/sys/procfs.h @@ -32,31 +32,15 @@ #include #include #include +#include __BEGIN_DECLS -/* Type for a general-purpose register. */ -typedef unsigned long elf_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 elf_gregset_t a simple array - that has the same size as s390_regs. */ -#define ELF_NGREG 35 -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; - -typedef union -{ - double d; - float f; -} elf_fpreg_t; - -/* Register set for the floating-point registers. */ -typedef struct { - unsigned int fpc; - elf_fpreg_t fprs[NUM_FPRS]; -} elf_fpregset_t; - +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 diff --git a/sysdeps/unix/sysv/linux/s390/sys/ucontext.h b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h index 4723ce1..b9ec806 100644 --- a/sysdeps/unix/sysv/linux/s390/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h @@ -19,7 +19,9 @@ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 - +/* Forward definition to avoid parse errors */ +struct ucontext; +typedef struct ucontext ucontext_t; #include #include @@ -28,62 +30,39 @@ #include -/* Type for general register. */ -typedef int greg_t; +/* Type for a general-purpose register. */ +typedef unsigned long greg_t; -/* Number of general registers. */ -#define NGREG 16 +/* 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. */ +#define NGREG 36 +#define NUM_FPRS 16 +typedef greg_t gregset_t[NGREG]; -/* Number of each register is the `gregset_t' array. */ -enum +typedef union { - GPR0 = 0, -#define GPR0 GPR0 - GPR1, -#define GPR1 GPR1 - GPR2, -#define GPR2 GPR2 - GPR3, -#define GPR3 GPR3 - GPR4, -#define GPR4 GPR4 - GPR5, -#define GPR5 GPR5 - GPR6, -#define GPR6 GPR6 - GPR7, -#define GPR7 GPR7 - GPR8, -#define GPR8 GPR8 - GPR9, -#define GPR9 GPR9 - GPRA, -#define GPRA GPRA - GPRB, -#define GPRB GPRB - GPRC, -#define GPRC GPRC - GPRD, -#define GPRD GPRD - GPRE, -#define GPRE GPRE - GPRF -#define GPRF GPRF -}; + double d; + float f; +} fpreg_t; -/* Structure to describe FPU registers. */ -typedef long long fpreg_t; +/* Register set for the floating-point registers. */ +typedef struct { + unsigned int fpc; + fpreg_t fprs[NUM_FPRS]; +} fpregset_t; /* Context to describe whole processor state. */ typedef struct { int version; - greg_t gregs[NGREG]; - fpreg_t fpregs[16]; + gregset_t gregs; + fpregset_t fpregs; } mcontext_t; /* Userlevel context. */ -typedef struct ucontext +struct ucontext { unsigned long int uc_flags; struct ucontext *uc_links; @@ -91,6 +70,7 @@ typedef struct ucontext stack_t uc_stack; mcontext_t uc_mcontext; long int uc_filler[170]; - } ucontext_t; + }; + #endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c index 0d64b95..b858de2 100644 --- a/sysdeps/unix/sysv/linux/semctl.c +++ b/sysdeps/unix/sysv/linux/semctl.c @@ -93,7 +93,7 @@ __new_semctl (int semid, int semnum, int cmd, ...) va_end (ap); -#if __ASSUME_32BITUIDS > 0 +#if __ASSUME_IPC64 > 0 return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64, CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)); #else diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c index 8ff911b..d47c611 100644 --- a/sysdeps/unix/sysv/linux/shmctl.c +++ b/sysdeps/unix/sysv/linux/shmctl.c @@ -73,7 +73,7 @@ compat_symbol (libc, __old_shmctl, shmctl, GLIBC_2_0); int __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) { -#if __ASSUME_32BITUIDS > 0 +#if __ASSUME_IPC64 > 0 return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0, CHECK_1 (buf)); #else switch (cmd) {