From 7a12c6bba750ca500009854db3a0fcdfb1ad61a7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 May 1996 17:44:31 +0000 Subject: Fri May 3 13:32:08 1996 Roland McGrath * intl/Makefile (CPPFLAGS): Change $(nlsdir) to $(i18ndir) in LOCALE_ALIAS_PATH. Fri May 3 03:14:02 1996 Ulrich Drepper * intl/Makefile (routines): Add l10nflist and explodename. (distribute): Add loadinfo.h and locale.alias. (install-others): New variable to install locale.alias. * intl/dcgettext.c, intl/finddomain.c, intl/gettextP.h, intl/loadmsgcat.c: Adapt for upcoming gettext-0.10.13. Some code is now shared with the locale implementation. * intl/explodename.c, intl/l10nflist.c, intl/loadinfo.h: New file. Extracted from finddomain.c. This is also used in the locale implementation. * intl/locale.alias: New file. Locale alias database compatible with X Window System's locale alias file. Can now be used in locale and gettext code. * libio/stdio.h: Add prototypes for asprint and vasprintf. * locale/C-collate.c, locale/C-ctype.c, locale/C-messages.c, locale/C-monetary.c, locale/C-numeric.c, locale/C-time.c: Add new field in structure with name of locale ("C" in this case). * locale/Makefile (routines): Add findlocale. * locale/findlocale.c: New file. Instead of trying to load the directly described file we now try to be much smarter when this fails. Use the same code as gettext does. * locale/loadlocale.c, locale/setlocale.c: Rewrite to know about new loading scheme. * locale/localeinfo.h: Adapt prototypes and declarations for new setlocale implementation. Remove definition of u32_t type. We now use u_int32_t from . * locale/programs/charset.h (ILLEGAL_CHAR_VALUE): Provide type with constant. * locale/programs/config.h, locale/lc-collate.c, locale/localeinfo.h, locale/programs/ld-collate.c, locale/programs/ld-ctype.c, locale/programs/ld-messages.c, locale/programs/ld-monetary.c, locale/programs/ld-numeric.c, locale/programs/ld-time.c, locale/weight.h, string/strcoll.c: Change to use u_int32_t and u_int16_t. * locale/programs/localedef.c (construct_output_path): Change name of output locale to contain normalized form of the character set portion. * string/Makefile (routines): Add agrz-ctsep and argz-next. (tests): Add tst-strlen. * string/argz-ctsep.c: New file. Implement reverse operation from argz-stringify. * string/argz-next.c: Non-inline version of function from argz.h. * string/argz.h, string/envz.h: Make usable as global header file. * string/envz.c: Fix declarations to use size_t where prototypes say so. * string/tst-strlen.c: New file. Another test for critical situation in strlen implementations. * sysdeps/i386/i586/strlen.S: Fix bug with highest byte in word being zero. * wctype/test_wctype.c: Fix controlling comparison after change to 32 bit character class array. Fri May 3 12:53:12 1996 Roland McGrath * sysdeps/unix/sysv/linux/sys/socket.h: Remove spurious doubled line. Thu May 2 22:50:52 1996 Andreas Schwab * sysdeps/unix/sysv/linux/getpriority.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Add s_getpriority. Thu May 2 22:41:31 1996 Andreas Schwab * sysdeps/unix/sysv/linux/m68k/fpu_control.h (_FPU_DEFAULT): Disable all exceptions. Thu May 2 22:33:14 1996 Andreas Schwab * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c, sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c, sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c, sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c, sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c: Don't define __NO_MATH_INLINES, which is already defined on command line. Thu May 2 22:18:28 1996 Andreas Schwab * sysdeps/libm-ieee754/e_j0f.c (__ieee754_j0f, __ieee754_y0f): Replace 0x80000000 by 0x48000000. * sysdeps/libm-ieee754/e_j1f.c (__ieee754_j1f): Likewise. Thu May 2 21:30:33 1996 Andreas Schwab * sunrpc/svc_simple.c: Make global variable pl local to registerrpc. Thu May 2 00:24:04 1996 Andreas Schwab * time/Makefile (tz-cflags): New variable. (CFLAGS-tzfile.c): New variable. (CFLAGS-zic.c): Add $(tz-cflags). (tz-cc): Remove variable. ($(objpfx)tzfile.o, $(objpfx)zic.o): Remove targets. * sysdeps/mach/hurd/getcwd.c: Jump out of both loops when we find a name, instead of checking for reaching end of buffer, which happens when the match is the last entry in the buffer. --- sysdeps/i386/i586/strlen.S | 11 +++----- sysdeps/libm-ieee754/e_j0f.c | 4 +-- sysdeps/libm-ieee754/e_j1f.c | 2 +- sysdeps/m68k/fpu/e_acos.c | 1 - sysdeps/m68k/fpu/e_acosf.c | 1 - sysdeps/m68k/fpu/e_fmod.c | 1 - sysdeps/m68k/fpu/e_fmodf.c | 1 - sysdeps/m68k/fpu/isinfl.c | 1 - sysdeps/m68k/fpu/isnanl.c | 1 - sysdeps/m68k/fpu/s_atan.c | 1 - sysdeps/m68k/fpu/s_atanf.c | 1 - sysdeps/m68k/fpu/s_frexp.c | 1 - sysdeps/m68k/fpu/s_frexpf.c | 1 - sysdeps/m68k/fpu/s_ilogb.c | 1 - sysdeps/m68k/fpu/s_ilogbf.c | 1 - sysdeps/m68k/fpu/s_isinf.c | 1 - sysdeps/m68k/fpu/s_isinff.c | 1 - sysdeps/m68k/fpu/s_ldexp.c | 1 - sysdeps/m68k/fpu/s_ldexpf.c | 1 - sysdeps/m68k/fpu/s_modf.c | 1 - sysdeps/m68k/fpu/s_modff.c | 1 - sysdeps/unix/sysv/linux/getpriority.c | 42 ++++++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/m68k/fpu_control.h | 8 +++--- sysdeps/unix/sysv/linux/sys/socket.h | 1 - sysdeps/unix/sysv/linux/syscalls.list | 1 + 25 files changed, 53 insertions(+), 34 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/getpriority.c (limited to 'sysdeps') diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S index b807ed4..15d0194 100644 --- a/sysdeps/i386/i586/strlen.S +++ b/sysdeps/i386/i586/strlen.S @@ -1,6 +1,6 @@ /* strlen -- Compute length og NUL terminated string. Highly optimized version for ix86, x>=5. -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . @@ -102,7 +102,6 @@ L1: jnc L3 /* previous addl caused overflow? */ xorl %ecx, %edx /* (word+magic)^word */ - subl $magic, %ecx /* undo previous addl to restore word */ andl $~magic, %edx /* any of the carry flags set? */ @@ -119,7 +118,6 @@ L1: jnc L3 /* previous addl caused overflow? */ xorl %ecx, %edx /* (word+magic)^word */ - subl $magic, %ecx /* undo previous addl to restore word */ andl $~magic, %edx /* any of the carry flags set? */ @@ -136,7 +134,6 @@ L1: jnc L3 /* previous addl caused overflow? */ xorl %ecx, %edx /* (word+magic)^word */ - subl $magic, %ecx /* undo previous addl to restore word */ andl $~magic, %edx /* any of the carry flags set? */ @@ -149,11 +146,10 @@ L1: subl %ecx, %edx /* first step to negate word */ addl $magic, %ecx /* add magic word */ - decl %edx /* wcomplete negation of ord */ + decl %edx /* complete negation of word */ jnc L3 /* previous addl caused overflow? */ xorl %ecx, %edx /* (word+magic)^word */ - subl $magic, %ecx /* undo previous addl to restore word */ andl $~magic, %edx /* any of the carry flags set? */ @@ -161,8 +157,9 @@ L1: L3: subl $4, %eax /* correct too early pointer increment */ - testb %cl, %cl /* lowest byte NUL? */ + subl $magic, %ecx + cmpb $0, %cl /* lowest byte NUL? */ jz L2 /* yes => return */ inc %eax /* increment pointer */ diff --git a/sysdeps/libm-ieee754/e_j0f.c b/sysdeps/libm-ieee754/e_j0f.c index b4e97a2..eed171c 100644 --- a/sysdeps/libm-ieee754/e_j0f.c +++ b/sysdeps/libm-ieee754/e_j0f.c @@ -79,7 +79,7 @@ static float zero = 0.0; * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x) * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x) */ - if(ix>0x80000000) z = (invsqrtpi*cc)/__sqrtf(x); + if(ix>0x48000000) z = (invsqrtpi*cc)/__sqrtf(x); else { u = pzerof(x); v = qzerof(x); z = invsqrtpi*(u*cc-v*ss)/__sqrtf(x); @@ -161,7 +161,7 @@ v04 = 4.4111031494e-10; /* 0x2ff280c2 */ if ((s*c)0x80000000) z = (invsqrtpi*ss)/__sqrtf(x); + if(ix>0x48000000) z = (invsqrtpi*ss)/__sqrtf(x); else { u = pzerof(x); v = qzerof(x); z = invsqrtpi*(u*ss+v*cc)/__sqrtf(x); diff --git a/sysdeps/libm-ieee754/e_j1f.c b/sysdeps/libm-ieee754/e_j1f.c index 06384bd..e6f14a1 100644 --- a/sysdeps/libm-ieee754/e_j1f.c +++ b/sysdeps/libm-ieee754/e_j1f.c @@ -80,7 +80,7 @@ static float zero = 0.0; * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x) * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x) */ - if(ix>0x80000000) z = (invsqrtpi*cc)/__sqrtf(y); + if(ix>0x48000000) z = (invsqrtpi*cc)/__sqrtf(y); else { u = ponef(y); v = qonef(y); z = invsqrtpi*(u*cc-v*ss)/__sqrtf(y); diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 1a29222..34dfc82 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c index 5196815..34da7ee 100644 --- a/sysdeps/m68k/fpu/e_acosf.c +++ b/sysdeps/m68k/fpu/e_acosf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 310b1c4..578fa3c 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c index 1a74c36..b3c3ead 100644 --- a/sysdeps/m68k/fpu/e_fmodf.c +++ b/sysdeps/m68k/fpu/e_fmodf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c index 77fd759..97b5983 100644 --- a/sysdeps/m68k/fpu/isinfl.c +++ b/sysdeps/m68k/fpu/isinfl.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c index 1e58ea4..e5e3db2 100644 --- a/sysdeps/m68k/fpu/isnanl.c +++ b/sysdeps/m68k/fpu/isnanl.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index f1cc975..51916e1 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c index 5d1f337..d26f838 100644 --- a/sysdeps/m68k/fpu/s_atanf.c +++ b/sysdeps/m68k/fpu/s_atanf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index b24af74..45c0540 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include double diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c index c7cd98a..dd30f6c 100644 --- a/sysdeps/m68k/fpu/s_frexpf.c +++ b/sysdeps/m68k/fpu/s_frexpf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include float diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index 2df00a6..4119df9 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c index 05f1546..8d9a027 100644 --- a/sysdeps/m68k/fpu/s_ilogbf.c +++ b/sysdeps/m68k/fpu/s_ilogbf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include int diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index 9674533..eec07c7 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c index d9101a9..8f18db5 100644 --- a/sysdeps/m68k/fpu/s_isinff.c +++ b/sysdeps/m68k/fpu/s_isinff.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c index ee7662e..67513d4 100644 --- a/sysdeps/m68k/fpu/s_ldexp.c +++ b/sysdeps/m68k/fpu/s_ldexp.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c index a974173..94abf25 100644 --- a/sysdeps/m68k/fpu/s_ldexpf.c +++ b/sysdeps/m68k/fpu/s_ldexpf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include #ifndef FUNC diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index 355df2f..ce70be8 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include double diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c index f56bcb4..04b51d5 100644 --- a/sysdeps/m68k/fpu/s_modff.c +++ b/sysdeps/m68k/fpu/s_modff.c @@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include -#define __NO_MATH_INLINES #include float diff --git a/sysdeps/unix/sysv/linux/getpriority.c b/sysdeps/unix/sysv/linux/getpriority.c new file mode 100644 index 0000000..6dd56cc --- /dev/null +++ b/sysdeps/unix/sysv/linux/getpriority.c @@ -0,0 +1,42 @@ +/* getpriority for Linux. +Copyright (C) 1996 Free Software Foundation, Inc. + +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 + +extern int __syscall_getpriority (int, int); + +/* The return value of __syscall_getpriority is biased by this value + to avoid returning negative values. */ +#define PZERO 20 + +/* Return the highest priority of any process specified by WHICH and WHO + (see above); if WHO is zero, the current process, process group, or user + (as specified by WHO) is used. A lower priority number means higher + priority. Priorities range from PRIO_MIN to PRIO_MAX. */ + +int +getpriority (enum __priority_which which, int who) +{ + int res; + + res = __syscall_getpriority ((int) which, who); + if (res >= 0) + res = PZERO - res; + return res; +} diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/unix/sysv/linux/m68k/fpu_control.h index 0b3623d..97bde85 100644 --- a/sysdeps/unix/sysv/linux/m68k/fpu_control.h +++ b/sysdeps/unix/sysv/linux/m68k/fpu_control.h @@ -80,11 +80,9 @@ Cambridge, MA 02139, USA. */ /* Now two recommended fpucr */ -/* Linux default: - - extended precision - - rounding to nearest - - exceptions on overflow, zero divide and NaN */ -#define _FPU_DEFAULT 0x00005400 +/* The fdlibm code requires no interrupts for exceptions. Don't + change the rounding mode, it would break long double I/O! */ +#define _FPU_DEFAULT 0x00000000 /* IEEE: same as above, but exceptions. We must make it non-zero so that __setfpucw works. This bit will be ignored. */ diff --git a/sysdeps/unix/sysv/linux/sys/socket.h b/sysdeps/unix/sysv/linux/sys/socket.h index b3e8fe8..cd6c58b 100644 --- a/sysdeps/unix/sysv/linux/sys/socket.h +++ b/sysdeps/unix/sysv/linux/sys/socket.h @@ -1,2 +1 @@ #include -#include diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 6deee59..d78a1f7 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -20,6 +20,7 @@ nanosleep - nanosleep 2 nanosleep personality init-first personality 1 __personality personality pipe - pipe 1 __pipe pipe reboot - reboot 3 reboot +s_getpriority getpriority getpriority 2 __syscall_getpriority s_ptrace ptrace ptrace 4 __syscall_ptrace s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend sched_setp - sched_setparam 2 __sched_setparam sched_setparam -- cgit v1.1