diff -u -r --new-file libc/shlib-versions libc-s390/shlib-versions --- libc/shlib-versions Mon Aug 21 11:37:22 2000 +++ libc-s390/shlib-versions Mon Aug 21 12:45:13 2000 @@ -29,6 +29,7 @@ arm.*-.*-.* libm=6 ia64-.*-.* libm=6.1 GLIBC_2.2 sh.*-.*-.* libm=6 GLIBC_2.2 +s390.*-.*-linux.* libm=6 # We provide libc.so.6 for Linux kernel versions 2.0 and later. alpha.*-.*-linux.* libc=6.1 diff -u -r --new-file libc/sysdeps/s390/__longjmp.c libc-s390/sysdeps/s390/__longjmp.c --- libc/sysdeps/s390/__longjmp.c Wed Aug 2 15:22:04 2000 +++ libc-s390/sysdeps/s390/__longjmp.c Mon Aug 21 12:45:13 2000 @@ -29,8 +29,6 @@ void __longjmp (__jmp_buf env, int val) { - unsigned int result; - /* Restore registers and jump back */ asm volatile("lr %%r2,%0\n\t" /* put val in grp 2 */ "lm %%r6,%%r15,%1\n\t" diff -u -r --new-file libc/sysdeps/s390/fpu/bits/fenv.h libc-s390/sysdeps/s390/fpu/bits/fenv.h --- libc/sysdeps/s390/fpu/bits/fenv.h Wed Aug 16 16:12:09 2000 +++ libc-s390/sysdeps/s390/fpu/bits/fenv.h Mon Aug 21 16:54:20 2000 @@ -62,11 +62,6 @@ #define FE_TOWARDZERO FE_TOWARDZERO }; -#define FPC_EXCEPTION_MASK_SHIFT 24 -#define FPC_FLAGS_SHIFT 16 -#define FPC_DXC_SHIFT 8 -#define FPC_NOT_FPU_EXCEPTION 0x300 - /* Type representing exception flags. */ typedef unsigned int fexcept_t; /* size of fpc */ diff -u -r --new-file libc/sysdeps/s390/fpu/fclrexcpt.c libc-s390/sysdeps/s390/fpu/fclrexcpt.c --- libc/sysdeps/s390/fpu/fclrexcpt.c Wed Aug 2 16:19:40 2000 +++ libc-s390/sysdeps/s390/fpu/fclrexcpt.c Mon Aug 21 16:42:08 2000 @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include #include int @@ -33,7 +33,7 @@ temp &= ~((excepts< +#include +#include +#include +#include +#include + +int +fegetenv (fenv_t *envp) +{ + /* The S/390 IEEE fpu doesn't keep track of the ieee instruction pointer. + To get around that the kernel will store the address of the last + fpu fault to the process structure. This ptrace call reads this value + from the kernel space. That means the ieee_instruction_pointer is + only correct after a fpu fault. That's the best we can do, there is + no way to find out the ieee instruction pointer if there was no fault. */ + _FPU_GETCW (envp->fpc); + envp->ieee_instruction_pointer = + ptrace (PTRACE_PEEKUSER, getpid (), PT_IEEE_IP); + + /* Success. */ + return 0; +} diff -u -r --new-file libc/sysdeps/s390/fpu/fegetround.c libc-s390/sysdeps/s390/fpu/fegetround.c --- libc/sysdeps/s390/fpu/fegetround.c Wed Aug 2 16:19:40 2000 +++ libc-s390/sysdeps/s390/fpu/fegetround.c Mon Aug 21 16:56:39 2000 @@ -1,7 +1,7 @@ /* Return current rounding direction. Copyright (C) 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). The GNU C Library is free software; you can redistribute it and/or @@ -19,7 +19,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include #include int diff -u -r --new-file libc/sysdeps/s390/fpu/feholdexcpt.c libc-s390/sysdeps/s390/fpu/feholdexcpt.c --- libc/sysdeps/s390/fpu/feholdexcpt.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/fpu/feholdexcpt.c Mon Aug 21 16:56:36 2000 @@ -0,0 +1,34 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + + 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. */ + +#include +#include + +int feholdexcept (fenv_t *envp) +{ + /* Store the environment. */ + fegetenv (envp); + /* Clear the current sticky bits as more than one exception + may be generated. */ + envp->fpc &= ~(FPC_FLAGS_MASK | FPC_DXC_MASK); + /* Hold from generating fpu exceptions temporarily. */ + _FPU_SETCW ((envp->fpc & ~(FE_ALL_EXCEPT << FPC_EXCEPTION_MASK_SHIFT))); + return 0; +} diff -u -r --new-file libc/sysdeps/s390/fpu/fenv_libc.h libc-s390/sysdeps/s390/fpu/fenv_libc.h --- libc/sysdeps/s390/fpu/fenv_libc.h Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/fpu/fenv_libc.h Mon Aug 21 16:48:47 2000 @@ -0,0 +1,37 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + + 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 _FENV_LIBC_H +#define _FENV_LIBC_H 1 + +#include + +/* Definitions from asm/s390-regs-common.h that are needed in th glibc. */ + +#define FPC_DXC_MASK 0x0000FF00 +#define FPC_EXCEPTION_MASK 0xF8000000 +#define FPC_FLAGS_MASK 0x00F80000 +#define FPC_RM_MASK 0x00000003 + +#define FPC_EXCEPTION_MASK_SHIFT 24 +#define FPC_FLAGS_SHIFT 16 +#define FPC_DXC_SHIFT 8 +#define FPC_NOT_FPU_EXCEPTION 0x300 + +#endif /* _FENV_LIBC_H */ diff -u -r --new-file libc/sysdeps/s390/fpu/fesetenv.c libc-s390/sysdeps/s390/fpu/fesetenv.c --- libc/sysdeps/s390/fpu/fesetenv.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/fpu/fesetenv.c Mon Aug 21 17:02:06 2000 @@ -0,0 +1,56 @@ +/* Install given floating-point environment. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + + 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. */ + +#include +#include +#include +#include +#include +#include + +int +fesetenv (const fenv_t *envp) +{ + fenv_t env; + + if (envp == FE_DFL_ENV) + { + env.fpc = _FPU_DEFAULT; + env.ieee_instruction_pointer = 0; + } + else if (envp == FE_NOMASK_ENV) + { + env.fpc = FPC_EXCEPTION_MASK; + env.ieee_instruction_pointer = 0; + } + else + env=(*envp); + + /* The S/390 IEEE fpu doesn't have a register for the ieee instruction + pointer. The operating system is required to keep an instruction pointer + on a per process base. We read and write this value with the ptrace + interface. */ + _FPU_SETCW (env.fpc); + ptrace (PTRACE_POKEUSER, getpid (), PT_IEEE_IP, env.ieee_instruction_pointer); + + /* Success. */ + return 0; +} + diff -u -r --new-file libc/sysdeps/s390/fpu/fesetround.c libc-s390/sysdeps/s390/fpu/fesetround.c --- libc/sysdeps/s390/fpu/fesetround.c Wed Aug 2 16:19:40 2000 +++ libc-s390/sysdeps/s390/fpu/fesetround.c Mon Aug 21 16:56:56 2000 @@ -1,7 +1,7 @@ /* Set current rounding direction. Copyright (C) 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). 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 @@ -18,7 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include #include int diff -u -r --new-file libc/sysdeps/s390/fpu/feupdateenv.c libc-s390/sysdeps/s390/fpu/feupdateenv.c --- libc/sysdeps/s390/fpu/feupdateenv.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/fpu/feupdateenv.c Mon Aug 21 16:57:03 2000 @@ -0,0 +1,48 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + + 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. */ + +/* + This implementation is quite different to Intel it is based on + my interpretation of the hp manpages for feholdenv & feupdateenv. +*/ + +#include +#include + +int feupdateenv (const fenv_t *envp) +{ + fexcept_t temp; + + _FPU_GETCW (temp); + temp = (temp & FPC_FLAGS_MASK) >> FPC_FLAGS_SHIFT; + + /* Raise the exceptions since the last call to feholdenv */ + /* re install saved environment. */ + fesetenv (envp); + feraiseexcept ((int) temp); + + /* Success. */ + return 0; +} + + + + + diff -u -r --new-file libc/sysdeps/s390/fpu/fgetexcptflg.c libc-s390/sysdeps/s390/fpu/fgetexcptflg.c --- libc/sysdeps/s390/fpu/fgetexcptflg.c Wed Aug 16 16:12:09 2000 +++ libc-s390/sysdeps/s390/fpu/fgetexcptflg.c Mon Aug 21 17:02:58 2000 @@ -1,7 +1,7 @@ /* Store current representation for exceptions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). 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 @@ -16,26 +16,22 @@ 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. + Boston, MA 02111-1307, USA. */ - Contributed by: - Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) -*/ - -#include +#include #include int fegetexceptflag (fexcept_t *flagp, int excepts) { - fexcept_t temp,newexcepts; + fexcept_t temp, newexcepts; - /* Get the current exceptions. */ - _FPU_GETCW(temp); - newexcepts=((excepts< +#include + + +static __inline__ void +fexceptdiv(float d,float e) +{ + __asm__ __volatile__ ("debr %0,%1" : : "f" (d), "f" (e) ); +} + +static __inline__ void +fexceptadd(float d,float e) +{ + __asm__ __volatile__ ("aebr %0,%1" : : "f" (d), "f" (e) ); +} + + +int +feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXPECTS. But we must raise only + one signal at a time. It is important that if the overflow/underflow + exception and the inexact exception are given at the same time, + the overflow/underflow exception follows the inexact exception. */ + + /* First: invalid exception. */ + if (FE_INVALID & excepts) + { + fexceptdiv(0.0,0.0); + } + + /* Next: division by zero. */ + if (FE_DIVBYZERO & excepts) + { + fexceptdiv(1.0,0.0); + } + + /* Next: overflow. */ + if (FE_OVERFLOW & excepts) + { + /* I don't think we can do the same trick as intel + so we will have to live with inexact coming also. */ + fexceptadd(FLT_MAX,1.0e32); + } + + /* Next: underflow. */ + if (FE_UNDERFLOW & excepts) + { + fexceptdiv(FLT_MIN,3.0); + } + + /* Last: inexact. */ + if (FE_INEXACT & excepts) + { + fexceptdiv(2.0,3.0); + } + + /* Success. */ + return 0; +} + + + + + + diff -u -r --new-file libc/sysdeps/s390/fpu/fsetexcptflg.c libc-s390/sysdeps/s390/fpu/fsetexcptflg.c --- libc/sysdeps/s390/fpu/fsetexcptflg.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/fpu/fsetexcptflg.c Mon Aug 21 17:03:35 2000 @@ -0,0 +1,47 @@ +/* Set floating-point environment exception handling. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + + 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. */ + +#include +#include +#include + +int +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fexcept_t temp,newexcepts; + + /* Get the current environment. We have to do this since we cannot + separately set the status word. */ + _FPU_GETCW (temp); + /* Install the new exception bits in the Accrued Exception Byte. */ + excepts = excepts & FE_ALL_EXCEPT; + newexcepts = (excepts << FPC_DXC_SHIFT) | (excepts << FPC_FLAGS_SHIFT); + temp &= ~newexcepts; + temp |= *flagp & newexcepts; + + /* Store the new status word (along with the rest of the environment. + Possibly new exceptions are set but they won't get executed unless + the next floating-point instruction. */ + _FPU_SETCW (temp); + + /* Success. */ + return 0; +} + diff -u -r --new-file libc/sysdeps/s390/fpu/ftestexcept.c libc-s390/sysdeps/s390/fpu/ftestexcept.c --- libc/sysdeps/s390/fpu/ftestexcept.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/fpu/ftestexcept.c Mon Aug 21 16:57:22 2000 @@ -0,0 +1,33 @@ +/* Test exception in current environment. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + + 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. */ + +#include +#include + +int +fetestexcept (int excepts) +{ + fexcept_t temp; + + /* Get current exceptions. */ + _FPU_GETCW (temp); + temp = (temp >> FPC_DXC_SHIFT) | (temp >> FPC_FLAGS_SHIFT); + return temp & excepts & FE_ALL_EXCEPT; +} diff -u -r --new-file libc/sysdeps/s390/fpu/libm-test-ulps libc-s390/sysdeps/s390/fpu/libm-test-ulps --- libc/sysdeps/s390/fpu/libm-test-ulps Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/fpu/libm-test-ulps Mon Aug 21 12:45:13 2000 @@ -0,0 +1,1079 @@ +# Begin of automatic generation + +# asin +Test "asin (-0.5) == -pi/6": +float: 2 +ifloat: 2 +Test "asin (0.5) == pi/6": +float: 2 +ifloat: 2 +Test "asin (0.7) == 0.7753974966107530637": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# atanh +Test "atanh (0.7) == 0.8673005276940531944": +double: 1 +idouble: 1 + +# cabs +Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# cacos +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# casin +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i": +float: 1 +ifloat: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i": +float: 1 +ifloat: 1 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +float: 3 +ifloat: 3 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +float: 4 +ifloat: 4 +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i": +double: 1 +idouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +double: 4 +idouble: 4 +Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i": +float: 4 +ifloat: 4 +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +# cbrt +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +Test "cbrt (0.970299) == 0.99": +double: 1 +idouble: 1 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +idouble: 1 + +# cexp +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +float: 1 +ifloat: 1 +Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +float: 1 +ifloat: 1 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +float: 1 +ifloat: 1 + +# cos +Test "cos (0.7) == 0.7648421872844884262": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "cos (pi/2) == 0": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 + +# cpow +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 1.1031 +float: 2 +idouble: 1.1031 +ifloat: 2 + +# csin +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +float: 1 +ifloat: 1 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +double: 1 +idouble: 1 +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +double: 1 +idouble: 1 +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# erfc +Test "erfc (0.7) == 0.32219880616258152702": +double: 1 +idouble: 1 +Test "erfc (1.2) == 0.089686021770364619762": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "erfc (2.0) == 0.0046777349810472658379": +double: 1 +idouble: 1 +Test "erfc (4.1) == 0.67000276540848983727e-8": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "exp10 (0.7) == 5.0118723362727228500": +float: 1 +ifloat: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +# expm1 +Test "expm1 (1) == M_El - 1.0": +float: 1 +ifloat: 1 + +# fmod +Test "fmod (-6.5, -2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (-6.5, 2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, -2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "fmod (6.5, 2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (0.7, 1.2) == 1.3892443989449804508": +double: 1 +idouble: 1 +Test "hypot (0.7, 12.4) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.41974234837422060118": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "j0 (8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "j1 (2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 + +# jn +Test "jn (0, 10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "jn (0, 8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +Test "jn (1, 2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 +Test "jn (10, 0.1) == 0.26905328954342155795e-19": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 +Test "jn (10, 0.7) == 0.75175911502153953928e-11": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (10, 10.0) == 0.20748610663335885770": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +Test "jn (10, 2.0) == 0.25153862827167367096e-6": +float: 4 +ifloat: 4 +Test "jn (3, 0.1) == 0.000020820315754756261429": +double: 1 +idouble: 1 +Test "jn (3, 0.7) == 0.0069296548267508408077": +float: 1 +ifloat: 1 +Test "jn (3, 10.0) == 0.058379379305186812343": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "jn (3, 2.0) == 0.12894324947440205110": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (0.7) == 0.26086724653166651439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# log +Test "log (0.7) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log10 +Test "log10 (0.7) == -0.15490195998574316929": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 + +# log1p +Test "log1p (-0.3) == -0.35667494393873237891": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# log2 +Test "log2 (0.7) == -0.51457317282975824043": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# sincos +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": +float: 1 +ifloat: 1 + +# sinh +Test "sinh (0.7) == 0.75858370183953350346": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tan +Test "tan (pi/4) == 1": +double: 0.5 +idouble: 0.5 + +# tanh +Test "tanh (0.7) == 0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y0 +Test "y0 (0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "y0 (8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# y1 +Test "y1 (0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "y1 (0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# yn +Test "yn (0, 0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +Test "yn (0, 8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +Test "yn (1, 0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +Test "yn (10, 0.1) == -0.11831335132045197885e19": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +Test "yn (10, 0.7) == -0.42447194260703866924e10": +double: 3 +idouble: 3 +Test "yn (10, 1.0) == -0.12161801427868918929e9": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.35981415218340272205": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.54220803928264": +double: 2 +idouble: 2 +Test "yn (3, 0.1) == -5099.3323786129048894": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 0.7) == -15.819479052819633505": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (3, 10.0) == -0.25136265718383732978": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.1277837768404277861": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "asin": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "atanh": +double: 1 +idouble: 1 + +Function: "cabs": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cacos": +float: 1 +ifloat: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 + +Function: Imaginary part of "cacosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "casin": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: Imaginary part of "casin": +float: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Real part of "catan": +float: 4 +ifloat: 4 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +float: 1 +idouble: 4 +ifloat: 1 + +Function: Imaginary part of "catanh": +double: 1 +float: 6 +idouble: 1 +ifloat: 6 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +idouble: 1 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "cexp": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 1.1031 +float: 2 +idouble: 1.1031 +ifloat: 2 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "ctanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "ctanh": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "erfc": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +float: 1 +ifloat: 1 + +Function: "fmod": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "hypot": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log1p": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 0.5 +idouble: 0.5 + +Function: "tanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation diff -u -r --new-file libc/sysdeps/s390/gmp-mparam.h libc-s390/sysdeps/s390/gmp-mparam.h --- libc/sysdeps/s390/gmp-mparam.h Wed Aug 16 16:12:09 2000 +++ libc-s390/sysdeps/s390/gmp-mparam.h Mon Aug 21 12:45:13 2000 @@ -17,7 +17,7 @@ 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. + Boston, MA 02111-1307, USA. */ #define BITS_PER_MP_LIMB 32 #define BYTES_PER_MP_LIMB 4 diff -u -r --new-file libc/sysdeps/s390/initfini.c libc-s390/sysdeps/s390/initfini.c --- libc/sysdeps/s390/initfini.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/s390/initfini.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1,149 @@ +/* Special .init and .fini section support for S/390. + Copyright (C) 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. + + In addition to the permissions in the GNU Library General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Library General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +__asm__ (" + +#include \"defs.h\" + +/*@HEADER_ENDS*/ + +/*@TESTS_BEGIN*/ + +/*@TESTS_END*/ + +/*@_init_PROLOG_BEGINS*/ + + .section .init +#NO_APP + .align 4 +.globl _init + .type _init,@function +_init: +# leaf function 0 +# automatics 0 +# outgoing args 0 +# need frame pointer 0 +# call alloca 0 +# has varargs 0 +# incoming args (stack) 0 +# function length 36 + STM 6,15,24(15) + BRAS 13,.LTN1_0 +.LT1_0: +.LC14: + .long __gmon_start__@GOT +.LC15: + .long _GLOBAL_OFFSET_TABLE_-.LT1_0 +.LTN1_0: + LR 1,15 + AHI 15,-96 + ST 1,0(15) + L 12,.LC15-.LT1_0(13) + AR 12,13 + L 1,.LC14-.LT1_0(13) + L 1,0(1,12) + LTR 1,1 + JE .L22 + BASR 14,1 +.L22: +#APP + ALIGN + END_INIT + +/*@_init_PROLOG_ENDS*/ + +/*@_init_EPILOG_BEGINS*/ + .align 4 + .section .init +#NO_APP + .align 4 + L 4,152(15) + LM 6,15,120(15) + BR 4 +#APP + END_INIT + +/*@_init_EPILOG_ENDS*/ + +/*@_fini_PROLOG_BEGINS*/ + .section .fini +#NO_APP + .align 4 +.globl _fini + .type _fini,@function +_fini: +# leaf function 0 +# automatics 0 +# outgoing args 0 +# need frame pointer 0 +# call alloca 0 +# has varargs 0 +# incoming args (stack) 0 +# function length 30 + STM 6,15,24(15) + BRAS 13,.LTN2_0 +.LT2_0: +.LC17: + .long _GLOBAL_OFFSET_TABLE_-.LT2_0 +.LTN2_0: + LR 1,15 + AHI 15,-96 + ST 1,0(15) + L 12,.LC17-.LT2_0(13) + AR 12,13 +#APP + ALIGN + END_FINI + +/*@_fini_PROLOG_ENDS*/ + +/*@_fini_EPILOG_BEGINS*/ + .align 4 + .section .fini +#NO_APP + .align 4 + L 4,152(15) + LM 6,15,120(15) + BR 4 +#APP + END_FINI + +/*@_fini_EPILOG_ENDS*/ + +/*@TRAILER_BEGINS*/ +"); diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/Dist libc-s390/sysdeps/unix/sysv/linux/s390/Dist --- libc/sysdeps/unix/sysv/linux/s390/Dist Wed Aug 16 16:12:09 2000 +++ libc-s390/sysdeps/unix/sysv/linux/s390/Dist Mon Aug 21 13:57:51 2000 @@ -1,7 +1,10 @@ clone.S +oldgetrlimit64.c setresuid.c setresgid.c setfsuid.c setfsgid.c sys/elf.h +sys/procfs.h sys/user.h + diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/Makefile libc-s390/sysdeps/unix/sysv/linux/s390/Makefile --- libc/sysdeps/unix/sysv/linux/s390/Makefile Wed Aug 2 17:14:21 2000 +++ libc-s390/sysdeps/unix/sysv/linux/s390/Makefile Mon Aug 21 13:59:42 2000 @@ -1,4 +1,12 @@ ifeq ($(subdir),misc) sysdep_routines += setfsgid setfsuid setresgid setresuid -sysdep_headers += sys/elf.h sys/reg.h +sysdep_headers += sys/elf.h +endif + +ifeq ($(subdir),csu) +CFLAGS-initfini.s += -DWEAK_GMON_START +endif + +ifeq ($(subdir),resource) +sysdep_routines += oldgetrlimit64 endif diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/Versions libc-s390/sysdeps/unix/sysv/linux/s390/Versions --- libc/sysdeps/unix/sysv/linux/s390/Versions Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/Versions Mon Aug 21 12:45:13 2000 @@ -0,0 +1,28 @@ +libc { + GLIBC_2.0 { + # Exception handling support functions from libgcc + __register_frame; __register_frame_table; __deregister_frame; + __register_frame_info; __deregister_frame_info; __frame_state_for; + __register_frame_info_table; + } + GLIBC_2.2 { + # functions used in other libraries + __xstat64; __fxstat64; __lxstat64; + + # a* + alphasort64; + + # New rlimit interface + getrlimit; setrlimit; getrlimit64; + + # r* + readdir64; readdir64_r; + + # s* + scandir64; + + # v* + versionsort64; + } +} + diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/alphasort64.c libc-s390/sysdeps/unix/sysv/linux/s390/alphasort64.c --- libc/sysdeps/unix/sysv/linux/s390/alphasort64.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/alphasort64.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/bits/stat.h libc-s390/sysdeps/unix/sysv/linux/s390/bits/stat.h --- libc/sysdeps/unix/sysv/linux/s390/bits/stat.h Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/bits/stat.h Mon Aug 21 12:45:13 2000 @@ -0,0 +1,133 @@ +/* Copyright (C) 1992, 95, 96, 97, 98, 99, 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_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. */ +#define __S_TYPEISMQ(buf) (0) +#define __S_TYPEISSEM(buf) (0) +#define __S_TYPEISSHM(buf) (0) + +/* 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 -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/chown.c libc-s390/sysdeps/unix/sysv/linux/s390/chown.c --- libc/sysdeps/unix/sysv/linux/s390/chown.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/chown.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1,119 @@ +/* Copyright (C) 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. */ + +#include +#include + +#include +#include +#include +#include + +#include +#include "kernel-features.h" + +/* + In Linux 2.1.x the chown functions have been changed. A new function lchown + was introduced. The new chown now follows symlinks - the old chown and the + new lchown do not follow symlinks. + The new lchown function has the same number as the old chown had and the + new chown has a new number. When compiling with headers from Linux > 2.1.8x + it's impossible to run this libc with older kernels. In these cases libc + has therefore to route calls to chown to the old chown function. +*/ + +extern int __syscall_chown (const char *__file, + __kernel_uid_t __owner, __kernel_gid_t __group); + +/* Running under Linux > 2.1.80. */ + +# ifdef __NR_chown32 +extern int __syscall_chown32 (const char *__file, + __kernel_uid32_t owner, __kernel_gid32_t group); +# if __ASSUME_32BITUIDS == 0 +/* This variable is shared with all files that need to check for 32bit + uids. */ +extern int __libc_missing_32bit_uids; +# endif +# endif /* __NR_chown32 */ + +int +__real_chown (const char *file, uid_t owner, gid_t group) +{ + static int __libc_old_chown; + int result; + + if (!__libc_old_chown) + { + int saved_errno = errno; +# ifdef __NR_chown32 + if (__libc_missing_32bit_uids <= 0) + { + int result; + int saved_errno = errno; + + result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); + if (result == 0 || errno != ENOSYS) + return result; + + __set_errno (saved_errno); + __libc_missing_32bit_uids = 1; + } +# endif /* __NR_chown32 */ + if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) + || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) + { + __set_errno (EINVAL); + return -1; + } + + result = INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); + + if (result >= 0 || errno != ENOSYS) + return result; + + __set_errno (saved_errno); + __libc_old_chown = 1; + } + + return __lchown (file, owner, group); +} + + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) +/* Compiling for compatibiity. */ +int +__chown_is_lchown (const char *file, uid_t owner, gid_t group) +{ + return __lchown (file, owner, group); +} +#endif + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) +strong_alias (__chown_is_lchown, _chown_is_lchown) +compat_symbol (libc, __chown_is_lchown, __chown, GLIBC_2_0); +compat_symbol (libc, _chown_is_lchown, chown, GLIBC_2_0); + +strong_alias (__real_chown, _real_chown) +versioned_symbol (libc, __real_chown, __chown, GLIBC_2_1); +versioned_symbol (libc, _real_chown, chown, GLIBC_2_1); +#else +strong_alias (__real_chown, __chown) +weak_alias (__real_chown, chown) +#endif + diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/fxstat.c libc-s390/sysdeps/unix/sysv/linux/s390/fxstat.c --- libc/sysdeps/unix/sysv/linux/s390/fxstat.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/fxstat.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/getdents64.c libc-s390/sysdeps/unix/sysv/linux/s390/getdents64.c --- libc/sysdeps/unix/sysv/linux/s390/getdents64.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/getdents64.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/getmsg.c libc-s390/sysdeps/unix/sysv/linux/s390/getmsg.c --- libc/sysdeps/unix/sysv/linux/s390/getmsg.c Wed Aug 2 17:14:21 2000 +++ libc-s390/sysdeps/unix/sysv/linux/s390/getmsg.c Thu Jan 1 01:00:00 1970 @@ -1 +0,0 @@ -#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/getpmsg.c libc-s390/sysdeps/unix/sysv/linux/s390/getpmsg.c --- libc/sysdeps/unix/sysv/linux/s390/getpmsg.c Wed Aug 2 17:14:21 2000 +++ libc-s390/sysdeps/unix/sysv/linux/s390/getpmsg.c Thu Jan 1 01:00:00 1970 @@ -1 +0,0 @@ -#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/getrlimit.c libc-s390/sysdeps/unix/sysv/linux/s390/getrlimit.c --- libc/sysdeps/unix/sysv/linux/s390/getrlimit.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/getrlimit.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/getrlimit64.c libc-s390/sysdeps/unix/sysv/linux/s390/getrlimit64.c --- libc/sysdeps/unix/sysv/linux/s390/getrlimit64.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/getrlimit64.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/lchown.c libc-s390/sysdeps/unix/sysv/linux/s390/lchown.c --- libc/sysdeps/unix/sysv/linux/s390/lchown.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/lchown.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1,75 @@ +/* Copyright (C) 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. */ + +#include +#include + +#include +#include +#include + +#include +#include "kernel-features.h" + +extern int __syscall_lchown (const char *__unbounded __file, + __kernel_uid_t __owner, __kernel_gid_t __group); + +# ifdef __NR_lchown32 +extern int __syscall_lchown32 (const char *__unbounded __file, + __kernel_uid32_t __owner, __kernel_gid32_t __group); +# if __ASSUME_32BITUIDS == 0 +/* This variable is shared with all files that need to check for 32bit + uids. */ +extern int __libc_missing_32bit_uids; +# endif +# endif /* __NR_lchown32 */ + +int +__lchown (const char *file, uid_t owner, gid_t group) +{ +# if __ASSUME_32BITUIDS > 0 + return INLINE_SYSCALL (lchown32, 3, CHECK_STRING (file), owner, group); +# else +# ifdef __NR_lchown32 + if (__libc_missing_32bit_uids <= 0) + { + int result; + int saved_errno = errno; + + result = INLINE_SYSCALL (lchown32, 3, CHECK_STRING (file), owner, group); + if (result == 0 || errno != ENOSYS) + return result; + + __set_errno (saved_errno); + __libc_missing_32bit_uids = 1; + } +# endif /* __NR_lchown32 */ + + if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) + || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) + { + __set_errno (EINVAL); + return -1; + } + + return INLINE_SYSCALL (lchown, 3, CHECK_STRING (file), owner, group); +# endif +} + +weak_alias (__lchown, lchown) + diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/lxstat.c libc-s390/sysdeps/unix/sysv/linux/s390/lxstat.c --- libc/sysdeps/unix/sysv/linux/s390/lxstat.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/lxstat.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1,2 @@ +#include + diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/oldgetrlimit64.c libc-s390/sysdeps/unix/sysv/linux/s390/oldgetrlimit64.c --- libc/sysdeps/unix/sysv/linux/s390/oldgetrlimit64.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/oldgetrlimit64.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/putmsg.c libc-s390/sysdeps/unix/sysv/linux/s390/putmsg.c --- libc/sysdeps/unix/sysv/linux/s390/putmsg.c Wed Aug 2 17:14:21 2000 +++ libc-s390/sysdeps/unix/sysv/linux/s390/putmsg.c Thu Jan 1 01:00:00 1970 @@ -1 +0,0 @@ -#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/putpmsg.c libc-s390/sysdeps/unix/sysv/linux/s390/putpmsg.c --- libc/sysdeps/unix/sysv/linux/s390/putpmsg.c Wed Aug 2 17:14:21 2000 +++ libc-s390/sysdeps/unix/sysv/linux/s390/putpmsg.c Thu Jan 1 01:00:00 1970 @@ -1 +0,0 @@ -#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/readdir64.c libc-s390/sysdeps/unix/sysv/linux/s390/readdir64.c --- libc/sysdeps/unix/sysv/linux/s390/readdir64.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/readdir64.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/readdir64_r.c libc-s390/sysdeps/unix/sysv/linux/s390/readdir64_r.c --- libc/sysdeps/unix/sysv/linux/s390/readdir64_r.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/readdir64_r.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/scandir64.c libc-s390/sysdeps/unix/sysv/linux/s390/scandir64.c --- libc/sysdeps/unix/sysv/linux/s390/scandir64.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/scandir64.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/setrlimit.c libc-s390/sysdeps/unix/sysv/linux/s390/setrlimit.c --- libc/sysdeps/unix/sysv/linux/s390/setrlimit.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/setrlimit.c Mon Aug 21 12:46:42 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/sys/elf.h libc-s390/sysdeps/unix/sysv/linux/s390/sys/elf.h --- libc/sysdeps/unix/sysv/linux/s390/sys/elf.h Wed Aug 16 16:12:09 2000 +++ libc-s390/sysdeps/unix/sysv/linux/s390/sys/elf.h Mon Aug 21 12:45:13 2000 @@ -19,10 +19,8 @@ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 -/* - * ELF register definitions.. - */ +#warning "This header is obsolete; use instead." -#include +#include #endif /* _SYS_ELF_H */ diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/sys/procfs.h libc-s390/sysdeps/unix/sysv/linux/s390/sys/procfs.h --- libc/sysdeps/unix/sysv/linux/s390/sys/procfs.h Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/sys/procfs.h Mon Aug 21 12:45:13 2000 @@ -0,0 +1,134 @@ +/* Copyright (C) 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_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 + +__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; + + +/* 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 -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/syscalls.list libc-s390/sysdeps/unix/sysv/linux/s390/syscalls.list --- libc/sysdeps/unix/sysv/linux/s390/syscalls.list Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/syscalls.list Mon Aug 21 12:45:13 2000 @@ -0,0 +1,4 @@ +# File name Caller Syscall name Args Strong name Weak names + +oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 +oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/versionsort64.c libc-s390/sysdeps/unix/sysv/linux/s390/versionsort64.c --- libc/sysdeps/unix/sysv/linux/s390/versionsort64.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/versionsort64.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include diff -u -r --new-file libc/sysdeps/unix/sysv/linux/s390/xstat.c libc-s390/sysdeps/unix/sysv/linux/s390/xstat.c --- libc/sysdeps/unix/sysv/linux/s390/xstat.c Thu Jan 1 01:00:00 1970 +++ libc-s390/sysdeps/unix/sysv/linux/s390/xstat.c Mon Aug 21 12:45:13 2000 @@ -0,0 +1 @@ +#include