summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/libm-i387/s_asinh.S6
-rw-r--r--sysdeps/libm-i387/s_asinhf.S6
-rw-r--r--sysdeps/libm-i387/s_asinhl.S6
-rw-r--r--sysdeps/libm-i387/s_nearbyint.S2
-rw-r--r--sysdeps/libm-i387/s_nearbyintf.S2
-rw-r--r--sysdeps/libm-i387/s_nearbyintl.S2
-rw-r--r--sysdeps/unix/sysv/linux/configure.in24
-rw-r--r--sysdeps/unix/sysv/linux/mk-stdiolim.c4
-rw-r--r--sysdeps/unix/sysv/linux/stdio_lim.h.in8
9 files changed, 57 insertions, 3 deletions
diff --git a/sysdeps/libm-i387/s_asinh.S b/sysdeps/libm-i387/s_asinh.S
index a71d0b66f4..45153fe2d3 100644
--- a/sysdeps/libm-i387/s_asinh.S
+++ b/sysdeps/libm-i387/s_asinh.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -51,8 +51,12 @@ ENTRY(__asinh)
andl $0x80000000, %ecx
xorl %ecx, 8(%esp)
fldl 4(%esp) // |x|
+ movl %eax, %edx
cmpl $0x3e300000, %eax
jb 2f // |x| < 2^-28
+ orl $0x800fffff, %edx
+ incl %edx
+ jz 4f // x in ħInf or NaN
fldln2 // log(2) : |x|
cmpl $0x41b00000, %eax
fxch // |x| : log(2)
diff --git a/sysdeps/libm-i387/s_asinhf.S b/sysdeps/libm-i387/s_asinhf.S
index f47bc9e0ac..7e5176c4a6 100644
--- a/sysdeps/libm-i387/s_asinhf.S
+++ b/sysdeps/libm-i387/s_asinhf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -51,8 +51,12 @@ ENTRY(__asinhf)
andl $0x80000000, %ecx
xorl %ecx, 8(%esp)
flds 4(%esp) // |x|
+ movl %eax, %edx
cmpl $0x38000000, %eax
jb 2f // |x| < 2^-14
+ orl $0x807fffff, %edx
+ incl %edx
+ jz 4f // x in ħInf or NaN
fldln2 // log(2) : |x|
cmpl $0x47000000, %eax
fxch // |x| : log(2)
diff --git a/sysdeps/libm-i387/s_asinhl.S b/sysdeps/libm-i387/s_asinhl.S
index e112244908..f764381aab 100644
--- a/sysdeps/libm-i387/s_asinhl.S
+++ b/sysdeps/libm-i387/s_asinhl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -58,8 +58,12 @@ ENTRY(__asinhl)
andl $0x8000, %ecx
xorl %ecx, 12(%esp)
fldt 4(%esp) // |x|
+ movl %eax, %edx
cmpl $0x3fde, %eax
jb 2f // |x| < 2^-34
+ orl $0xffff8000, %edx
+ incl %edx
+ jz 4f // x in ħInf or NaN
fldln2 // log(2) : |x|
cmpl $0x4020, %eax
fxch // |x| : log(2)
diff --git a/sysdeps/libm-i387/s_nearbyint.S b/sysdeps/libm-i387/s_nearbyint.S
index 566c075c37..65ce4f76a1 100644
--- a/sysdeps/libm-i387/s_nearbyint.S
+++ b/sysdeps/libm-i387/s_nearbyint.S
@@ -18,6 +18,8 @@ ENTRY(__nearbyint)
frndint
fclex
fldcw (%esp)
+ popl %ecx
+ popl %eax
ret
END (__nearbyint)
weak_alias (__nearbyint, nearbyint)
diff --git a/sysdeps/libm-i387/s_nearbyintf.S b/sysdeps/libm-i387/s_nearbyintf.S
index 715434031c..090c631607 100644
--- a/sysdeps/libm-i387/s_nearbyintf.S
+++ b/sysdeps/libm-i387/s_nearbyintf.S
@@ -18,6 +18,8 @@ ENTRY(__nearbyintf)
frndint
fclex
fldcw (%esp)
+ popl %ecx
+ popl %eax
ret
END (__nearbyintf)
weak_alias (__nearbyintf, nearbyintf)
diff --git a/sysdeps/libm-i387/s_nearbyintl.S b/sysdeps/libm-i387/s_nearbyintl.S
index c50b42d961..2f60af8f18 100644
--- a/sysdeps/libm-i387/s_nearbyintl.S
+++ b/sysdeps/libm-i387/s_nearbyintl.S
@@ -18,6 +18,8 @@ ENTRY(__nearbyintl)
frndint
fclex
fldcw (%esp)
+ popl %ecx
+ popl %eax
ret
END (__nearbyintl)
weak_alias (__nearbyintl, nearbyintl)
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 18bb6dc469..f24af67f1e 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -83,3 +83,27 @@ fi
if test -f $srcdir/elf/ldconfig.c; then
has_ldconfig=yes
fi
+
+# Generate stdio_lim.h
+default_fopen_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FOPEN_MAX | cut -f2 -d':'`"
+default_filename_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FILENAME_MAX | cut -f2 -d':'`"
+# We double check if "default_fopen_max" and "default_filename_max" are
+# ok or not.
+if test "x$default_fopen_max" != "xOPEN_MAX" \
+ -a "x$default_filename_max" != "xPATH_MAX"
+then
+ sed -e "s/DEFAULT_FOPEN_MAX/$default_fopen_max/" \
+ -e "s/DEFAULT_FILENAME_MAX/$default_filename_max/" \
+ $srcdir/sysdeps/unix/sysv/linux/stdio_lim.h.in > stdio_lim.h.new
+ if test -r stdio_lim.h.new && cmp -s stdio_lim.h.new stdio_lim.h
+ then
+ echo stdio_lim.h unchanged
+ rm -f stdio_lim.h.new
+ else
+ mv -f stdio_lim.h.new stdio_lim.h
+ fi
+else
+ # We remove the old one if we cannot generate the new one during
+ # configure.
+ rm -f stdio_lim.h
+fi
diff --git a/sysdeps/unix/sysv/linux/mk-stdiolim.c b/sysdeps/unix/sysv/linux/mk-stdiolim.c
new file mode 100644
index 0000000000..23295f007d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mk-stdiolim.c
@@ -0,0 +1,4 @@
+#include <linux/limits.h>
+
+DEFAULT_FOPEN_MAX:OPEN_MAX
+DEFAULT_FILENAME_MAX:PATH_MAX
diff --git a/sysdeps/unix/sysv/linux/stdio_lim.h.in b/sysdeps/unix/sysv/linux/stdio_lim.h.in
new file mode 100644
index 0000000000..9d6a957028
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/stdio_lim.h.in
@@ -0,0 +1,8 @@
+#define L_tmpnam 19
+#define TMP_MAX 238328
+#ifdef __USE_POSIX
+#define L_ctermid 9
+#define L_cuserid 9
+#endif
+#define FOPEN_MAX DEFAULT_FOPEN_MAX
+#define FILENAME_MAX DEFAULT_FILENAME_MAX