about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/i586/strlen.S11
-rw-r--r--sysdeps/libm-ieee754/e_j0f.c4
-rw-r--r--sysdeps/libm-ieee754/e_j1f.c2
-rw-r--r--sysdeps/m68k/fpu/e_acos.c1
-rw-r--r--sysdeps/m68k/fpu/e_acosf.c1
-rw-r--r--sysdeps/m68k/fpu/e_fmod.c1
-rw-r--r--sysdeps/m68k/fpu/e_fmodf.c1
-rw-r--r--sysdeps/m68k/fpu/isinfl.c1
-rw-r--r--sysdeps/m68k/fpu/isnanl.c1
-rw-r--r--sysdeps/m68k/fpu/s_atan.c1
-rw-r--r--sysdeps/m68k/fpu/s_atanf.c1
-rw-r--r--sysdeps/m68k/fpu/s_frexp.c1
-rw-r--r--sysdeps/m68k/fpu/s_frexpf.c1
-rw-r--r--sysdeps/m68k/fpu/s_ilogb.c1
-rw-r--r--sysdeps/m68k/fpu/s_ilogbf.c1
-rw-r--r--sysdeps/m68k/fpu/s_isinf.c1
-rw-r--r--sysdeps/m68k/fpu/s_isinff.c1
-rw-r--r--sysdeps/m68k/fpu/s_ldexp.c1
-rw-r--r--sysdeps/m68k/fpu/s_ldexpf.c1
-rw-r--r--sysdeps/m68k/fpu/s_modf.c1
-rw-r--r--sysdeps/m68k/fpu/s_modff.c1
-rw-r--r--sysdeps/unix/sysv/linux/getpriority.c42
-rw-r--r--sysdeps/unix/sysv/linux/m68k/fpu_control.h8
-rw-r--r--sysdeps/unix/sysv/linux/sys/socket.h1
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list1
25 files changed, 53 insertions, 34 deletions
diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S
index b807ed4b4f..15d01947d4 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, <drepper@gnu.ai.mit.edu>.
 
@@ -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 b4e97a2c6b..eed171cc90 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)<zero) cc = z/ss;
                     else            ss = z/cc;
                 }
-                if(ix>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 06384bd68d..e6f14a16ac 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 1a29222997..34dfc82cff 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef	FUNC
diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c
index 51968156f5..34da7ee163 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef	FUNC
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 310b1c41fa..578fa3ce53 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c
index 1a74c3611b..b3c3eadddf 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c
index 77fd759182..97b5983d0f 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 int
diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c
index 1e58ea4ebd..e5e3db2171 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 int
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index f1cc9757b5..51916e12ff 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c
index 5d1f337bee..d26f83875b 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index b24af74956..45c054016d 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 double
diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c
index c7cd98a684..dd30f6c39c 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 float
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index 2df00a656a..4119df968a 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 int
diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c
index 05f1546a96..8d9a027f22 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 int
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index 96745337c9..eec07c7d3a 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c
index d9101a9fd9..8f18db5b08 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c
index ee7662e7d2..67513d4875 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c
index a9741732a6..94abf25ac1 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index 355df2fb19..ce70be8168 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 double
diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c
index f56bcb45ef..04b51d5be1 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 <ansidecl.h>
-#define	__NO_MATH_INLINES
 #include <math.h>
 
 float
diff --git a/sysdeps/unix/sysv/linux/getpriority.c b/sysdeps/unix/sysv/linux/getpriority.c
new file mode 100644
index 0000000000..6dd56cce8b
--- /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 <errno.h>
+#include <sys/resource.h>
+
+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 0b3623d9a3..97bde853bc 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 b3e8fe85e9..cd6c58bd32 100644
--- a/sysdeps/unix/sysv/linux/sys/socket.h
+++ b/sysdeps/unix/sysv/linux/sys/socket.h
@@ -1,2 +1 @@
 #include <linux/socket.h>
-#include <linux/socket.h>
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 6deee5950f..d78a1f7e89 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