1997-04-30 17:35  Ulrich Drepper  <drepper@cygnus.com>

	* math/libm-test.c: Implement test for exceptions.
	Partly due to Andreas Jaeger.
	(csin_test): New function.
	* sysdeps/libm-i387/s_cexp.S: Raise correct exceptions.
	* sysdeps/libm-i387/s_cexpf.S: Likewise.
	* sysdeps/libm-i387/s_cexpl.S: Likewise.
	* sysdeps/libm-ieee754/s_ccos.c: Likewise.
	* sysdeps/libm-ieee754/s_ccosf.c: Likewise.
	* sysdeps/libm-ieee754/s_ccosl.c: Likewise.
	* sysdeps/libm-ieee754/s_ccosh.c: Likewise.
	* sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
	* sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
	* sysdeps/libm-ieee754/s_cexp.c: Likewise.
	* sysdeps/libm-ieee754/s_cexpf.c: Likewise.
	* sysdeps/libm-ieee754/s_cexpl.c: Likewise.
	* sysdeps/libm-ieee754/s_csinh.c: Likewise.
	* sysdeps/libm-ieee754/s_csinhf.c: Likewise.
	* sysdeps/libm-ieee754/s_csinhl.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanh.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanhf.c: Likewise.
	* sysdeps/libm-ieee754/s_ctanhl.c: Likewise.

	* sysdeps/libm-ieee754/s_ccosh.c: Correct computation.
	* sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
	* sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
	* sysdeps/libm-ieee754/s_csinh.c: Likewise.
	* sysdeps/libm-ieee754/s_csinhf.c: Likewise.
	* sysdeps/libm-ieee754/s_csinhl.c: Likewise.

	* sysdeps/libm-ieee754/s_csin.c: Rewrite.
	* sysdeps/libm-ieee754/s_csinf.c: Likewise.
	* sysdeps/libm-ieee754/s_csinl.c: Likewise.

	* stdlib/random_r.c (__srandom_r): Don't use seed 0.  Use 1 in this
	case.

	* sysdeps/i386/dl-machine.h (elf_machine_load_address): Use notation
	for local label.

	* time/strftime.c (add): Respect `0' padding flag.
	Reported by Richard Stallman <rms@gnu.ai.mit.edu>.

1997-04-30 15:46  Ulrich Drepper  <drepper@cygnus.com>

	* Makeconfig (start-installed-name): Define here, not in csu/Makefile.
	Use in +link macro.
	* csu/Makefile (distribute): Add abi-note.S and abi-tag.h.
	(start-installed-name): Don't define here.
	When ELF generate file named by start-installed-name from start.o
	and abi-note.o.
	* csu/abi-note.S: New file.
	* sysdeps/stub/abi-tag.h: New file.
	* sysdpes/unix/sysv/linux/abi-tag.h: New file.
	Patches by Roland McGrath <roland@gnu.ai.mit.edu>.

1997-04-30 01:32  Ulrich Drepper  <drepper@cygnus.com>

	* manual/stdio.texi: Use @vtable where possible.
	Add TeX version of @multitable since texi2dvi cannot handle them
	correct in the moment.

	* po/de.po: Update.

1997-04-29 21:06  Ulrich Drepper  <drepper@cygnus.com>

	* Makeconfig: Don't set cross-compiling based on $(BUILD_CC) != $(CC).
	* config.make.in: Set cross-compiling from configure result.
	* configure.in: Emit definition of `cross_compiling'.
	Patches by Marcus G. Daniels <marcus@cathcart.sysc.pdx.edu>.

1997-04-27 21:50  Philip Blundell  <pjb27@cam.ac.uk>

	* sysdeps/unix/sysv/linux/net/route.h (struct in6_rtmsg): Use
	correct `int' sizes for struct members.

1997-04-29 19:14  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/libm-i387/e_powf.S Generate invalid exception correctly.
	* sysdeps/libm-i387/e_pow.S: Likewise.
	* sysdeps/libm-i387/e_powl.S: Likewise.

1997-04-23 10:08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* math/fenv.h: Correct typos.

1997-04-28 10:04  Richard Henderson  <rth@tamu.edu>

	* sysdeps/unix/sysv/linux/alpha/clone.S: Save the function argument
	in t0 rather than a4 to avoid it being clobbered.

1997-04-27 23:52  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* manual/summary.awk: Recognize @defmumblex.

	* manual/signal.texi (Miscellaneous Signals): Use @deftypevrx for
	second description header.

1997-04-27 23:29  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* manual/arith.texi (Floating-Point Classes): Don't indent text,
	makeinfo doesn't like that.

1997-04-27 20:52  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* malloc/obstack.h (obstack_specify_allocation_with_arg,
	obstack_chunkfun, obstack_freefun): Fix casts.

1997-04-27 18:21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* manual/xtract-typefun.awk: Allow names with only one character.

1997-04-26 14:16  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/netinet/ip_fw.h: Use <netinet/ip_icmp.h>
	not <netinet/icmp.h>.
	Reported by Michael Deutschmann <ldeutsch@mail.netshop.net>.

1997-04-25 12:31  Ulrich Drepper  <drepper@cygnus.com>

	* csu/Makefile ($(objpfx)initfini.s): Add CPPFLAGS, CFLAGS and -g0
	to command line of compiler.
	Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>.

	* sysdeps/generic/sigset.h (__sigandset, __sigorset): Fix typos.
	Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>.

	* signal/signal.h (_sys_siglist, sys_siglist): Use _NSIG, not NSIG
	in declaration.
	Patch by Michael Widenius <monty@tcx.se>.

	* time/strptime.c (strptime_internal): Fix %I format specifier
	being off by one.
	Patch by Mark Kettenis <kettenis@phys.uva.nl>.

1997-04-24 12:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* stdlib/lcong48_r.c: Include <limits.h>.
	* stdlib/seed48_r.c: Likewise.

	* stdio-common/printf_size.c (printf_size): Correct type of
	`units' and make robust against future changes.

1997-04-23 18:58  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/libm-ieee754/s_cproj.c: Use isfinite instead of finite.
	* sysdeps/libm-ieee754/s_cprojl.c: Likewise.
	* sysdeps/libm-ieee754/s_cprojf.c: Likewise.

1997-04-23 18:53  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* manual/arith.texi, manual/math.texi: Use @defmumblex for
	additional description headers.
	* manual/xtract-typefun.awk: Recognize them.

1997-04-22 15:58  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* stdio-common/printf_size.c (printf_size): Correct size of array
	units.
This commit is contained in:
Ulrich Drepper 1997-04-30 15:51:34 +00:00
parent a12ea214db
commit 779ae82ecd
60 changed files with 2734 additions and 1443 deletions

161
ChangeLog
View File

@ -1,3 +1,164 @@
1997-04-30 17:35 Ulrich Drepper <drepper@cygnus.com>
* math/libm-test.c: Implement test for exceptions.
Partly due to Andreas Jaeger.
(csin_test): New function.
* sysdeps/libm-i387/s_cexp.S: Raise correct exceptions.
* sysdeps/libm-i387/s_cexpf.S: Likewise.
* sysdeps/libm-i387/s_cexpl.S: Likewise.
* sysdeps/libm-ieee754/s_ccos.c: Likewise.
* sysdeps/libm-ieee754/s_ccosf.c: Likewise.
* sysdeps/libm-ieee754/s_ccosl.c: Likewise.
* sysdeps/libm-ieee754/s_ccosh.c: Likewise.
* sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
* sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
* sysdeps/libm-ieee754/s_cexp.c: Likewise.
* sysdeps/libm-ieee754/s_cexpf.c: Likewise.
* sysdeps/libm-ieee754/s_cexpl.c: Likewise.
* sysdeps/libm-ieee754/s_csinh.c: Likewise.
* sysdeps/libm-ieee754/s_csinhf.c: Likewise.
* sysdeps/libm-ieee754/s_csinhl.c: Likewise.
* sysdeps/libm-ieee754/s_ctanh.c: Likewise.
* sysdeps/libm-ieee754/s_ctanhf.c: Likewise.
* sysdeps/libm-ieee754/s_ctanhl.c: Likewise.
* sysdeps/libm-ieee754/s_ccosh.c: Correct computation.
* sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
* sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
* sysdeps/libm-ieee754/s_csinh.c: Likewise.
* sysdeps/libm-ieee754/s_csinhf.c: Likewise.
* sysdeps/libm-ieee754/s_csinhl.c: Likewise.
* sysdeps/libm-ieee754/s_csin.c: Rewrite.
* sysdeps/libm-ieee754/s_csinf.c: Likewise.
* sysdeps/libm-ieee754/s_csinl.c: Likewise.
* stdlib/random_r.c (__srandom_r): Don't use seed 0. Use 1 in this
case.
* sysdeps/i386/dl-machine.h (elf_machine_load_address): Use notation
for local label.
* time/strftime.c (add): Respect `0' padding flag.
Reported by Richard Stallman <rms@gnu.ai.mit.edu>.
1997-04-30 15:46 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig (start-installed-name): Define here, not in csu/Makefile.
Use in +link macro.
* csu/Makefile (distribute): Add abi-note.S and abi-tag.h.
(start-installed-name): Don't define here.
When ELF generate file named by start-installed-name from start.o
and abi-note.o.
* csu/abi-note.S: New file.
* sysdeps/stub/abi-tag.h: New file.
* sysdpes/unix/sysv/linux/abi-tag.h: New file.
Patches by Roland McGrath <roland@gnu.ai.mit.edu>.
1997-04-30 01:32 Ulrich Drepper <drepper@cygnus.com>
* manual/stdio.texi: Use @vtable where possible.
Add TeX version of @multitable since texi2dvi cannot handle them
correct in the moment.
* po/de.po: Update.
1997-04-29 21:06 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't set cross-compiling based on $(BUILD_CC) != $(CC).
* config.make.in: Set cross-compiling from configure result.
* configure.in: Emit definition of `cross_compiling'.
Patches by Marcus G. Daniels <marcus@cathcart.sysc.pdx.edu>.
1997-04-27 21:50 Philip Blundell <pjb27@cam.ac.uk>
* sysdeps/unix/sysv/linux/net/route.h (struct in6_rtmsg): Use
correct `int' sizes for struct members.
1997-04-29 19:14 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-i387/e_powf.S Generate invalid exception correctly.
* sysdeps/libm-i387/e_pow.S: Likewise.
* sysdeps/libm-i387/e_powl.S: Likewise.
1997-04-23 10:08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/fenv.h: Correct typos.
1997-04-28 10:04 Richard Henderson <rth@tamu.edu>
* sysdeps/unix/sysv/linux/alpha/clone.S: Save the function argument
in t0 rather than a4 to avoid it being clobbered.
1997-04-27 23:52 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/summary.awk: Recognize @defmumblex.
* manual/signal.texi (Miscellaneous Signals): Use @deftypevrx for
second description header.
1997-04-27 23:29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi (Floating-Point Classes): Don't indent text,
makeinfo doesn't like that.
1997-04-27 20:52 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/obstack.h (obstack_specify_allocation_with_arg,
obstack_chunkfun, obstack_freefun): Fix casts.
1997-04-27 18:21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/xtract-typefun.awk: Allow names with only one character.
1997-04-26 14:16 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/netinet/ip_fw.h: Use <netinet/ip_icmp.h>
not <netinet/icmp.h>.
Reported by Michael Deutschmann <ldeutsch@mail.netshop.net>.
1997-04-25 12:31 Ulrich Drepper <drepper@cygnus.com>
* csu/Makefile ($(objpfx)initfini.s): Add CPPFLAGS, CFLAGS and -g0
to command line of compiler.
Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>.
* sysdeps/generic/sigset.h (__sigandset, __sigorset): Fix typos.
Patch by Marcus G. Daniels <marcus@sysc.pdx.edu>.
* signal/signal.h (_sys_siglist, sys_siglist): Use _NSIG, not NSIG
in declaration.
Patch by Michael Widenius <monty@tcx.se>.
* time/strptime.c (strptime_internal): Fix %I format specifier
being off by one.
Patch by Mark Kettenis <kettenis@phys.uva.nl>.
1997-04-24 12:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdlib/lcong48_r.c: Include <limits.h>.
* stdlib/seed48_r.c: Likewise.
* stdio-common/printf_size.c (printf_size): Correct type of
`units' and make robust against future changes.
1997-04-23 18:58 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/s_cproj.c: Use isfinite instead of finite.
* sysdeps/libm-ieee754/s_cprojl.c: Likewise.
* sysdeps/libm-ieee754/s_cprojf.c: Likewise.
1997-04-23 18:53 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi, manual/math.texi: Use @defmumblex for
additional description headers.
* manual/xtract-typefun.awk: Recognize them.
1997-04-22 15:58 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* stdio-common/printf_size.c (printf_size): Correct size of array
units.
1997-04-21 07:50 H.J. Lu <hjl@gnu.ai.mit.edu> 1997-04-21 07:50 H.J. Lu <hjl@gnu.ai.mit.edu>
* libgen.h: New file. * libgen.h: New file.

View File

@ -195,9 +195,9 @@ dist.tar: README $(tardir) $(+tsrcs)
$(tardir).tar: dist.tar subdir_dist $(tardir).tar: dist.tar subdir_dist
@echo Files listed here have names exceeding 14 chars. @echo Files listed here have names exceeding 14 chars.
tar xfv $< -C /tmp | sed -n '/[^/]\{15,\}/p' tar xfv $< -C $${TMPDIR-/tmp} | sed -n '/[^/]\{15,\}/p'
tar covf $@ -C /tmp $(tardir) tar covf $@ -C $${TMPDIR-/tmp} $(tardir)
-rm -fr /tmp/$(tardir) dist.tar & -rm -fr $${TMPDIR-/tmp}/$(tardir) dist.tar &
%.Z: % %.Z: %
compress -c $< > $@ compress -c $< > $@

View File

@ -318,13 +318,28 @@ ifndef asm-CPPFLAGS
asm-CPPFLAGS = asm-CPPFLAGS =
endif endif
# Installed name of the startup code.
ifneq ($(elf),yes)
# When not using ELF, there is just one startfile, called crt0.o.
start-installed-name = crt0.o
else
# In the ELF universe, crt0.o is called crt1.o, and there are
# some additional bizarre files.
start-installed-name = crt1.o
have-initfini = yes
endif
# Command for linking programs with the C library. # Command for linking programs with the C library.
ifndef +link ifndef +link
+link = $(CC) -nostdlib -nostartfiles -o $@ \ +link = $(CC) -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \ $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+prector) \ $(addprefix $(csu-objpfx),$(start-installed-name)) \
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \ $(+preinit) $(+prector) \
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \ $(filter-out $(addprefix $(csu-objpfx),start.o \
$(start-installed-name))\
$(+preinit) $(link-extra-libs) \
$(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit) $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
endif endif
ifndef config-LDFLAGS ifndef config-LDFLAGS
@ -536,12 +551,6 @@ endif
ifndef BUILD_CC ifndef BUILD_CC
BUILD_CC = $(CC) BUILD_CC = $(CC)
endif endif
ifneq ($(BUILD_CC),$(CC))
cross-compiling := yes
else
cross-compiling := no
endif
# Figure out the version numbers from version.h. # Figure out the version numbers from version.h.

View File

@ -42,6 +42,7 @@ build-omitfp = @omitfp@
build-bounded = @bounded@ build-bounded = @bounded@
stdio = @stdio@ stdio = @stdio@
add-ons = @subdirs@ add-ons = @subdirs@
cross-compiling = @cross_compiling@
# Build tools. # Build tools.
CC = @CC@ CC = @CC@

80
configure vendored
View File

@ -1345,8 +1345,9 @@ test -n "$BUILD_CC" && break
done done
fi fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1350: checking how to run the C preprocessor" >&5 echo "configure:1351: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@ -1361,13 +1362,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1365 "configure" #line 1366 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1378,13 +1379,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1382 "configure" #line 1383 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1415,7 +1416,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2 set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1419: checking for $ac_word" >&5 echo "configure:1420: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1446,7 +1447,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1450: checking for $ac_word" >&5 echo "configure:1451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1477,7 +1478,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1481: checking for $ac_word" >&5 echo "configure:1482: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1512,7 +1513,7 @@ fi
# Extract the first word of "bash", so it can be a program name with args. # Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2 set dummy bash; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1516: checking for $ac_word" >&5 echo "configure:1517: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1553,7 +1554,7 @@ if test "$BASH" = no; then
# Extract the first word of "ksh", so it can be a program name with args. # Extract the first word of "ksh", so it can be a program name with args.
set dummy ksh; ac_word=$2 set dummy ksh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1557: checking for $ac_word" >&5 echo "configure:1558: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1595,7 +1596,7 @@ fi
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6 echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
echo "configure:1599: checking for signed size_t type" >&5 echo "configure:1600: checking for signed size_t type" >&5
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1619,12 +1620,12 @@ EOF
fi fi
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6 echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
echo "configure:1623: checking for libc-friendly stddef.h" >&5 echo "configure:1624: checking for libc-friendly stddef.h" >&5
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1628 "configure" #line 1629 "configure"
#include "confdefs.h" #include "confdefs.h"
#define __need_size_t #define __need_size_t
#define __need_wchar_t #define __need_wchar_t
@ -1639,7 +1640,7 @@ size_t size; wchar_t wchar;
if (&size == NULL || &wchar == NULL) abort (); if (&size == NULL || &wchar == NULL) abort ();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
libc_cv_friendly_stddef=yes libc_cv_friendly_stddef=yes
else else
@ -1658,7 +1659,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
fi fi
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6 echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
echo "configure:1662: checking whether we need to use -P to assemble .S files" >&5 echo "configure:1663: checking whether we need to use -P to assemble .S files" >&5
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1681,7 +1682,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi fi
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6 echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
echo "configure:1685: checking for assembler global-symbol directive" >&5 echo "configure:1686: checking for assembler global-symbol directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1711,7 +1712,7 @@ EOF
fi fi
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6 echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
echo "configure:1715: checking for .set assembler directive" >&5 echo "configure:1716: checking for .set assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1745,7 +1746,7 @@ EOF
fi fi
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6 echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
echo "configure:1749: checking for .symver assembler directive" >&5 echo "configure:1750: checking for .symver assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1764,7 +1765,7 @@ fi
echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6 echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6 echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
echo "configure:1768: checking for ld --version-script" >&5 echo "configure:1769: checking for ld --version-script" >&5
if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1781,7 +1782,7 @@ VERS {
EOF EOF
if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
if { ac_try='${CC-cc} $CFLAGS --shared -o conftest.so conftest.o if { ac_try='${CC-cc} $CFLAGS --shared -o conftest.so conftest.o
-Wl,--version-script,conftest.map'; { (eval echo configure:1785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; -Wl,--version-script,conftest.map'; { (eval echo configure:1786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then then
libc_cv_ld_version_script_option=yes libc_cv_ld_version_script_option=yes
else else
@ -1811,7 +1812,7 @@ fi
if test $elf = yes; then if test $elf = yes; then
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6 echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
echo "configure:1815: checking for .previous assembler directive" >&5 echo "configure:1816: checking for .previous assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1819,7 +1820,7 @@ else
.section foo_section .section foo_section
.previous .previous
EOF EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_previous_directive=yes libc_cv_asm_previous_directive=yes
else else
libc_cv_asm_previous_directive=no libc_cv_asm_previous_directive=no
@ -1835,7 +1836,7 @@ EOF
else else
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6 echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
echo "configure:1839: checking for .popsection assembler directive" >&5 echo "configure:1840: checking for .popsection assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1843,7 +1844,7 @@ else
.pushsection foo_section .pushsection foo_section
.popsection .popsection
EOF EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_popsection_directive=yes libc_cv_asm_popsection_directive=yes
else else
libc_cv_asm_popsection_directive=no libc_cv_asm_popsection_directive=no
@ -1863,12 +1864,12 @@ fi
if test $elf != yes; then if test $elf != yes; then
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6 echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
echo "configure:1867: checking for .init and .fini sections" >&5 echo "configure:1868: checking for .init and .fini sections" >&5
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1872 "configure" #line 1873 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
@ -1877,7 +1878,7 @@ asm (".section .init");
asm (".text"); asm (".text");
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
libc_cv_have_initfini=yes libc_cv_have_initfini=yes
else else
@ -1902,19 +1903,19 @@ if test $elf = yes; then
libc_cv_asm_underscores=no libc_cv_asm_underscores=no
else else
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
echo "configure:1906: checking for _ prefix on C symbol names" >&5 echo "configure:1907: checking for _ prefix on C symbol names" >&5
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1911 "configure" #line 1912 "configure"
#include "confdefs.h" #include "confdefs.h"
asm ("_glibc_foobar:"); asm ("_glibc_foobar:");
int main() { int main() {
glibc_foobar (); glibc_foobar ();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
libc_cv_asm_underscores=yes libc_cv_asm_underscores=yes
else else
@ -1941,7 +1942,7 @@ if test $elf = yes; then
libc_cv_asm_weakext_directive=no libc_cv_asm_weakext_directive=no
else else
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6 echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
echo "configure:1945: checking for assembler .weak directive" >&5 echo "configure:1946: checking for assembler .weak directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1964,7 +1965,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
if test $libc_cv_asm_weak_directive = no; then if test $libc_cv_asm_weak_directive = no; then
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6 echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
echo "configure:1968: checking for assembler .weakext directive" >&5 echo "configure:1969: checking for assembler .weakext directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2001,7 +2002,7 @@ EOF
fi fi
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6 echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
echo "configure:2005: checking for ld --no-whole-archive" >&5 echo "configure:2006: checking for ld --no-whole-archive" >&5
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2012,7 +2013,7 @@ __throw () {}
EOF EOF
if { ac_try='${CC-cc} $CFLAGS if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive -nostdlib -nostartfiles -Wl,--no-whole-archive
-o conftest conftest.c'; { (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then -o conftest conftest.c'; { (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_ld_no_whole_archive=yes libc_cv_ld_no_whole_archive=yes
else else
libc_cv_ld_no_whole_archive=no libc_cv_ld_no_whole_archive=no
@ -2023,7 +2024,7 @@ fi
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6 echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6 echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
echo "configure:2027: checking for gcc -fno-exceptions" >&5 echo "configure:2028: checking for gcc -fno-exceptions" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2034,7 +2035,7 @@ __throw () {}
EOF EOF
if { ac_try='${CC-cc} $CFLAGS if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions -nostdlib -nostartfiles -fno-exceptions
-o conftest conftest.c'; { (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then -o conftest conftest.c'; { (eval echo configure:2039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_no_exceptions=yes libc_cv_gcc_no_exceptions=yes
else else
libc_cv_gcc_no_exceptions=no libc_cv_gcc_no_exceptions=no
@ -2086,7 +2087,7 @@ if test "$uname" = generic; then
fi fi
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6 echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
echo "configure:2090: checking OS release for uname" >&5 echo "configure:2091: checking OS release for uname" >&5
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2108,7 +2109,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
uname_release="$libc_cv_uname_release" uname_release="$libc_cv_uname_release"
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6 echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
echo "configure:2112: checking OS version for uname" >&5 echo "configure:2113: checking OS version for uname" >&5
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2130,7 +2131,7 @@ else
fi fi
echo $ac_n "checking stdio selection""... $ac_c" 1>&6 echo $ac_n "checking stdio selection""... $ac_c" 1>&6
echo "configure:2134: checking stdio selection" >&5 echo "configure:2135: checking stdio selection" >&5
case $stdio in case $stdio in
libio) cat >> confdefs.h <<\EOF libio) cat >> confdefs.h <<\EOF
@ -2342,6 +2343,7 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g s%@build_os@%$build_os%g
s%@BUILD_CC@%$BUILD_CC%g s%@BUILD_CC@%$BUILD_CC%g
s%@cross_compiling@%$cross_compiling%g
s%@CPP@%$CPP%g s%@CPP@%$CPP%g
s%@AR@%$AR%g s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g s%@RANLIB@%$RANLIB%g

View File

@ -366,6 +366,7 @@ AC_CANONICAL_BUILD
if test $host != $build; then if test $host != $build; then
AC_CHECK_PROGS(BUILD_CC, gcc cc) AC_CHECK_PROGS(BUILD_CC, gcc cc)
fi fi
AC_SUBST(cross_compiling)
AC_PROG_CPP AC_PROG_CPP
AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(RANLIB, ranlib, :)

View File

@ -36,25 +36,12 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
$(csu-dummies)) $(csu-dummies))
install-lib = $(start-installed-name) g$(start-installed-name) \ install-lib = $(start-installed-name) g$(start-installed-name) \
$(csu-dummies) $(csu-dummies)
distribute = initfini.c gmon-start.c start.c defs.awk distribute = initfini.c gmon-start.c start.c defs.awk abi-note.S abi-tag.h
all: # Make this the default target; it will be defined in Rules. all: # Make this the default target; it will be defined in Rules.
include ../Makeconfig include ../Makeconfig
ifneq ($(elf),yes)
# When not using ELF, there is just one startfile, called crt0.o.
start-installed-name = crt0.o
else
# In the ELF universe, crt0.o is called crt1.o, and there are
# some additional bizarre files.
start-installed-name = crt1.o
have-initfini = yes
endif
ifeq ($(have-initfini),yes) ifeq ($(have-initfini),yes)
@ -75,7 +62,8 @@ $(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
$(CC) -c -fPIC -g0 -I$(..) -I$(common-objpfx) -DASSEMBLER $< -o $@ $(CC) -c -fPIC -g0 -I$(..) -I$(common-objpfx) -DASSEMBLER $< -o $@
$(objpfx)initfini.s: initfini.c $(objpfx)initfini.s: initfini.c
$(CC) -S -fPIC -finhibit-size-directive $(no-exceptions) $< -o $@ $(CC) $(CPPFLAGS) $(CFLAGS) -g0 -S -fPIC -finhibit-size-directive \
$(no-exceptions) $< -o $@
$(objpfx)crti.S: $(objpfx)initfini.s $(objpfx)crti.S: $(objpfx)initfini.s
sed -n -e '1,/@HEADER_ENDS/p' \ sed -n -e '1,/@HEADER_ENDS/p' \
@ -95,19 +83,31 @@ endif
include ../Rules include ../Rules
define link-relocatable
$(CC) -nostdlib -nostartfiles -r -o $@ $^
endef
ifndef start-installed-name-rule ifndef start-installed-name-rule
ifeq (yes,$(elf))
# We link the ELF startfile along with a SHT_NOTE section indicating
# the the kernel ABI the binaries linked with this library will require.
$(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)abi-note.o
$(link-relocatable)
else
# The startfile is installed under different names, so we just call our # The startfile is installed under different names, so we just call our
# source file `start.c' and copy to the installed name after compiling. # source file `start.c' and copy to the installed name after compiling.
$(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)$(start-installed-name): $(objpfx)start.o
-rm -f $@ rm -f $@
ln $< $@ ln $< $@
endif endif
endif
# The profiling startfile is made by linking together the normal # The profiling startfile is made by linking together the normal
# startfile with gmon-start.o, which defines a constructor function # startfile with gmon-start.o, which defines a constructor function
# to turn on profiling code at startup. # to turn on profiling code at startup.
$(objpfx)g$(start-installed-name): $(objpfx)start.o $(objpfx)gmon-start.o $(objpfx)g$(start-installed-name): $(objpfx)$(start-installed-name) \
$(CC) -nostdlib -nostartfiles -r -o $@ $^ $(objpfx)gmon-start.o
$(link-relocatable)
# These extra files are sometimes expected by system standard linking # These extra files are sometimes expected by system standard linking
# procedures, but we have nothing for them to do. So compile empty files. # procedures, but we have nothing for them to do. So compile empty files.

69
csu/abi-note.S Normal file
View File

@ -0,0 +1,69 @@
/* Special .init and .fini section support.
Copyright (C) 1997 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. */
#include <sysdep.h>
/* The basic layout of note sections is specified by the ELF format. */
#define ELF_NOTE_BEGIN(sectname, sectflags, type, name) \
.section sectname, sectflags; \
.align ALIGNARG(2); /* Notes are 4-byte aligned. */ \
.long 1f - 0f; /* 32-bit word: length of name field */ \
.long 3f - 2f; /* 32-bit word: length of desc field */ \
.long (type); /* 32-bit word: vendor-defined type field */ \
0: .asciz name; /* null-terminated string, any length: name */\
1: .align ALIGNARG(2); /* Name data padded to 4-byte alignment. */ \
2: /* Here follows the "note descriptor" data, whose format \
is not specified by ELF. The vendor name and type field \
indicate what sort of data is found here. */
#define ELF_NOTE_END \
3: .align ALIGNARG(2) /* Pad to 4-byte align the next note. */
/* The linker (GNU ld 2.8 and later) recognize an allocated section whose
name begins with `.note' and creates a PT_NOTE program header entry
pointing at it.
Such a program header is the canonical way (at least in the free OS
community) to identify the OS environment ABI that the executable was
created for. The ELF note information identifies a particular OS or
coordinated development effort within which the ELF header's e_machine
value plus (for dynamically linked programs) the PT_INTERP dynamic
linker name and DT_NEEDED shared library names fully identify the
runtime environment required by an executable.
The GNU project and cooperating development efforts (including the Linux
community) use a vendor name string of "GNU", and a note type field with
value 1 for a note descriptor that indicates ABI requirements. */
#include <abi-tag.h> /* OS-specific ABI tag value */
ELF_NOTE_BEGIN(".note.ABI-tag", "a", 1, "GNU")
.long ABI_TAG
ELF_NOTE_END

View File

@ -307,13 +307,14 @@ extern int obstack_exit_failure;
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ #define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \ _obstack_begin_1 ((h), (size), (alignment), \
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun), (arg)) (void *(*) (void *, long)) (chunkfun), \
(void (*) (void *, void *)) (freefun), (arg))
#define obstack_chunkfun(h, newchunkfun) \ #define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)(long)) (newchunkfun)) ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
#define obstack_freefun(h, newfreefun) \ #define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *)) (newfreefun)) ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
#else #else

View File

@ -149,10 +149,8 @@ functions, and thus are available if you define @code{_BSD_SOURCE} or
@comment math.h @comment math.h
@comment BSD @comment BSD
@deftypefun int isinf (double @var{x}) @deftypefun int isinf (double @var{x})
@end deftypefun @deftypefunx int isinff (float @var{x})
@deftypefun int isinff (float @var{x}) @deftypefunx int isinfl (long double @var{x})
@end deftypefun
@deftypefun int isinfl (long double @var{x})
This function returns @code{-1} if @var{x} represents negative infinity, This function returns @code{-1} if @var{x} represents negative infinity,
@code{1} if @var{x} represents positive infinity, and @code{0} otherwise. @code{1} if @var{x} represents positive infinity, and @code{0} otherwise.
@end deftypefun @end deftypefun
@ -160,10 +158,8 @@ This function returns @code{-1} if @var{x} represents negative infinity,
@comment math.h @comment math.h
@comment BSD @comment BSD
@deftypefun int isnan (double @var{x}) @deftypefun int isnan (double @var{x})
@end deftypefun @deftypefunx int isnanf (float @var{x})
@deftypefun int isnanf (float @var{x}) @deftypefunx int isnanl (long double @var{x})
@end deftypefun
@deftypefun int isnanl (long double @var{x})
This function returns a nonzero value if @var{x} is a ``not a number'' This function returns a nonzero value if @var{x} is a ``not a number''
value, and zero otherwise. (You can just as well use @code{@var{x} != value, and zero otherwise. (You can just as well use @code{@var{x} !=
@var{x}} to get the same result). @var{x}} to get the same result).
@ -172,10 +168,8 @@ value, and zero otherwise. (You can just as well use @code{@var{x} !=
@comment math.h @comment math.h
@comment BSD @comment BSD
@deftypefun int finite (double @var{x}) @deftypefun int finite (double @var{x})
@end deftypefun @deftypefunx int finitef (float @var{x})
@deftypefun int finitef (float @var{x}) @deftypefunx int finitel (long double @var{x})
@end deftypefun
@deftypefun int finitel (long double @var{x})
This function returns a nonzero value if @var{x} is finite or a ``not a This function returns a nonzero value if @var{x} is finite or a ``not a
number'' value, and zero otherwise. number'' value, and zero otherwise.
@end deftypefun @end deftypefun
@ -213,21 +207,21 @@ which returns a value of type @code{int}. The possible values are:
@vtable @code @vtable @code
@item FP_NAN @item FP_NAN
The floating-point number @var{x} is ``Not a Number'' (@pxref{Not a Number}) The floating-point number @var{x} is ``Not a Number'' (@pxref{Not a Number})
@item FP_INFINITE @item FP_INFINITE
The value of @var{x} is either plus or minus infinity (@pxref{Infinity}) The value of @var{x} is either plus or minus infinity (@pxref{Infinity})
@item FP_ZERO @item FP_ZERO
The value of @var{x} is zero. In floating-point formats like @w{IEEE The value of @var{x} is zero. In floating-point formats like @w{IEEE
754} where the zero value can be signed this value is also returned if 754} where the zero value can be signed this value is also returned if
@var{x} is minus zero. @var{x} is minus zero.
@item FP_SUBNORMAL @item FP_SUBNORMAL
Some floating-point formats (such as @w{IEEE 754}) allow floating-point Some floating-point formats (such as @w{IEEE 754}) allow floating-point
numbers to be represented in a denormalized format. This happens if the numbers to be represented in a denormalized format. This happens if the
absolute value of the number is too small to be represented in the absolute value of the number is too small to be represented in the
normal format. @code{FP_SUBNORMAL} is returned for such values of @var{x}. normal format. @code{FP_SUBNORMAL} is returned for such values of @var{x}.
@item FP_NORMAL @item FP_NORMAL
This value is returned for all other cases which means the number is a This value is returned for all other cases which means the number is a
plain floating-point number without special meaning. plain floating-point number without special meaning.
@end vtable @end vtable
This macro is useful if more than property of a number must be This macro is useful if more than property of a number must be
@ -319,20 +313,16 @@ functions.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun double creal (complex double @var{z}) @deftypefun double creal (complex double @var{z})
@end deftypefun @deftypefunx float crealf (complex float @var{z})
@deftypefun float crealf (complex float @var{z}) @deftypefunx {long double} creall (complex long double @var{z})
@end deftypefun
@deftypefun {long double} creall (complex long double @var{z})
These functions return the real part of the complex number @var{z}. These functions return the real part of the complex number @var{z}.
@end deftypefun @end deftypefun
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun double cimag (complex double @var{z}) @deftypefun double cimag (complex double @var{z})
@end deftypefun @deftypefunx float cimagf (complex float @var{z})
@deftypefun float cimagf (complex float @var{z}) @deftypefunx {long double} cimagl (complex long double @var{z})
@end deftypefun
@deftypefun {long double} cimagl (complex long double @var{z})
These functions return the imaginary part of the complex number @var{z}. These functions return the imaginary part of the complex number @var{z}.
@end deftypefun @end deftypefun
@ -343,10 +333,8 @@ for the real part but the complex part is negated.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} conj (complex double @var{z}) @deftypefun {complex double} conj (complex double @var{z})
@end deftypefun @deftypefunx {complex float} conjf (complex float @var{z})
@deftypefun {complex float} conjf (complex float @var{z}) @deftypefunx {complex long double} conjl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} conjl (complex long double @var{z})
These functions return the conjugate complex value of the complex number These functions return the conjugate complex value of the complex number
@var{z}. @var{z}.
@end deftypefun @end deftypefun
@ -354,10 +342,8 @@ These functions return the conjugate complex value of the complex number
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun double carg (complex double @var{z}) @deftypefun double carg (complex double @var{z})
@end deftypefun @deftypefunx float cargf (complex float @var{z})
@deftypefun float cargf (complex float @var{z}) @deftypefunx {long double} cargl (complex long double @var{z})
@end deftypefun
@deftypefun {long double} cargl (complex long double @var{z})
These functions return argument of the complex number @var{z}. These functions return argument of the complex number @var{z}.
Mathematically, the argument is the phase angle of @var{z} with a branch Mathematically, the argument is the phase angle of @var{z} with a branch
@ -367,10 +353,8 @@ cut along the negative real axis.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} cproj (complex double @var{z}) @deftypefun {complex double} cproj (complex double @var{z})
@end deftypefun @deftypefunx {complex float} cprojf (complex float @var{z})
@deftypefun {complex float} cprojf (complex float @var{z}) @deftypefunx {complex long double} cprojl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} cprojl (complex long double @var{z})
Return the projection of the complex value @var{z} on the Riemann Return the projection of the complex value @var{z} on the Riemann
sphere. Values with a infinite complex part (even if the real part sphere. Values with a infinite complex part (even if the real part
is NaN) are projected to positive infinte on the real axis. If the real part is infinite, the result is equivalent to is NaN) are projected to positive infinte on the real axis. If the real part is infinite, the result is equivalent to
@ -418,10 +402,8 @@ are of type @code{long int} rather than @code{int}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double fabs (double @var{number}) @deftypefun double fabs (double @var{number})
@end deftypefun @deftypefunx float fabsf (float @var{number})
@deftypefun float fabsf (float @var{number}) @deftypefunx {long double} fabsl (long double @var{number})
@end deftypefun
@deftypefun {long double} fabsl (long double @var{number})
This function returns the absolute value of the floating-point number This function returns the absolute value of the floating-point number
@var{number}. @var{number}.
@end deftypefun @end deftypefun
@ -429,10 +411,8 @@ This function returns the absolute value of the floating-point number
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun double cabs (complex double @var{z}) @deftypefun double cabs (complex double @var{z})
@end deftypefun @deftypefunx float cabsf (complex float @var{z})
@deftypefun float cabsf (complex float @var{z}) @deftypefunx {long double} cabsl (complex long double @var{z})
@end deftypefun
@deftypefun {long double} cabsl (complex long double @var{z})
These functions return the absolute value of the complex number @var{z}. These functions return the absolute value of the complex number @var{z}.
The compiler must support complex numbers to use these functions. (See The compiler must support complex numbers to use these functions. (See
also the function @code{hypot} in @ref{Exponents and Logarithms}.) The also the function @code{hypot} in @ref{Exponents and Logarithms}.) The
@ -461,10 +441,8 @@ All these functions are declared in @file{math.h}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double frexp (double @var{value}, int *@var{exponent}) @deftypefun double frexp (double @var{value}, int *@var{exponent})
@end deftypefun @deftypefunx float frexpf (float @var{value}, int *@var{exponent})
@deftypefun float frexpf (float @var{value}, int *@var{exponent}) @deftypefunx {long double} frexpl (long double @var{value}, int *@var{exponent})
@end deftypefun
@deftypefun {long double} frexpl (long double @var{value}, int *@var{exponent})
These functions are used to split the number @var{value} These functions are used to split the number @var{value}
into a normalized fraction and an exponent. into a normalized fraction and an exponent.
@ -484,10 +462,8 @@ zero is stored in @code{*@var{exponent}}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double ldexp (double @var{value}, int @var{exponent}) @deftypefun double ldexp (double @var{value}, int @var{exponent})
@end deftypefun @deftypefunx float ldexpf (float @var{value}, int @var{exponent})
@deftypefun float ldexpf (float @var{value}, int @var{exponent}) @deftypefunx {long double} ldexpl (long double @var{value}, int @var{exponent})
@end deftypefun
@deftypefun {long double} ldexpl (long double @var{value}, int @var{exponent})
These functions return the result of multiplying the floating-point These functions return the result of multiplying the floating-point
number @var{value} by 2 raised to the power @var{exponent}. (It can number @var{value} by 2 raised to the power @var{exponent}. (It can
be used to reassemble floating-point numbers that were taken apart be used to reassemble floating-point numbers that were taken apart
@ -502,20 +478,16 @@ equivalent to those of @code{ldexp} and @code{frexp}:
@comment math.h @comment math.h
@comment BSD @comment BSD
@deftypefun double scalb (double @var{value}, int @var{exponent}) @deftypefun double scalb (double @var{value}, int @var{exponent})
@end deftypefun @deftypefunx float scalbf (float @var{value}, int @var{exponent})
@deftypefun float scalbf (float @var{value}, int @var{exponent}) @deftypefunx {long double} scalbl (long double @var{value}, int @var{exponent})
@end deftypefun
@deftypefun {long double} scalbl (long double @var{value}, int @var{exponent})
The @code{scalb} function is the BSD name for @code{ldexp}. The @code{scalb} function is the BSD name for @code{ldexp}.
@end deftypefun @end deftypefun
@comment math.h @comment math.h
@comment BSD @comment BSD
@deftypefun double logb (double @var{x}) @deftypefun double logb (double @var{x})
@end deftypefun @deftypefunx float logbf (float @var{x})
@deftypefun float logbf (float @var{x}) @deftypefunx {long double} logbl (long double @var{x})
@end deftypefun
@deftypefun {long double} logbl (long double @var{x})
These BSD functions return the integer part of the base-2 logarithm of These BSD functions return the integer part of the base-2 logarithm of
@var{x}, an integer value represented in type @code{double}. This is @var{x}, an integer value represented in type @code{double}. This is
the highest integer power of @code{2} contained in @var{x}. The sign of the highest integer power of @code{2} contained in @var{x}. The sign of
@ -536,10 +508,8 @@ The value returned by @code{logb} is one less than the value that
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double copysign (double @var{value}, double @var{sign}) @deftypefun double copysign (double @var{value}, double @var{sign})
@end deftypefun @deftypefunx float copysignf (float @var{value}, float @var{sign})
@deftypefun float copysignf (float @var{value}, float @var{sign}) @deftypefunx {long double} copysignl (long double @var{value}, long double @var{sign})
@end deftypefun
@deftypefun {long double} copysignl (long double @var{value}, long double @var{sign})
These functions return a value whose absolute value is the These functions return a value whose absolute value is the
same as that of @var{value}, and whose sign matches that of @var{sign}. same as that of @var{value}, and whose sign matches that of @var{sign}.
This function appears in BSD and was standardized in @w{ISO C 9X}. This function appears in BSD and was standardized in @w{ISO C 9X}.
@ -580,10 +550,8 @@ result as a @code{double} instead to get around this problem.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double ceil (double @var{x}) @deftypefun double ceil (double @var{x})
@end deftypefun @deftypefunx float ceilf (float @var{x})
@deftypefun float ceilf (float @var{x}) @deftypefunx {long double} ceill (long double @var{x})
@end deftypefun
@deftypefun {long double} ceill (long double @var{x})
These functions round @var{x} upwards to the nearest integer, These functions round @var{x} upwards to the nearest integer,
returning that value as a @code{double}. Thus, @code{ceil (1.5)} returning that value as a @code{double}. Thus, @code{ceil (1.5)}
is @code{2.0}. is @code{2.0}.
@ -592,10 +560,8 @@ is @code{2.0}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double floor (double @var{x}) @deftypefun double floor (double @var{x})
@end deftypefun @deftypefunx float floorf (float @var{x})
@deftypefun float floorf (float @var{x}) @deftypefunx {long double} floorl (long double @var{x})
@end deftypefun
@deftypefun {long double} floorl (long double @var{x})
These functions round @var{x} downwards to the nearest These functions round @var{x} downwards to the nearest
integer, returning that value as a @code{double}. Thus, @code{floor integer, returning that value as a @code{double}. Thus, @code{floor
(1.5)} is @code{1.0} and @code{floor (-1.5)} is @code{-2.0}. (1.5)} is @code{1.0} and @code{floor (-1.5)} is @code{-2.0}.
@ -604,10 +570,8 @@ integer, returning that value as a @code{double}. Thus, @code{floor
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double rint (double @var{x}) @deftypefun double rint (double @var{x})
@end deftypefun @deftypefunx float rintf (float @var{x})
@deftypefun float rintf (float @var{x}) @deftypefunx {long double} rintl (long double @var{x})
@end deftypefun
@deftypefun {long double} rintl (long double @var{x})
These functions round @var{x} to an integer value according to the These functions round @var{x} to an integer value according to the
current rounding mode. @xref{Floating Point Parameters}, for current rounding mode. @xref{Floating Point Parameters}, for
information about the various rounding modes. The default information about the various rounding modes. The default
@ -619,10 +583,8 @@ you explicit select another.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double nearbyint (double @var{x}) @deftypefun double nearbyint (double @var{x})
@end deftypefun @deftypefunx float nearbyintf (float @var{x})
@deftypefun float nearbyintf (float @var{x}) @deftypefunx {long double} nearbyintl (long double @var{x})
@end deftypefun
@deftypefun {long double} nearbyintl (long double @var{x})
These functions return the same value as the @code{rint} functions but These functions return the same value as the @code{rint} functions but
even some rounding actually takes place @code{nearbyint} does @emph{not} even some rounding actually takes place @code{nearbyint} does @emph{not}
raise the inexact exception. raise the inexact exception.
@ -631,10 +593,8 @@ raise the inexact exception.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double modf (double @var{value}, double *@var{integer-part}) @deftypefun double modf (double @var{value}, double *@var{integer-part})
@end deftypefun @deftypefunx float modff (flaot @var{value}, float *@var{integer-part})
@deftypefun float modff (flaot @var{value}, float *@var{integer-part}) @deftypefunx {long double} modfl (long double @var{value}, long double *@var{integer-part})
@end deftypefun
@deftypefun {long double} modfl (long double @var{value}, long double *@var{integer-part})
These functions break the argument @var{value} into an integer part and a These functions break the argument @var{value} into an integer part and a
fractional part (between @code{-1} and @code{1}, exclusive). Their sum fractional part (between @code{-1} and @code{1}, exclusive). Their sum
equals @var{value}. Each of the parts has the same sign as @var{value}, equals @var{value}. Each of the parts has the same sign as @var{value},
@ -648,10 +608,8 @@ returns @code{0.5} and stores @code{2.0} into @code{intpart}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double fmod (double @var{numerator}, double @var{denominator}) @deftypefun double fmod (double @var{numerator}, double @var{denominator})
@end deftypefun @deftypefunx float fmodf (float @var{numerator}, float @var{denominator})
@deftypefun float fmodf (float @var{numerator}, float @var{denominator}) @deftypefunx {long double} fmodl (long double @var{numerator}, long double @var{denominator})
@end deftypefun
@deftypefun {long double} fmodl (long double @var{numerator}, long double @var{denominator})
These functions compute the remainder from the division of These functions compute the remainder from the division of
@var{numerator} by @var{denominator}. Specifically, the return value is @var{numerator} by @var{denominator}. Specifically, the return value is
@code{@var{numerator} - @w{@var{n} * @var{denominator}}}, where @var{n} @code{@var{numerator} - @w{@var{n} * @var{denominator}}}, where @var{n}
@ -669,10 +627,8 @@ If @var{denominator} is zero, @code{fmod} fails and sets @code{errno} to
@comment math.h @comment math.h
@comment BSD @comment BSD
@deftypefun double drem (double @var{numerator}, double @var{denominator}) @deftypefun double drem (double @var{numerator}, double @var{denominator})
@end deftypefun @deftypefunx float dremf (float @var{numerator}, float @var{denominator})
@deftypefun float dremf (float @var{numerator}, float @var{denominator}) @deftypefunx {long double} dreml (long double @var{numerator}, long double @var{denominator})
@end deftypefun
@deftypefun {long double} dreml (long double @var{numerator}, long double @var{denominator})
These functions are like @code{fmod} etc except that it rounds the These functions are like @code{fmod} etc except that it rounds the
internal quotient @var{n} to the nearest integer instead of towards zero internal quotient @var{n} to the nearest integer instead of towards zero
to an integer. For example, @code{drem (6.5, 2.3)} returns @code{-0.4}, to an integer. For example, @code{drem (6.5, 2.3)} returns @code{-0.4},

View File

@ -3,12 +3,15 @@
@setfilename libc.info @setfilename libc.info
@settitle The GNU C Library @settitle The GNU C Library
@setchapternewpage odd @setchapternewpage odd
@comment %**end of header (This is for running Texinfo on a region.)
@c This tells texinfo.tex to use the real section titles in xrefs in @c This tells texinfo.tex to use the real section titles in xrefs in
@c place of the node name, when no section title is explicitly given. @c place of the node name, when no section title is explicitly given.
@set xref-automatic-section-title @set xref-automatic-section-title
@smallbook @c @smallbook
@iftex
@afourpaper
@end iftex
@comment %**end of header (This is for running Texinfo on a region.)
@c sold 0.06/1.09, print run out 21may96 @c sold 0.06/1.09, print run out 21may96
@set EDITION 0.07 DRAFT @set EDITION 0.07 DRAFT

View File

@ -146,10 +146,8 @@ You can also compute the value of pi with the expression @code{acos
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double sin (double @var{x}) @deftypefun double sin (double @var{x})
@end deftypefun @deftypefunx float sinf (float @var{x})
@deftypefun float sinf (float @var{x}) @deftypefunx {long double} sinl (long double @var{x})
@end deftypefun
@deftypefun {long double} sinl (long double @var{x})
These functions return the sine of @var{x}, where @var{x} is given in These functions return the sine of @var{x}, where @var{x} is given in
radians. The return value is in the range @code{-1} to @code{1}. radians. The return value is in the range @code{-1} to @code{1}.
@end deftypefun @end deftypefun
@ -157,10 +155,8 @@ radians. The return value is in the range @code{-1} to @code{1}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double cos (double @var{x}) @deftypefun double cos (double @var{x})
@end deftypefun @deftypefunx float cosf (float @var{x})
@deftypefun float cosf (float @var{x}) @deftypefunx {long double} cosl (long double @var{x})
@end deftypefun
@deftypefun {long double} cosl (long double @var{x})
These functions return the cosine of @var{x}, where @var{x} is given in These functions return the cosine of @var{x}, where @var{x} is given in
radians. The return value is in the range @code{-1} to @code{1}. radians. The return value is in the range @code{-1} to @code{1}.
@end deftypefun @end deftypefun
@ -168,10 +164,8 @@ radians. The return value is in the range @code{-1} to @code{1}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double tan (double @var{x}) @deftypefun double tan (double @var{x})
@end deftypefun @deftypefunx float tanf (float @var{x})
@deftypefun float tanf (float @var{x}) @deftypefunx {long double} tanl (long double @var{x})
@end deftypefun
@deftypefun {long double} tanl (long double @var{x})
These functions return the tangent of @var{x}, where @var{x} is given in These functions return the tangent of @var{x}, where @var{x} is given in
radians. radians.
@ -189,16 +183,14 @@ either positive or negative @code{HUGE_VAL}.
In many applications where @code{sin} and @code{cos} are used, the value In many applications where @code{sin} and @code{cos} are used, the value
for the same argument of both of these functions is used at the same for the same argument of both of these functions is used at the same
time. Since the algorithm to compute these values is very similar for time. Since the algorithm to compute these values is very similar for
both functions there is an additional function with computes both values both functions there is an additional function which computes both values
at the same time. at the same time.
@comment math.h @comment math.h
@comment GNU @comment GNU
@deftypefun void sincos (double @var{x}, double *@var{sinx}, double *@var{cosx}) @deftypefun void sincos (double @var{x}, double *@var{sinx}, double *@var{cosx})
@end deftypefun @deftypefunx void sincosf (float @var{x}, float *@var{sinx}, float *@var{cosx})
@deftypefun void sincosf (float @var{x}, float *@var{sinx}, float *@var{cosx}) @deftypefunx void sincosl (long double @var{x}, long double *@var{sinx}, long double *@var{cosx})
@end deftypefun
@deftypefun void sincosl (long double @var{x}, long double *@var{sinx}, long double *@var{cosx})
These functions return the sine of @var{x} in @code{*@var{sinx}} and the These functions return the sine of @var{x} in @code{*@var{sinx}} and the
cosine of @var{x} in @code{*@var{cos}}, where @var{x} is given in cosine of @var{x} in @code{*@var{cos}}, where @var{x} is given in
radians. Both values, @code{*@var{sinx}} and @code{*@var{cosx}}, are in radians. Both values, @code{*@var{sinx}} and @code{*@var{cosx}}, are in
@ -207,53 +199,62 @@ the range of @code{-1} to @code{1}.
@cindex complex trigonometric functions @cindex complex trigonometric functions
The trigonometric functions are in mathematics not only on real numbers. The trigonometric functions are in mathematics not only defined on real
They can be extended to complex numbers and the @w{ISO C 9X} standard numbers. They can be extended to complex numbers and the @w{ISO C 9X}
introduces these variants in the standard math library. standard introduces these variants in the standard math library.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} csin (complex double @var{z}) @deftypefun {complex double} csin (complex double @var{z})
@end deftypefun @deftypefunx {complex float} csinf (complex float @var{z})
@deftypefun {complex float} csinf (complex float @var{z}) @deftypefunx {complex long double} csinl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} csinl (complex long double @var{z})
These functions return the complex sine of the complex value in @var{z}. These functions return the complex sine of the complex value in @var{z}.
The mathematical definition of the complex sine is The mathematical definition of the complex sine is
@smallexample @ifinfo
sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i)) @math{sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i))}.
@end smallexample @end ifinfo
@iftex
@tex
$$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$
@end tex
@end iftex
@end deftypefun @end deftypefun
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} ccos (complex double @var{z}) @deftypefun {complex double} ccos (complex double @var{z})
@end deftypefun @deftypefunx {complex float} ccosf (complex float @var{z})
@deftypefun {complex float} ccosf (complex float @var{z}) @deftypefunx {complex long double} ccosl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} ccosl (complex long double @var{z})
These functions return the complex cosine of the complex value in @var{z}. These functions return the complex cosine of the complex value in @var{z}.
The mathematical definition of the complex cosine is The mathematical definition of the complex cosine is
@smallexample @ifinfo
cos (z) = 1/2 * (exp (z*i) + exp (-z*i)) @math{cos (z) = 1/2 * (exp (z*i) + exp (-z*i))}
@end smallexample @end ifinfo
@iftex
@tex
$$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$
@end tex
@end iftex
@end deftypefun @end deftypefun
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} ctan (complex double @var{z}) @deftypefun {complex double} ctan (complex double @var{z})
@end deftypefun @deftypefunx {complex float} ctanf (complex float @var{z})
@deftypefun {complex float} ctanf (complex float @var{z}) @deftypefunx {complex long double} ctanl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} ctanl (complex long double @var{z})
These functions return the complex tangent of the complex value in @var{z}. These functions return the complex tangent of the complex value in @var{z}.
The mathematical definition of the complex tangent is The mathematical definition of the complex tangent is
@smallexample @ifinfo
tan (z) = 1/i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i)) @math{tan (z) = 1/i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i))}
@end smallexample @end ifinfo
@iftex
@tex
$$\tan(z) = {1\over i} {e^{zi} - e^{-zi}\over e^{zi} + e^{-zi}}$$
@end tex
@end iftex
@end deftypefun @end deftypefun
@ -268,10 +269,8 @@ respectively.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double asin (double @var{x}) @deftypefun double asin (double @var{x})
@end deftypefun @deftypefunx float asinf (float @var{x})
@deftypefun float asinf (float @var{x}) @deftypefunx {long double} asinl (long double @var{x})
@end deftypefun
@deftypefun {long double} asinl (long double @var{x})
These functions compute the arc sine of @var{x}---that is, the value whose These functions compute the arc sine of @var{x}---that is, the value whose
sine is @var{x}. The value is in units of radians. Mathematically, sine is @var{x}. The value is in units of radians. Mathematically,
there are infinitely many such values; the one actually returned is the there are infinitely many such values; the one actually returned is the
@ -285,10 +284,8 @@ over the domain @code{-1} to @code{1}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double acos (double @var{x}) @deftypefun double acos (double @var{x})
@end deftypefun @deftypefunx float acosf (float @var{x})
@deftypefun float acosf (float @var{x}) @deftypefunx {long double} acosl (long double @var{x})
@end deftypefun
@deftypefun {long double} acosl (long double @var{x})
These functions compute the arc cosine of @var{x}---that is, the value These functions compute the arc cosine of @var{x}---that is, the value
whose cosine is @var{x}. The value is in units of radians. whose cosine is @var{x}. The value is in units of radians.
Mathematically, there are infinitely many such values; the one actually Mathematically, there are infinitely many such values; the one actually
@ -303,10 +300,8 @@ over the domain @code{-1} to @code{1}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double atan (double @var{x}) @deftypefun double atan (double @var{x})
@end deftypefun @deftypefunx float atanf (float @var{x})
@deftypefun float atanf (float @var{x}) @deftypefunx {long double} atanl (long double @var{x})
@end deftypefun
@deftypefun {long double} atanl (long double @var{x})
These functions compute the arc tangent of @var{x}---that is, the value These functions compute the arc tangent of @var{x}---that is, the value
whose tangent is @var{x}. The value is in units of radians. whose tangent is @var{x}. The value is in units of radians.
Mathematically, there are infinitely many such values; the one actually Mathematically, there are infinitely many such values; the one actually
@ -317,10 +312,8 @@ returned is the one between @code{-pi/2} and @code{pi/2}
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double atan2 (double @var{y}, double @var{x}) @deftypefun double atan2 (double @var{y}, double @var{x})
@end deftypefun @deftypefunx float atan2f (float @var{y}, float @var{x})
@deftypefun float atan2f (float @var{y}, float @var{x}) @deftypefunx {long double} atan2l (long double @var{y}, long double @var{x})
@end deftypefun
@deftypefun {long double} atan2l (long double @var{y}, long double @var{x})
This is the two argument arc tangent function. It is similar to computing This is the two argument arc tangent function. It is similar to computing
the arc tangent of @var{y}/@var{x}, except that the signs of both arguments the arc tangent of @var{y}/@var{x}, except that the signs of both arguments
are used to determine the quadrant of the result, and @var{x} is are used to determine the quadrant of the result, and @var{x} is
@ -347,10 +340,8 @@ which are usable with complex numbers.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} casin (complex double @var{z}) @deftypefun {complex double} casin (complex double @var{z})
@end deftypefun @deftypefunx {complex float} casinf (complex float @var{z})
@deftypefun {complex float} casinf (complex float @var{z}) @deftypefunx {complex long double} casinl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} casinl (complex long double @var{z})
These functions compute the complex arc sine of @var{z}---that is, the These functions compute the complex arc sine of @var{z}---that is, the
value whose sine is @var{z}. The value is in units of radians. value whose sine is @var{z}. The value is in units of radians.
@ -361,10 +352,8 @@ limitation on the argument @var{z}.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} cacos (complex double @var{z}) @deftypefun {complex double} cacos (complex double @var{z})
@end deftypefun @deftypefunx {complex float} cacosf (complex float @var{z})
@deftypefun {complex float} cacosf (complex float @var{z}) @deftypefunx {complex long double} cacosl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} cacosl (complex long double @var{z})
These functions compute the complex arc cosine of @var{z}---that is, the These functions compute the complex arc cosine of @var{z}---that is, the
value whose cosine is @var{z}. The value is in units of radians. value whose cosine is @var{z}. The value is in units of radians.
@ -376,10 +365,8 @@ limitation on the argument @var{z}.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} catan (complex double @var{z}) @deftypefun {complex double} catan (complex double @var{z})
@end deftypefun @deftypefunx {complex float} catanf (complex float @var{z})
@deftypefun {complex float} catanf (complex float @var{z}) @deftypefunx {complex long double} catanl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} catanl (complex long double @var{z})
These functions compute the complex arc tangent of @var{z}---that is, These functions compute the complex arc tangent of @var{z}---that is,
the value whose tangent is @var{z}. The value is in units of radians. the value whose tangent is @var{z}. The value is in units of radians.
@end deftypefun @end deftypefun
@ -394,10 +381,8 @@ the value whose tangent is @var{z}. The value is in units of radians.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double exp (double @var{x}) @deftypefun double exp (double @var{x})
@end deftypefun @deftypefunx float expf (float @var{x})
@deftypefun float expf (float @var{x}) @deftypefunx {long double} expl (long double @var{x})
@end deftypefun
@deftypefun {long double} expl (long double @var{x})
These functions return the value of @code{e} (the base of natural These functions return the value of @code{e} (the base of natural
logarithms) raised to power @var{x}. logarithms) raised to power @var{x}.
@ -408,10 +393,8 @@ magnitude of the result is too large to be representable.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double exp10 (double @var{x}) @deftypefun double exp10 (double @var{x})
@end deftypefun @deftypefunx float exp10f (float @var{x})
@deftypefun float exp10f (float @var{x}) @deftypefunx {long double} exp10l (long double @var{x})
@end deftypefun
@deftypefun {long double} exp10l (long double @var{x})
These functions return the value of @code{10} raised to the power @var{x}. These functions return the value of @code{10} raised to the power @var{x}.
Mathematically, @code{exp10 (x)} is the same as @code{exp (x * log (10))}. Mathematically, @code{exp10 (x)} is the same as @code{exp (x * log (10))}.
@ -422,10 +405,8 @@ magnitude of the result is too large to be representable.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double exp2 (double @var{x}) @deftypefun double exp2 (double @var{x})
@end deftypefun @deftypefunx float exp2f (float @var{x})
@deftypefun float exp2f (float @var{x}) @deftypefunx {long double} exp2l (long double @var{x})
@end deftypefun
@deftypefun {long double} exp2l (long double @var{x})
These functions return the value of @code{2} raised to the power @var{x}. These functions return the value of @code{2} raised to the power @var{x}.
Mathematically, @code{exp2 (x)} is the same as @code{exp (x * log (2))}. Mathematically, @code{exp2 (x)} is the same as @code{exp (x * log (2))}.
@ -437,10 +418,8 @@ magnitude of the result is too large to be representable.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double log (double @var{x}) @deftypefun double log (double @var{x})
@end deftypefun @deftypefunx float logf (floatdouble @var{x})
@deftypefun float logf (floatdouble @var{x}) @deftypefunx {long double} logl (long double @var{x})
@end deftypefun
@deftypefun {long double} logl (long double @var{x})
These functions return the natural logarithm of @var{x}. @code{exp (log These functions return the natural logarithm of @var{x}. @code{exp (log
(@var{x}))} equals @var{x}, exactly in mathematics and approximately in (@var{x}))} equals @var{x}, exactly in mathematics and approximately in
C. C.
@ -460,10 +439,8 @@ The argument is zero. The log of zero is not defined.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double log10 (double @var{x}) @deftypefun double log10 (double @var{x})
@end deftypefun @deftypefunx float log10f (float @var{x})
@deftypefun float log10f (float @var{x}) @deftypefunx {long double} log10l (long double @var{x})
@end deftypefun
@deftypefun {long double} log10l (long double @var{x})
These functions return the base-10 logarithm of @var{x}. Except for the These functions return the base-10 logarithm of @var{x}. Except for the
different base, it is similar to the @code{log} function. In fact, different base, it is similar to the @code{log} function. In fact,
@code{log10 (@var{x})} equals @code{log (@var{x}) / log (10)}. @code{log10 (@var{x})} equals @code{log (@var{x}) / log (10)}.
@ -472,10 +449,8 @@ different base, it is similar to the @code{log} function. In fact,
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double log2 (double @var{x}) @deftypefun double log2 (double @var{x})
@end deftypefun @deftypefunx float log2f (float @var{x})
@deftypefun float log2f (float @var{x}) @deftypefunx {long double} log2l (long double @var{x})
@end deftypefun
@deftypefun {long double} log2l (long double @var{x})
These functions return the base-2 logarithm of @var{x}. Except for the These functions return the base-2 logarithm of @var{x}. Except for the
different base, it is similar to the @code{log} function. In fact, different base, it is similar to the @code{log} function. In fact,
@code{log2 (@var{x})} equals @code{log (@var{x}) / log (2)}. @code{log2 (@var{x})} equals @code{log (@var{x}) / log (2)}.
@ -484,10 +459,8 @@ different base, it is similar to the @code{log} function. In fact,
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double pow (double @var{base}, double @var{power}) @deftypefun double pow (double @var{base}, double @var{power})
@end deftypefun @deftypefunx float powf (float @var{base}, float @var{power})
@deftypefun float powf (float @var{base}, float @var{power}) @deftypefunx {long double} powl (long double @var{base}, long double @var{power})
@end deftypefun
@deftypefun {long double} powl (long double @var{base}, long double @var{power})
These are general exponentiation functions, returning @var{base} raised These are general exponentiation functions, returning @var{base} raised
to @var{power}. to @var{power}.
@ -508,10 +481,8 @@ An underflow or overflow condition was detected in the result.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double sqrt (double @var{x}) @deftypefun double sqrt (double @var{x})
@end deftypefun @deftypefunx float sqrtf (float @var{x})
@deftypefun float sqrtf (float @var{x}) @deftypefunx {long double} sqrtl (long double @var{x})
@end deftypefun
@deftypefun {long double} sqrtl (long double @var{x})
These functions return the nonnegative square root of @var{x}. These functions return the nonnegative square root of @var{x}.
The @code{sqrt} function fails, and sets @code{errno} to @code{EDOM}, if The @code{sqrt} function fails, and sets @code{errno} to @code{EDOM}, if
@ -524,10 +495,8 @@ number.
@comment math.h @comment math.h
@comment BSD @comment BSD
@deftypefun double cbrt (double @var{x}) @deftypefun double cbrt (double @var{x})
@end deftypefun @deftypefunx float cbrtf (float @var{x})
@deftypefun float cbrtf (float @var{x}) @deftypefunx {long double} cbrtl (long double @var{x})
@end deftypefun
@deftypefun {long double} cbrtl (long double @var{x})
These functions return the cube root of @var{x}. They cannot These functions return the cube root of @var{x}. They cannot
fail; every representable real value has a representable real cube root. fail; every representable real value has a representable real cube root.
@end deftypefun @end deftypefun
@ -535,10 +504,8 @@ fail; every representable real value has a representable real cube root.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double hypot (double @var{x}, double @var{y}) @deftypefun double hypot (double @var{x}, double @var{y})
@end deftypefun @deftypefunx float hypotf (float @var{x}, float @var{y})
@deftypefun float hypotf (float @var{x}, float @var{y}) @deftypefunx {long double} hypotl (long double @var{x}, long double @var{y})
@end deftypefun
@deftypefun {long double} hypotl (long double @var{x}, long double @var{y})
These functions return @code{sqrt (@var{x}*@var{x} + These functions return @code{sqrt (@var{x}*@var{x} +
@var{y}*@var{y})}. (This is the length of the hypotenuse of a right @var{y}*@var{y})}. (This is the length of the hypotenuse of a right
triangle with sides of length @var{x} and @var{y}, or the distance triangle with sides of length @var{x} and @var{y}, or the distance
@ -550,10 +517,8 @@ much smaller. See also the function @code{cabs} in @ref{Absolute Value}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double expm1 (double @var{x}) @deftypefun double expm1 (double @var{x})
@end deftypefun @deftypefunx float expm1f (float @var{x})
@deftypefun float expm1f (float @var{x}) @deftypefunx {long double} expm1l (long double @var{x})
@end deftypefun
@deftypefun {long double} expm1l (long double @var{x})
These functions return a value equivalent to @code{exp (@var{x}) - 1}. These functions return a value equivalent to @code{exp (@var{x}) - 1}.
It is computed in a way that is accurate even if the value of @var{x} is It is computed in a way that is accurate even if the value of @var{x} is
near zero---a case where @code{exp (@var{x}) - 1} would be inaccurate due near zero---a case where @code{exp (@var{x}) - 1} would be inaccurate due
@ -563,10 +528,8 @@ to subtraction of two numbers that are nearly equal.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double log1p (double @var{x}) @deftypefun double log1p (double @var{x})
@end deftypefun @deftypefunx float log1pf (float @var{x})
@deftypefun float log1pf (float @var{x}) @deftypefunx {long double} log1pl (long double @var{x})
@end deftypefun
@deftypefun {long double} log1pl (long double @var{x})
This function returns a value equivalent to @w{@code{log (1 + @var{x})}}. This function returns a value equivalent to @w{@code{log (1 + @var{x})}}.
It is computed in a way that is accurate even if the value of @var{x} is It is computed in a way that is accurate even if the value of @var{x} is
near zero. near zero.
@ -584,45 +547,51 @@ definition.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} cexp (complex double @var{z}) @deftypefun {complex double} cexp (complex double @var{z})
@end deftypefun @deftypefunx {complex float} cexpf (complex float @var{z})
@deftypefun {complex float} cexpf (complex float @var{z}) @deftypefunx {complex long double} cexpl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} cexpl (complex long double @var{z})
These functions return the value of @code{e} (the base of natural These functions return the value of @code{e} (the base of natural
logarithms) raised to power of the complex value @var{z}. logarithms) raised to power of the complex value @var{z}.
@noindent
Mathematically this corresponds to the value Mathematically this corresponds to the value
@smallexample @ifinfo
exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z))) @math{exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z)))}
@end smallexample @end ifinfo
@iftex
@tex
$$\exp(z) = e^z = e^{{\rm Re} z} (\cos ({\rm Im} z) + i \sin ({\rm Im} z))$$
@end tex
@end iftex
@end deftypefun @end deftypefun
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} clog (complex double @var{z}) @deftypefun {complex double} clog (complex double @var{z})
@end deftypefun @deftypefunx {complex float} clogf (complex float @var{z})
@deftypefun {complex float} clogf (complex float @var{z}) @deftypefunx {complex long double} clogl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} clogl (complex long double @var{z})
These functions return the natural logarithm of the complex value These functions return the natural logarithm of the complex value
@var{z}. Unlike the real value version @code{log} and its variants, @var{z}. Unlike the real value version @code{log} and its variants,
@code{clog} has no limit for the range of its argument @var{z}. @code{clog} has no limit for the range of its argument @var{z}.
@noindent
Mathematically this corresponds to the value Mathematically this corresponds to the value
@smallexample @ifinfo
log (z) = log (cabs (z)) + I * carg (z) @math{log (z) = log (cabs (z)) + I * carg (z)}
@end smallexample @end ifinfo
@iftex
@tex
$$\log(z) = \log(|z|) + i \arg(z)$$
@end tex
@end iftex
@end deftypefun @end deftypefun
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} csqrt (complex double @var{z}) @deftypefun {complex double} csqrt (complex double @var{z})
@end deftypefun @deftypefunx {complex float} csqrtf (complex float @var{z})
@deftypefun {complex float} csqrtf (complex float @var{z}) @deftypefunx {complex long double} csqrtl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} csqrtl (complex long double @var{z})
These functions return the complex root of the argument @var{z}. Unlike These functions return the complex root of the argument @var{z}. Unlike
the @code{sqrt} function these functions do not have any restriction on the @code{sqrt} function these functions do not have any restriction on
the value of the argument. the value of the argument.
@ -631,16 +600,19 @@ the value of the argument.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} cpow (complex double @var{base}, complex double @var{power}) @deftypefun {complex double} cpow (complex double @var{base}, complex double @var{power})
@end deftypefun @deftypefunx {complex float} cpowf (complex float @var{base}, complex float @var{power})
@deftypefun {complex float} cpowf (complex float @var{base}, complex float @var{power}) @deftypefunx {complex long double} cpowl (complex long double @var{base}, complex long double @var{power})
@end deftypefun
@deftypefun {complex long double} cpowl (complex long double @var{base}, complex long double @var{power})
These functions return the complex value @var{BASE} raised to the power of These functions return the complex value @var{BASE} raised to the power of
@var{power}. This is computed as @var{power}. This is computed as
@smallexample @ifinfo
cpow (x, y) = cexp (y * clog (x)) @math{cpow (x, y) = cexp (y * clog (x))}
@end smallexample @end ifinfo
@iftex
@tex
$${\rm cpow}(x, y) = e^{y \log(x)}$$
@end tex
@end iftex
@end deftypefun @end deftypefun
@ -654,10 +626,8 @@ see @ref{Exponents and Logarithms}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double sinh (double @var{x}) @deftypefun double sinh (double @var{x})
@end deftypefun @deftypefunx float sinhf (float @var{x})
@deftypefun float sinhf (float @var{x}) @deftypefunx {long double} sinhl (long double @var{x})
@end deftypefun
@deftypefun {long double} sinhl (long double @var{x})
These functions return the hyperbolic sine of @var{x}, defined These functions return the hyperbolic sine of @var{x}, defined
mathematically as @w{@code{(exp (@var{x}) - exp (-@var{x})) / 2}}. The mathematically as @w{@code{(exp (@var{x}) - exp (-@var{x})) / 2}}. The
function fails, and sets @code{errno} to @code{ERANGE}, if the value of function fails, and sets @code{errno} to @code{ERANGE}, if the value of
@ -667,10 +637,8 @@ function fails, and sets @code{errno} to @code{ERANGE}, if the value of
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double cosh (double @var{x}) @deftypefun double cosh (double @var{x})
@end deftypefun @deftypefunx float coshf (float @var{x})
@deftypefun float coshf (float @var{x}) @deftypefunx {long double} coshl (long double @var{x})
@end deftypefun
@deftypefun {long double} coshl (long double @var{x})
These function return the hyperbolic cosine of @var{x}, These function return the hyperbolic cosine of @var{x},
defined mathematically as @w{@code{(exp (@var{x}) + exp (-@var{x})) / 2}}. defined mathematically as @w{@code{(exp (@var{x}) + exp (-@var{x})) / 2}}.
The function fails, and sets @code{errno} to @code{ERANGE}, if the value The function fails, and sets @code{errno} to @code{ERANGE}, if the value
@ -680,10 +648,8 @@ of @var{x} is too large; that is, if overflow occurs.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double tanh (double @var{x}) @deftypefun double tanh (double @var{x})
@end deftypefun @deftypefunx float tanhf (float @var{x})
@deftypefun float tanhf (float @var{x}) @deftypefunx {long double} tanhl (long double @var{x})
@end deftypefun
@deftypefun {long double} tanhl (long double @var{x})
These functions return the hyperbolic tangent of @var{x}, whose These functions return the hyperbolic tangent of @var{x}, whose
mathematical definition is @w{@code{sinh (@var{x}) / cosh (@var{x})}}. mathematical definition is @w{@code{sinh (@var{x}) / cosh (@var{x})}}.
@end deftypefun @end deftypefun
@ -698,10 +664,8 @@ library are optimized for accuracy and speed.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} csinh (complex double @var{z}) @deftypefun {complex double} csinh (complex double @var{z})
@end deftypefun @deftypefunx {complex float} csinhf (complex float @var{z})
@deftypefun {complex float} csinhf (complex float @var{z}) @deftypefunx {complex long double} csinhl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} csinhl (complex long double @var{z})
These functions return the complex hyperbolic sine of @var{z}, defined These functions return the complex hyperbolic sine of @var{z}, defined
mathematically as @w{@code{(exp (@var{z}) - exp (-@var{z})) / 2}}. The mathematically as @w{@code{(exp (@var{z}) - exp (-@var{z})) / 2}}. The
function fails, and sets @code{errno} to @code{ERANGE}, if the value of function fails, and sets @code{errno} to @code{ERANGE}, if the value of
@ -711,10 +675,8 @@ result is too large.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} ccosh (complex double @var{z}) @deftypefun {complex double} ccosh (complex double @var{z})
@end deftypefun @deftypefunx {complex float} ccoshf (complex float @var{z})
@deftypefun {complex float} ccoshf (complex float @var{z}) @deftypefunx {complex long double} ccoshl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} ccoshl (complex long double @var{z})
These functions return the complex hyperbolic cosine of @var{z}, defined These functions return the complex hyperbolic cosine of @var{z}, defined
mathematically as @w{@code{(exp (@var{z}) + exp (-@var{z})) / 2}}. The mathematically as @w{@code{(exp (@var{z}) + exp (-@var{z})) / 2}}. The
function fails, and sets @code{errno} to @code{ERANGE}, if the value of function fails, and sets @code{errno} to @code{ERANGE}, if the value of
@ -724,10 +686,8 @@ result is too large.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} ctanh (complex double @var{z}) @deftypefun {complex double} ctanh (complex double @var{z})
@end deftypefun @deftypefunx {complex float} ctanhf (complex float @var{z})
@deftypefun {complex float} ctanhf (complex float @var{z}) @deftypefunx {complex long double} ctanhl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} ctanhl (complex long double @var{z})
These functions return the complex hyperbolic tangent of @var{z}, whose These functions return the complex hyperbolic tangent of @var{z}, whose
mathematical definition is @w{@code{csinh (@var{z}) / ccosh (@var{z})}}. mathematical definition is @w{@code{csinh (@var{z}) / ccosh (@var{z})}}.
@end deftypefun @end deftypefun
@ -738,10 +698,8 @@ mathematical definition is @w{@code{csinh (@var{z}) / ccosh (@var{z})}}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double asinh (double @var{x}) @deftypefun double asinh (double @var{x})
@end deftypefun @deftypefunx float asinhf (float @var{x})
@deftypefun float asinhf (float @var{x}) @deftypefunx {long double} asinhl (long double @var{x})
@end deftypefun
@deftypefun {long double} asinhl (long double @var{x})
These functions return the inverse hyperbolic sine of @var{x}---the These functions return the inverse hyperbolic sine of @var{x}---the
value whose hyperbolic sine is @var{x}. value whose hyperbolic sine is @var{x}.
@end deftypefun @end deftypefun
@ -749,10 +707,8 @@ value whose hyperbolic sine is @var{x}.
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double acosh (double @var{x}) @deftypefun double acosh (double @var{x})
@end deftypefun @deftypefunx float acoshf (float @var{x})
@deftypefun float acoshf (float @var{x}) @deftypefunx {long double} acoshl (long double @var{x})
@end deftypefun
@deftypefun {long double} acoshl (long double @var{x})
These functions return the inverse hyperbolic cosine of @var{x}---the These functions return the inverse hyperbolic cosine of @var{x}---the
value whose hyperbolic cosine is @var{x}. If @var{x} is less than value whose hyperbolic cosine is @var{x}. If @var{x} is less than
@code{1}, @code{acosh} returns @code{HUGE_VAL}. @code{1}, @code{acosh} returns @code{HUGE_VAL}.
@ -761,10 +717,8 @@ value whose hyperbolic cosine is @var{x}. If @var{x} is less than
@comment math.h @comment math.h
@comment ISO @comment ISO
@deftypefun double atanh (double @var{x}) @deftypefun double atanh (double @var{x})
@end deftypefun @deftypefunx float atanhf (float @var{x})
@deftypefun float atanhf (float @var{x}) @deftypefunx {long double} atanhl (long double @var{x})
@end deftypefun
@deftypefun {long double} atanhl (long double @var{x})
These functions return the inverse hyperbolic tangent of @var{x}---the These functions return the inverse hyperbolic tangent of @var{x}---the
value whose hyperbolic tangent is @var{x}. If the absolute value of value whose hyperbolic tangent is @var{x}. If the absolute value of
@var{x} is greater than or equal to @code{1}, @code{atanh} returns @var{x} is greater than or equal to @code{1}, @code{atanh} returns
@ -776,10 +730,8 @@ value whose hyperbolic tangent is @var{x}. If the absolute value of
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} casinh (complex double @var{z}) @deftypefun {complex double} casinh (complex double @var{z})
@end deftypefun @deftypefunx {complex float} casinhf (complex float @var{z})
@deftypefun {complex float} casinhf (complex float @var{z}) @deftypefunx {complex long double} casinhl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} casinhl (complex long double @var{z})
These functions return the inverse complex hyperbolic sine of These functions return the inverse complex hyperbolic sine of
@var{z}---the value whose complex hyperbolic sine is @var{z}. @var{z}---the value whose complex hyperbolic sine is @var{z}.
@end deftypefun @end deftypefun
@ -787,10 +739,8 @@ These functions return the inverse complex hyperbolic sine of
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} cacosh (complex double @var{z}) @deftypefun {complex double} cacosh (complex double @var{z})
@end deftypefun @deftypefunx {complex float} cacoshf (complex float @var{z})
@deftypefun {complex float} cacoshf (complex float @var{z}) @deftypefunx {complex long double} cacoshl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} cacoshl (complex long double @var{z})
These functions return the inverse complex hyperbolic cosine of These functions return the inverse complex hyperbolic cosine of
@var{z}---the value whose complex hyperbolic cosine is @var{z}. Unlike @var{z}---the value whose complex hyperbolic cosine is @var{z}. Unlike
the real valued function @code{acosh} there is not limit for the range the real valued function @code{acosh} there is not limit for the range
@ -800,10 +750,8 @@ of the argument.
@comment complex.h @comment complex.h
@comment ISO @comment ISO
@deftypefun {complex double} catanh (complex double @var{z}) @deftypefun {complex double} catanh (complex double @var{z})
@end deftypefun @deftypefunx {complex float} catanhf (complex float @var{z})
@deftypefun {complex float} catanhf (complex float @var{z}) @deftypefunx {complex long double} catanhl (complex long double @var{z})
@end deftypefun
@deftypefun {complex long double} catanhl (complex long double @var{z})
These functions return the inverse complex hyperbolic tangent of These functions return the inverse complex hyperbolic tangent of
@var{z}---the value whose complex hyperbolic tangent is @var{z}. Unlike @var{z}---the value whose complex hyperbolic tangent is @var{z}. Unlike
the real valued function @code{atanh} there is not limit for the range the real valued function @code{atanh} there is not limit for the range

View File

@ -833,10 +833,9 @@ will not affect your program unless it explicitly uses them for something.
@comment signal.h @comment signal.h
@comment POSIX.1 @comment POSIX.1
@deftypevr Macro int SIGUSR1 @deftypevr Macro int SIGUSR1
@end deftypevr
@comment signal.h @comment signal.h
@comment POSIX.1 @comment POSIX.1
@deftypevr Macro int SIGUSR2 @deftypevrx Macro int SIGUSR2
@cindex user signals @cindex user signals
The @code{SIGUSR1} and @code{SIGUSR2} signals are set aside for you to The @code{SIGUSR1} and @code{SIGUSR2} signals are set aside for you to
use any way you want. They're useful for simple interprocess use any way you want. They're useful for simple interprocess

View File

@ -1765,47 +1765,40 @@ extract just the basic type code.
Here are symbolic constants that represent the basic types; they stand Here are symbolic constants that represent the basic types; they stand
for integer values. for integer values.
@table @code @vtable @code
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_INT @item PA_INT
@vindex PA_INT
This specifies that the base type is @code{int}. This specifies that the base type is @code{int}.
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_CHAR @item PA_CHAR
@vindex PA_CHAR
This specifies that the base type is @code{int}, cast to @code{char}. This specifies that the base type is @code{int}, cast to @code{char}.
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_STRING @item PA_STRING
@vindex PA_STRING
This specifies that the base type is @code{char *}, a null-terminated string. This specifies that the base type is @code{char *}, a null-terminated string.
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_POINTER @item PA_POINTER
@vindex PA_POINTER
This specifies that the base type is @code{void *}, an arbitrary pointer. This specifies that the base type is @code{void *}, an arbitrary pointer.
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_FLOAT @item PA_FLOAT
@vindex PA_FLOAT
This specifies that the base type is @code{float}. This specifies that the base type is @code{float}.
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_DOUBLE @item PA_DOUBLE
@vindex PA_DOUBLE
This specifies that the base type is @code{double}. This specifies that the base type is @code{double}.
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_LAST @item PA_LAST
@vindex PA_LAST
You can define additional base types for your own programs as offsets You can define additional base types for your own programs as offsets
from @code{PA_LAST}. For example, if you have data types @samp{foo} from @code{PA_LAST}. For example, if you have data types @samp{foo}
and @samp{bar} with their own specialized @code{printf} conversions, and @samp{bar} with their own specialized @code{printf} conversions,
@ -1815,16 +1808,15 @@ you could define encodings for these types as:
#define PA_FOO PA_LAST #define PA_FOO PA_LAST
#define PA_BAR (PA_LAST + 1) #define PA_BAR (PA_LAST + 1)
@end smallexample @end smallexample
@end table @end vtable
Here are the flag bits that modify a basic type. They are combined with Here are the flag bits that modify a basic type. They are combined with
the code for the basic type using inclusive-or. the code for the basic type using inclusive-or.
@table @code @vtable @code
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_FLAG_PTR @item PA_FLAG_PTR
@vindex PA_FLAG_PTR
If this bit is set, it indicates that the encoded type is a pointer to If this bit is set, it indicates that the encoded type is a pointer to
the base type, rather than an immediate value. the base type, rather than an immediate value.
For example, @samp{PA_INT|PA_FLAG_PTR} represents the type @samp{int *}. For example, @samp{PA_INT|PA_FLAG_PTR} represents the type @samp{int *}.
@ -1832,31 +1824,27 @@ For example, @samp{PA_INT|PA_FLAG_PTR} represents the type @samp{int *}.
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_FLAG_SHORT @item PA_FLAG_SHORT
@vindex PA_FLAG_SHORT
If this bit is set, it indicates that the base type is modified with If this bit is set, it indicates that the base type is modified with
@code{short}. (This corresponds to the @samp{h} type modifier.) @code{short}. (This corresponds to the @samp{h} type modifier.)
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_FLAG_LONG @item PA_FLAG_LONG
@vindex PA_FLAG_LONG
If this bit is set, it indicates that the base type is modified with If this bit is set, it indicates that the base type is modified with
@code{long}. (This corresponds to the @samp{l} type modifier.) @code{long}. (This corresponds to the @samp{l} type modifier.)
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_FLAG_LONG_LONG @item PA_FLAG_LONG_LONG
@vindex PA_FLAG_LONG_LONG
If this bit is set, it indicates that the base type is modified with If this bit is set, it indicates that the base type is modified with
@code{long long}. (This corresponds to the @samp{L} type modifier.) @code{long long}. (This corresponds to the @samp{L} type modifier.)
@comment printf.h @comment printf.h
@comment GNU @comment GNU
@item PA_FLAG_LONG_DOUBLE @item PA_FLAG_LONG_DOUBLE
@vindex PA_FLAG_LONG_DOUBLE
This is a synonym for @code{PA_FLAG_LONG_LONG}, used by convention with This is a synonym for @code{PA_FLAG_LONG_LONG}, used by convention with
a base type of @code{PA_DOUBLE} to indicate a type of @code{long double}. a base type of @code{PA_DOUBLE} to indicate a type of @code{long double}.
@end table @end vtable
@ifinfo @ifinfo
For an example of using these facilities, see @ref{Example of Parsing}. For an example of using these facilities, see @ref{Example of Parsing}.
@ -2234,7 +2222,8 @@ character is of lower case, 1024 is used. For upper case characters,
The postfix tag corresponds to bytes, kilobytes, megabytes, gigabytes, The postfix tag corresponds to bytes, kilobytes, megabytes, gigabytes,
etc. The full table is: etc. The full table is:
@multitable {' '} {2^10 (1024)} {zetta} {Upper} {10^24 (1000)} @ifinfo
@multitable @hsep @vsep {' '} {2^10 (1024)} {zetta} {Upper} {10^24 (1000)}
@item low @tab Multiplier @tab From @tab Upper @tab Multiplier @item low @tab Multiplier @tab From @tab Upper @tab Multiplier
@item ' ' @tab 1 @tab @tab ' ' @tab 1 @item ' ' @tab 1 @tab @tab ' ' @tab 1
@item k @tab 2^10 (1024) @tab kilo @tab K @tab 10^3 (1000) @item k @tab 2^10 (1024) @tab kilo @tab K @tab 10^3 (1000)
@ -2246,6 +2235,29 @@ etc. The full table is:
@item z @tab 2^70 @tab zetta @tab Z @tab 10^21 @item z @tab 2^70 @tab zetta @tab Z @tab 10^21
@item y @tab 2^80 @tab yotta @tab Y @tab 10^24 @item y @tab 2^80 @tab yotta @tab Y @tab 10^24
@end multitable @end multitable
@end ifinfo
@iftex
@tex
\hbox to\hsize{\hfil\vbox{\offinterlineskip
\hrule
\halign{\strut#& \vrule#\tabskip=1em plus2em& {\tt#}\hfil& \vrule#& #\hfil& \vrule#& #\hfil& \vrule#& {\tt#}\hfil& \vrule#& #\hfil& \vrule#\tabskip=0pt\cr
\noalign{\hrule}
\omit&height2pt&\omit&&\omit&&\omit&&\omit&&\omit&\cr
&& \omit low && Multiplier && From && \omit Upper && Multiplier &\cr
\omit&height2pt&\omit&&\omit&&\omit&&\omit&&\omit&\cr
\noalign{\hrule}
&& {\tt\char32} && 1 && && {\tt\char32} && 1 &\cr
&& k && $2^{10} = 1024$ && kilo && K && $10^3 = 1000$ &\cr
&& m && $2^{20}$ && mega && M && $10^6$ &\cr
&& g && $2^{30}$ && giga && G && $10^9$ &\cr
&& t && $2^{40}$ && tera && T && $10^{12}$ &\cr
&& p && $2^{50}$ && peta && P && $10^{15}$ &\cr
&& e && $2^{60}$ && exa && E && $10^{18}$ &\cr
&& z && $2^{70}$ && zetta && Z && $10^{21}$ &\cr
&& y && $2^{80}$ && yotta && Y && $10^{24}$ &\cr
\noalign{\hrule}}}\hfil}
@end tex
@end iftex
The default precision is 3, i.e., 1024 is printed with a lower-case The default precision is 3, i.e., 1024 is printed with a lower-case
format character as if it were @code{%.3fk} and will yield @code{1.000k}. format character as if it were @code{%.3fk} and will yield @code{1.000k}.

View File

@ -25,29 +25,53 @@
BEGIN { header = 0; BEGIN { header = 0;
nameword["@defun"]=1 nameword["@defun"]=1
nameword["@defunx"]=1
nameword["@defmac"]=1 nameword["@defmac"]=1
nameword["@defmacx"]=1
nameword["@defspec"]=1 nameword["@defspec"]=1
nameword["@defspecx"]=1
nameword["@defvar"]=1 nameword["@defvar"]=1
nameword["@defvarx"]=1
nameword["@defopt"]=1 nameword["@defopt"]=1
nameword["@defoptx"]=1
nameword["@deffn"]=2 nameword["@deffn"]=2
nameword["@deffnx"]=2
nameword["@defvr"]=2 nameword["@defvr"]=2
nameword["@defvrx"]=2
nameword["@deftp"]=2 nameword["@deftp"]=2
nameword["@deftpx"]=2
nameword["@deftypefun"]=2 nameword["@deftypefun"]=2
nameword["@deftypefunx"]=2
nameword["@deftypevar"]=2 nameword["@deftypevar"]=2
nameword["@deftypevarx"]=2
nameword["@deftypefn"]=3 nameword["@deftypefn"]=3
nameword["@deftypefnx"]=3
nameword["@deftypevr"]=3 nameword["@deftypevr"]=3
nameword["@deftypevrx"]=3
firstword["@defun"]=1 firstword["@defun"]=1
firstword["@defunx"]=1
firstword["@defmac"]=1 firstword["@defmac"]=1
firstword["@defmacx"]=1
firstword["@defspec"]=1 firstword["@defspec"]=1
firstword["@defspecx"]=1
firstword["@defvar"]=1 firstword["@defvar"]=1
firstword["@defvarx"]=1
firstword["@defopt"]=1 firstword["@defopt"]=1
firstword["@defoptx"]=1
firstword["@deffn"]=2 firstword["@deffn"]=2
firstword["@deffnx"]=2
firstword["@defvr"]=2 firstword["@defvr"]=2
firstword["@defvrx"]=2
firstword["@deftp"]=2 firstword["@deftp"]=2
firstword["@deftpx"]=2
firstword["@deftypefun"]=1 firstword["@deftypefun"]=1
firstword["@deftypefunx"]=1
firstword["@deftypevar"]=1 firstword["@deftypevar"]=1
firstword["@deftypevarx"]=1
firstword["@deftypefn"]=2 firstword["@deftypefn"]=2
firstword["@deftypefnx"]=2
firstword["@deftypevr"]=2 firstword["@deftypevr"]=2
firstword["@deftypevrx"]=2
nameword["@item"]=1 nameword["@item"]=1
firstword["@item"]=1 firstword["@item"]=1
nameword["@itemx"]=1 nameword["@itemx"]=1

View File

@ -1,5 +1,5 @@
%% TeX macros to handle Texinfo files. %% TeX macros to handle Texinfo files.
%% $Id: texinfo.tex,v 2.196 1997/01/04 19:24:13 karl Exp $ %% $Id: texinfo.tex,v 2.197 1997/04/30 15:34:30 drepper Exp $
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, % Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
% 94, 95, 96, 97 Free Software Foundation, Inc. % 94, 95, 96, 97 Free Software Foundation, Inc.
@ -36,7 +36,7 @@
% This automatically updates the version number based on RCS. % This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
\deftexinfoversion$Revision: 2.196 $ \deftexinfoversion$Revision: 2.197 $
\message{Loading texinfo package [Version \texinfoversion]:} \message{Loading texinfo package [Version \texinfoversion]:}
% If in a .fmt file, print the version number % If in a .fmt file, print the version number
@ -118,33 +118,41 @@
\showboxbreadth\maxdimen\showboxdepth\maxdimen \showboxbreadth\maxdimen\showboxdepth\maxdimen
}% }%
%---------------------Begin change----------------------- % For @cropmarks command.
% Do @cropmarks to get crop marks.
% %
%%%% For @cropmarks command. \newif\ifcropmarks
% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986 \let\cropmarks = \cropmarkstrue
%
% Dimensions to add cropmarks at corners.
% Added by P. A. MacKay, 12 Nov. 1986
% %
\newdimen\cornerlong \newdimen\cornerthick \newdimen\cornerlong \newdimen\cornerthick
\newdimen \topandbottommargin \newdimen\topandbottommargin
\newdimen \outerhsize \newdimen \outervsize \newdimen\outerhsize \newdimen\outervsize
\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
\outerhsize=7in \outerhsize=7in
%\outervsize=9.5in %\outervsize=9.5in
% Alternative @smallbook page size is 9.25in % Alternative @smallbook page size is 9.25in
\outervsize=9.25in \outervsize=9.25in
\topandbottommargin=.75in \topandbottommargin=.75in
%
%---------------------End change-----------------------
% Main output routine. % Main output routine.
\chardef\PAGE = 255 \chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}} \output = {\onepageout{\pagecontents\PAGE}}
\newbox\headlinebox \newbox\footlinebox \newbox\headlinebox
\newbox\footlinebox
% \onepageout takes a vbox as an argument. Note that \pagecontents % \onepageout takes a vbox as an argument. Note that \pagecontents
% does insertions, but you have to call it yourself. % does insertions, but you have to call it yourself.
\def\onepageout#1{% \def\onepageout#1{%
\hoffset=\normaloffset \ifcropmarks
\hoffset = 0pt
\else
\hoffset = \normaloffset
\fi
%
\ifodd\pageno \advance\hoffset by \bindingoffset \ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi \else \advance\hoffset by -\bindingoffset\fi
% %
@ -163,53 +171,41 @@
\normalturnoffactive % \ in index entries must not stay \, e.g., if \normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example. % the page break happens to be in the middle of an example.
\shipout\vbox{% \shipout\vbox{%
\ifcropmarks
\vbox to \outervsize\bgroup
\hsize = \outerhsize
\vbox{\line{\ewtop\hfill\ewtop}}%
\nointerlineskip
\line{%
\vbox{\moveleft\cornerthick\nstop}%
\hfill
\vbox{\moveright\cornerthick\nstop}%
}%
\vskip\topandbottommargin
\fi
%
\unvbox\headlinebox \unvbox\headlinebox
\pagebody{#1}% \pagebody{#1}%
\unvbox\footlinebox \unvbox\footlinebox
%
\ifcropmarks
\vskip\topandbottommargin plus1fill minus1fill
\boxmaxdepth = \cornerthick
\line{%
\vbox{\moveleft\cornerthick\nsbot}%
\hfill
\vbox{\moveright\cornerthick\nsbot}%
}%
\nointerlineskip
\vbox{\line{\ewbot\hfill\ewbot}}%
\egroup % \vbox from first cropmarks clause
\fi
}% }%
}% }%
\advancepageno \advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi \ifnum\outputpenalty>-20000 \else\dosupereject\fi
} }
%%%% For @cropmarks command %%%%
% Here is a modification of the main output routine for Near East Publications
% This provides right-angle cropmarks at all four corners.
% The contents of the page are centerlined into the cropmarks,
% and any desired binding offset is added as an \hskip on either
% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
%
\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
{\escapechar=`\\\relax % makes sure backslash is used in output files.
\shipout
\vbox to \outervsize{\hsize=\outerhsize
\vbox{\line{\ewtop\hfill\ewtop}}
\nointerlineskip
\line{\vbox{\moveleft\cornerthick\nstop}
\hfill
\vbox{\moveright\cornerthick\nstop}}
\vskip \topandbottommargin
\centerline{\ifodd\pageno\hskip\bindingoffset\fi
\vbox{
{\let\hsize=\pagewidth \makeheadline}
\pagebody{#1}
{\let\hsize=\pagewidth \makefootline}}
\ifodd\pageno\else\hskip\bindingoffset\fi}
\vskip \topandbottommargin plus1fill minus1fill
\boxmaxdepth\cornerthick
\line{\vbox{\moveleft\cornerthick\nsbot}
\hfill
\vbox{\moveright\cornerthick\nsbot}}
\nointerlineskip
\vbox{\line{\ewbot\hfill\ewbot}}
}}
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi}
%
% Do @cropmarks to get crop marks
\def\cropmarks{\let\onepageout=\croppageout }
\newinsert\margin \dimen\margin=\maxdimen \newinsert\margin \dimen\margin=\maxdimen
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
@ -2240,6 +2236,7 @@ width0pt\relax} \fi
\def\r##1{\realbackslash r {##1}}% \def\r##1{\realbackslash r {##1}}%
\def\i##1{\realbackslash i {##1}}% \def\i##1{\realbackslash i {##1}}%
\def\b##1{\realbackslash b {##1}}% \def\b##1{\realbackslash b {##1}}%
\def\sc##1{\realbackslash sc {##1}}%
\def\cite##1{\realbackslash cite {##1}}% \def\cite##1{\realbackslash cite {##1}}%
\def\key##1{\realbackslash key {##1}}% \def\key##1{\realbackslash key {##1}}%
\def\file##1{\realbackslash file {##1}}% \def\file##1{\realbackslash file {##1}}%
@ -2774,7 +2771,8 @@ width0pt\relax} \fi
% because we don't want its macros evaluated now. % because we don't want its macros evaluated now.
\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}% \toks0 = {#1}%
\edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\donoderef % \donoderef %
@ -2793,8 +2791,9 @@ width0pt\relax} \fi
\gdef\thischaptername{#1}% \gdef\thischaptername{#1}%
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash chapentry \toks0 = {#1}%
{#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% \edef\temp{{\realbackslash chapentry{\the\toks0}%
{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\appendixnoderef % \appendixnoderef %
@ -2828,7 +2827,8 @@ width0pt\relax} \fi
\unnumbchapmacro {#1}% \unnumbchapmacro {#1}%
\gdef\thischapter{#1}\gdef\thissection{#1}% \gdef\thischapter{#1}\gdef\thissection{#1}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}% \toks0 = {#1}%
\edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\unnumbnoderef % \unnumbnoderef %
@ -2843,8 +2843,9 @@ width0pt\relax} \fi
\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
{\chapternofonts% {\chapternofonts%
\toks0 = {#1}%
\edef\temp{{\realbackslash secentry % \edef\temp{{\realbackslash secentry %
{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}% {\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\donoderef % \donoderef %
@ -2858,8 +2859,9 @@ width0pt\relax} \fi
\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
{\chapternofonts% {\chapternofonts%
\toks0 = {#1}%
\edef\temp{{\realbackslash secentry % \edef\temp{{\realbackslash secentry %
{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}% {\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\appendixnoderef % \appendixnoderef %
@ -2871,7 +2873,8 @@ width0pt\relax} \fi
\def\unnumberedseczzz #1{\seccheck{unnumberedsec}% \def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
\plainsecheading {#1}\gdef\thissection{#1}% \plainsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}% \toks0 = {#1}%
\edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\unnumbnoderef % \unnumbnoderef %
@ -2884,8 +2887,9 @@ width0pt\relax} \fi
\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
{\chapternofonts% {\chapternofonts%
\toks0 = {#1}%
\edef\temp{{\realbackslash subsecentry % \edef\temp{{\realbackslash subsecentry %
{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\donoderef % \donoderef %
@ -2898,8 +2902,9 @@ width0pt\relax} \fi
\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
{\chapternofonts% {\chapternofonts%
\toks0 = {#1}%
\edef\temp{{\realbackslash subsecentry % \edef\temp{{\realbackslash subsecentry %
{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% {\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\appendixnoderef % \appendixnoderef %
@ -2911,7 +2916,8 @@ width0pt\relax} \fi
\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
\plainsubsecheading {#1}\gdef\thissection{#1}% \plainsubsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}% \toks0 = {#1}%
\edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\unnumbnoderef % \unnumbnoderef %
@ -2925,8 +2931,8 @@ width0pt\relax} \fi
\subsubsecheading {#1} \subsubsecheading {#1}
{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash subsubsecentry % \toks0 = {#1}%
{#1} \edef\temp{{\realbackslash subsubsecentry{\the\toks0}
{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
{\noexpand\folio}}}% {\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
@ -2942,7 +2948,8 @@ width0pt\relax} \fi
\subsubsecheading {#1} \subsubsecheading {#1}
{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash subsubsecentry{#1}% \toks0 = {#1}%
\edef\temp{{\realbackslash subsubsecentry{\the\toks0}%
{\appendixletter} {\appendixletter}
{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
@ -2956,7 +2963,8 @@ width0pt\relax} \fi
\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
\plainsubsubsecheading {#1}\gdef\thissection{#1}% \plainsubsubsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts% {\chapternofonts%
\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}% \toks0 = {#1}%
\edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\% \escapechar=`\\%
\write \contentsfile \temp % \write \contentsfile \temp %
\unnumbnoderef % \unnumbnoderef %

View File

@ -9,18 +9,18 @@ BEGIN {
/^@deftypefun/ { /^@deftypefun/ {
printf ("* %s: (libc)%s.\n", printf ("* %s: (libc)%s.\n",
gensub (/@deftypefun +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]+).*/, "\\2", 1), gensub (/@deftypefunx? +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\2", 1),
last_node); last_node);
} }
/^@deftypevr/ { /^@deftypevr/ {
printf ("* %s: (libc)%s.\n", printf ("* %s: (libc)%s.\n",
gensub (/@deftypevr +([^{ ]+|\{[^}]+\}) +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]+).*/, "\\3", 1), gensub (/@deftypevrx? +([^{ ]+|\{[^}]+\}) +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
last_node); last_node);
} }
/^@deftypefn/ { /^@deftypefn/ {
printf ("* %s: (libc)%s.\n", printf ("* %s: (libc)%s.\n",
gensub (/@deftypefn +([^{ ]+|\{[^}]+\}) +[^{ ]*(\{[^}]+\})? +([[:alpha:]_][[:alnum:]_]+).*/, "\\3", 1), gensub (/@deftypefnx? +([^{ ]+|\{[^}]+\}) +[^{ ]*(\{[^}]+\})? +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
last_node); last_node);
} }

View File

@ -22,7 +22,7 @@
#ifndef _FENV_H #ifndef _FENV_H
#define __FENV_H 1 #define _FENV_H 1
#include <features.h> #include <features.h>
/* Get the architecture dependend definitions. The following definitions /* Get the architecture dependend definitions. The following definitions
@ -40,7 +40,7 @@
The following macros are defined iff the implementation supports this The following macros are defined iff the implementation supports this
kind of exception. kind of exception.
FE_INEXACT inxeact result FE_INEXACT inexact result
FE_DIVBYZERO devision by zero FE_DIVBYZERO devision by zero
FE_UNDERFLOW result not representable due to underflow FE_UNDERFLOW result not representable due to underflow
FE_OVERFLOW result not representable due to overflow FE_OVERFLOW result not representable due to overflow
@ -86,7 +86,7 @@ extern int fetestexcept __P ((int __excepts));
extern int fegetround __P ((void)); extern int fegetround __P ((void));
/* Establish the rounding direction represented by ROUND. */ /* Establish the rounding direction represented by ROUND. */
extern int fesetround __P ((int __round)); extern int fesetround __P ((int __rounding_direction));
/* Floating-point environment. */ /* Floating-point environment. */

File diff suppressed because it is too large Load Diff

1211
po/de.po

File diff suppressed because it is too large Load Diff

View File

@ -233,8 +233,8 @@ extern int sigwait __P ((__const sigset_t *__set, int *__sig));
/* Names of the signals. This variable exists only for compatibility. /* Names of the signals. This variable exists only for compatibility.
Use `strsignal' instead (see <string.h>). */ Use `strsignal' instead (see <string.h>). */
extern __const char *__const _sys_siglist[NSIG]; extern __const char *__const _sys_siglist[_NSIG];
extern __const char *__const sys_siglist[NSIG]; extern __const char *__const sys_siglist[_NSIG];
/* Structure passed to `sigvec'. */ /* Structure passed to `sigvec'. */
struct sigvec struct sigvec

View File

@ -94,10 +94,12 @@ int
printf_size (FILE *fp, const struct printf_info *info, const void *const *args) printf_size (FILE *fp, const struct printf_info *info, const void *const *args)
{ {
/* Units for the both formats. */ /* Units for the both formats. */
static const char units[2][8] = #define BINARY_UNITS " kmgtpezy"
#define DECIMAL_UNITS " KMGTPEZY"
static const char units[2][sizeof (BINARY_UNITS)] =
{ {
" kmgtpezy", /* For binary format. */ BINARY_UNITS, /* For binary format. */
" KMGTPEZY" /* For decimal format. */ DECIMAL_UNITS /* For decimal format. */
}; };
const char *tag = units[isupper (info->spec) != 0]; const char *tag = units[isupper (info->spec) != 0];
int divisor = isupper (info->spec) ? 1000 : 1024; int divisor = isupper (info->spec) ? 1000 : 1024;

View File

@ -19,6 +19,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <limits.h>
int int
__lcong48_r (param, buffer) __lcong48_r (param, buffer)

View File

@ -127,7 +127,8 @@ __srandom_r (x, buf)
if (buf == NULL || buf->rand_type < TYPE_0 || buf->rand_type > TYPE_4) if (buf == NULL || buf->rand_type < TYPE_0 || buf->rand_type > TYPE_4)
return -1; return -1;
buf->state[0] = x; /* We must make sure the seed is not 0. Take arbitrarily 1 in this case. */
buf->state[0] = x ? x : 1;
if (buf->rand_type != TYPE_0) if (buf->rand_type != TYPE_0)
{ {
long int i; long int i;

View File

@ -19,6 +19,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <limits.h>
int int
__seed48_r (seed16v, buffer) __seed48_r (seed16v, buffer)

View File

@ -51,9 +51,9 @@ typedef unsigned long int __sigset_t;
#ifdef _GNU_SOURCE #ifdef _GNU_SOURCE
# define __sigisemptyset(set) (*(set) == (__sigset_t) 0) # define __sigisemptyset(set) (*(set) == (__sigset_t) 0)
# define __sigandset(dest, left, right) \ # define __sigandset(dest, left, right) \
((*(set) = (*(left) & *(right))), 0) ((*(dest) = (*(left) & *(right))), 0)
# define __sigorset(dest, left, right) \ # define __sigorset(dest, left, right) \
((*(set) = (*(left) | *(right))), 0) ((*(dest) = (*(left) | *(right))), 0)
#endif #endif
/* These functions needn't check for a bogus signal number -- error /* These functions needn't check for a bogus signal number -- error

View File

@ -55,14 +55,14 @@ static inline Elf32_Addr __attribute__ ((unused))
elf_machine_load_address (void) elf_machine_load_address (void)
{ {
Elf32_Addr addr; Elf32_Addr addr;
asm (" call here\n" asm (" call .Lhere\n"
"here: popl %0\n" ".Lhere: popl %0\n"
" subl $here, %0" " subl $.Lhere, %0"
: "=r" (addr)); : "=r" (addr));
return addr; return addr;
} }
/* The `subl' insn above will contain an R_386_32 relocation entry /* The `subl' insn above will contain an R_386_32 relocation entry
intended to insert the run-time address of the label `here'. intended to insert the run-time address of the label `.Lhere'.
This will be the first relocation in the text of the dynamic linker; This will be the first relocation in the text of the dynamic linker;
we skip it to avoid trying to modify read-only text in this early stage. */ we skip it to avoid trying to modify read-only text in this early stage. */
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \

View File

@ -48,9 +48,6 @@ one: .double 1.0
ASM_TYPE_DIRECTIVE(limit,@object) ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29 limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit) ASM_SIZE_DIRECTIVE(limit)
ASM_TYPE_DIRECTIVE(nan,@object)
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(nan)
#ifdef PIC #ifdef PIC
#define MO(op) op##@GOTOFF(%ecx) #define MO(op) op##@GOTOFF(%ecx)
@ -191,8 +188,8 @@ ENTRY(__ieee754_pow)
ret ret
.align ALIGNARG(4) .align ALIGNARG(4)
14: fldl MO(nan) 14: fldl MO(infinity)
faddl MO(zero) // raise invalid exception fmull MO(zero) // raise invalid exception
ret ret
.align ALIGNARG(4) .align ALIGNARG(4)

View File

@ -48,9 +48,6 @@ one: .double 1.0
ASM_TYPE_DIRECTIVE(limit,@object) ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29 limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit) ASM_SIZE_DIRECTIVE(limit)
ASM_TYPE_DIRECTIVE(nan,@object)
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(nan)
#ifdef PIC #ifdef PIC
#define MO(op) op##@GOTOFF(%ecx) #define MO(op) op##@GOTOFF(%ecx)
@ -187,8 +184,8 @@ ENTRY(__ieee754_powf)
ret ret
.align ALIGNARG(4) .align ALIGNARG(4)
14: fldl MO(nan) 14: fldl MO(infinity)
faddl MO(zero) // raise invalid exception fmull MO(zero) // raise invalid exception
ret ret
.align ALIGNARG(4) .align ALIGNARG(4)

View File

@ -48,9 +48,6 @@ one: .double 1.0
ASM_TYPE_DIRECTIVE(limit,@object) ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29 limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit) ASM_SIZE_DIRECTIVE(limit)
ASM_TYPE_DIRECTIVE(nan,@object)
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(nan)
#ifdef PIC #ifdef PIC
#define MO(op) op##@GOTOFF(%ecx) #define MO(op) op##@GOTOFF(%ecx)
@ -191,8 +188,8 @@ ENTRY(__ieee754_powl)
ret ret
.align ALIGNARG(4) .align ALIGNARG(4)
14: fldl MO(nan) 14: fldl MO(infinity)
faddl MO(zero) // raise invalid exception fmull MO(zero) // raise invalid exception
ret ret
.align ALIGNARG(4) .align ALIGNARG(4)

View File

@ -31,7 +31,8 @@ huge_nan_null_null:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
.double 0.0 .double 0.0
.double 0.0 zero: .double 0.0
infinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
.double 0.0 .double 0.0
@ -90,7 +91,7 @@ ENTRY(__cexp)
Check your FPU manual for more information. */ Check your FPU manual for more information. */
andb $0x01, %ah andb $0x01, %ah
cmpb $0x01, %ah cmpb $0x01, %ah
je 2f je 20f
/* We have finite numbers in the real and imaginary part. Do /* We have finite numbers in the real and imaginary part. Do
the real work now. */ the real work now. */
@ -139,9 +140,8 @@ ENTRY(__cexp)
1: fxam /* y : x */ 1: fxam /* y : x */
fnstsw fnstsw
movb %ah, %dl movb %ah, %dl
andb $0x01, %ah /* See above why 0x01 is usable here. */ testb $0x01, %ah /* See above why 0x01 is usable here. */
cmpb $0x01, %ah jne 3f
je 3f
/* The real part is +-Inf and the imaginary part is finite. */ /* The real part is +-Inf and the imaginary part is finite. */
@ -220,7 +220,14 @@ ENTRY(__cexp)
.align ALIGNARG(4) .align ALIGNARG(4)
3: fstp %st(0) 3: fstp %st(0)
fstp %st(0) /* <empty> */ fstp %st(0) /* <empty> */
movl %edx, %eax andb $0x45, %ah
andb $0x47, %dh
xorb %dh, %ah
jnz 30f
fldl MO(infinity) /* Raise invalid exception. */
fmull MO(zero)
fstp %st(0)
30: movl %edx, %eax
shrl $5, %edx shrl $5, %edx
shll $4, %eax shll $4, %eax
andl $16, %edx andl $16, %edx
@ -236,6 +243,9 @@ ENTRY(__cexp)
/* The real part is NaN. */ /* The real part is NaN. */
.align ALIGNARG(4) .align ALIGNARG(4)
20: fldl MO(infinity) /* Raise invalid exception. */
fmull MO(zero)
fstp %st(0)
2: fstp %st(0) 2: fstp %st(0)
fstp %st(0) fstp %st(0)
movl 4(%esp), %eax /* Pointer to memory for result. */ movl 4(%esp), %eax /* Pointer to memory for result. */

View File

@ -31,7 +31,8 @@ huge_nan_null_null:
.byte 0, 0, 0x80, 0x7f .byte 0, 0, 0x80, 0x7f
.byte 0, 0, 0xc0, 0x7f .byte 0, 0, 0xc0, 0x7f
.float 0.0 .float 0.0
.float 0.0 zero: .float 0.0
infinity:
.byte 0, 0, 0x80, 0x7f .byte 0, 0, 0x80, 0x7f
.byte 0, 0, 0xc0, 0x7f .byte 0, 0, 0xc0, 0x7f
.float 0.0 .float 0.0
@ -90,7 +91,7 @@ ENTRY(__cexpf)
Check your FPU manual for more information. */ Check your FPU manual for more information. */
andb $0x01, %ah andb $0x01, %ah
cmpb $0x01, %ah cmpb $0x01, %ah
je 2f je 20f
/* We have finite numbers in the real and imaginary part. Do /* We have finite numbers in the real and imaginary part. Do
the real work now. */ the real work now. */
@ -143,9 +144,8 @@ ENTRY(__cexpf)
1: fxam /* y : x */ 1: fxam /* y : x */
fnstsw fnstsw
movb %ah, %dl movb %ah, %dl
andb $0x01, %ah /* See above why 0x01 is usable here. */ testb $0x01, %ah /* See above why 0x01 is usable here. */
cmpb $0x01, %ah jne 3f
je 3f
/* The real part is +-Inf and the imaginary part is finite. */ /* The real part is +-Inf and the imaginary part is finite. */
@ -222,7 +222,14 @@ ENTRY(__cexpf)
.align ALIGNARG(4) .align ALIGNARG(4)
3: fstp %st(0) 3: fstp %st(0)
fstp %st(0) /* <empty> */ fstp %st(0) /* <empty> */
movl %edx, %eax andb $0x45, %ah
andb $0x47, %dh
xorb %dh, %ah
jnz 30f
flds MO(infinity) /* Raise invalid exception. */
fmuls MO(zero)
fstp %st(0)
30: movl %edx, %eax
shrl $6, %edx shrl $6, %edx
shll $3, %eax shll $3, %eax
andl $8, %edx andl $8, %edx
@ -235,6 +242,9 @@ ENTRY(__cexpf)
/* The real part is NaN. */ /* The real part is NaN. */
.align ALIGNARG(4) .align ALIGNARG(4)
20: flds MO(infinity) /* Raise invalid exception. */
fmuls MO(zero)
fstp %st(0)
2: fstp %st(0) 2: fstp %st(0)
fstp %st(0) fstp %st(0)
movl MO(huge_nan_null_null+4), %eax movl MO(huge_nan_null_null+4), %eax

View File

@ -31,7 +31,8 @@ huge_nan_null_null:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
.double 0.0 .double 0.0
.double 0.0 zero: .double 0.0
infinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
.double 0.0 .double 0.0
@ -90,7 +91,7 @@ ENTRY(__cexpl)
Check your FPU manual for more information. */ Check your FPU manual for more information. */
andb $0x01, %ah andb $0x01, %ah
cmpb $0x01, %ah cmpb $0x01, %ah
je 2f je 20f
/* We have finite numbers in the real and imaginary part. Do /* We have finite numbers in the real and imaginary part. Do
the real work now. */ the real work now. */
@ -139,9 +140,8 @@ ENTRY(__cexpl)
1: fxam /* y : x */ 1: fxam /* y : x */
fnstsw fnstsw
movb %ah, %dl movb %ah, %dl
andb $0x01, %ah /* See above why 0x01 is usable here. */ testb $0x01, %ah /* See above why 0x01 is usable here. */
cmpb $0x01, %ah jne 3f
je 3f
/* The real part is +-Inf and the imaginary part is finite. */ /* The real part is +-Inf and the imaginary part is finite. */
@ -220,7 +220,14 @@ ENTRY(__cexpl)
.align ALIGNARG(4) .align ALIGNARG(4)
3: fstp %st(0) 3: fstp %st(0)
fstp %st(0) /* <empty> */ fstp %st(0) /* <empty> */
movl %edx, %eax andb $0x45, %ah
andb $0x47, %dh
xorb %dh, %ah
jnz 30f
fldl MO(infinity) /* Raise invalid exception. */
fmull MO(zero)
fstp %st(0)
30: movl %edx, %eax
shrl $5, %edx shrl $5, %edx
shll $4, %eax shll $4, %eax
andl $16, %edx andl $16, %edx
@ -236,6 +243,9 @@ ENTRY(__cexpl)
/* The real part is NaN. */ /* The real part is NaN. */
.align ALIGNARG(4) .align ALIGNARG(4)
20: fldl MO(infinity) /* Raise invalid exception. */
fmull MO(zero)
fstp %st(0)
2: fstp %st(0) 2: fstp %st(0)
fstp %st(0) fstp %st(0)
movl 4(%esp), %eax /* Pointer to memory for result. */ movl 4(%esp), %eax /* Pointer to memory for result. */

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
@ -33,16 +34,31 @@ __ccos (__complex__ double x)
{ {
__real__ res = __nan (""); __real__ res = __nan ("");
__imag__ res = 0.0; __imag__ res = 0.0;
#ifdef FE_INVALID
if (__isinf (__real__ x))
feraiseexcept (FE_INVALID);
#endif
} }
else if (__isinf (__imag__ x)) else if (__isinf (__imag__ x))
{ {
__real__ res = HUGE_VAL; __real__ res = HUGE_VAL;
__imag__ res = __nan (""); __imag__ res = __nan ("");
#ifdef FE_INVALID
if (__isinf (__real__ x))
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
__real__ res = __nan (""); __real__ res = __nan ("");
__imag__ res = __nan (""); __imag__ res = __nan ("");
#ifdef FE_INVALID
if (isfinite (__imag__ x))
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
@ -33,16 +34,31 @@ __ccosf (__complex__ float x)
{ {
__real__ res = __nanf (""); __real__ res = __nanf ("");
__imag__ res = 0.0; __imag__ res = 0.0;
#ifdef FE_INVALID
if (__isinff (__real__ x))
feraiseexcept (FE_INVALID);
#endif
} }
else if (__isinff (__imag__ x)) else if (__isinff (__imag__ x))
{ {
__real__ res = HUGE_VALF; __real__ res = HUGE_VALF;
__imag__ res = __nanf (""); __imag__ res = __nanf ("");
#ifdef FE_INVALID
if (__isinff (__real__ x))
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
__real__ res = __nanf (""); __real__ res = __nanf ("");
__imag__ res = __nanf (""); __imag__ res = __nanf ("");
#ifdef FE_INVALID
if (isfinite (__imag__ x))
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -39,18 +40,24 @@ __ccosh (__complex__ double x)
if (icls >= FP_ZERO) if (icls >= FP_ZERO)
{ {
/* Imaginary part is finite. */ /* Imaginary part is finite. */
double sinh_val = __ieee754_sinh (__real__ x);
double cosh_val = __ieee754_cosh (__real__ x); double cosh_val = __ieee754_cosh (__real__ x);
double sinix, cosix; double sinix, cosix;
__sincos (__imag__ x, &sinix, &cosix); __sincos (__imag__ x, &sinix, &cosix);
__real__ retval = cosh_val * cosix; __real__ retval = cosh_val * cosix;
__imag__ retval = cosh_val * sinix; __imag__ retval = sinh_val * sinix;
} }
else else
{ {
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nan (""); __imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
__real__ retval = __nan ("") + __nan (""); __real__ retval = __nan ("") + __nan ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else if (rcls == FP_INFINITE) else if (rcls == FP_INFINITE)
@ -77,6 +84,11 @@ __ccosh (__complex__ double x)
/* The addition raises the invalid exception. */ /* The addition raises the invalid exception. */
__real__ retval = HUGE_VAL; __real__ retval = HUGE_VAL;
__imag__ retval = __nan ("") + __nan (""); __imag__ retval = __nan ("") + __nan ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -39,18 +40,24 @@ __ccoshf (__complex__ float x)
if (icls >= FP_ZERO) if (icls >= FP_ZERO)
{ {
/* Imaginary part is finite. */ /* Imaginary part is finite. */
float sinh_val = __ieee754_sinhf (__real__ x);
float cosh_val = __ieee754_coshf (__real__ x); float cosh_val = __ieee754_coshf (__real__ x);
float sinix, cosix; float sinix, cosix;
__sincosf (__imag__ x, &sinix, &cosix); __sincosf (__imag__ x, &sinix, &cosix);
__real__ retval = cosh_val * cosix; __real__ retval = cosh_val * cosix;
__imag__ retval = cosh_val * sinix; __imag__ retval = sinh_val * sinix;
} }
else else
{ {
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf (""); __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
__real__ retval = __nanf ("") + __nanf (""); __real__ retval = __nanf ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else if (rcls == FP_INFINITE) else if (rcls == FP_INFINITE)
@ -77,6 +84,11 @@ __ccoshf (__complex__ float x)
/* The addition raises the invalid exception. */ /* The addition raises the invalid exception. */
__real__ retval = HUGE_VALF; __real__ retval = HUGE_VALF;
__imag__ retval = __nanf ("") + __nanf (""); __imag__ retval = __nanf ("") + __nanf ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -39,18 +40,24 @@ __ccoshl (__complex__ long double x)
if (icls >= FP_ZERO) if (icls >= FP_ZERO)
{ {
/* Imaginary part is finite. */ /* Imaginary part is finite. */
long double sinh_val = __ieee754_sinhl (__real__ x);
long double cosh_val = __ieee754_coshl (__real__ x); long double cosh_val = __ieee754_coshl (__real__ x);
long double sinix, cosix; long double sinix, cosix;
__sincosl (__imag__ x, &sinix, &cosix); __sincosl (__imag__ x, &sinix, &cosix);
__real__ retval = cosh_val * cosix; __real__ retval = cosh_val * cosix;
__imag__ retval = cosh_val * sinix; __imag__ retval = sinh_val * sinix;
} }
else else
{ {
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl (""); __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
__real__ retval = __nanl ("") + __nanl (""); __real__ retval = __nanl ("") + __nanl ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else if (rcls == FP_INFINITE) else if (rcls == FP_INFINITE)
@ -77,6 +84,11 @@ __ccoshl (__complex__ long double x)
/* The addition raises the invalid exception. */ /* The addition raises the invalid exception. */
__real__ retval = HUGE_VALL; __real__ retval = HUGE_VALL;
__imag__ retval = __nanl ("") + __nanl (""); __imag__ retval = __nanl ("") + __nanl ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
@ -33,16 +34,31 @@ __ccosl (__complex__ long double x)
{ {
__real__ res = __nanl (""); __real__ res = __nanl ("");
__imag__ res = 0.0; __imag__ res = 0.0;
#ifdef FE_INVALID
if (__isinfl (__real__ x))
feraiseexcept (FE_INVALID);
#endif
} }
else if (__isinfl (__imag__ x)) else if (__isinfl (__imag__ x))
{ {
__real__ res = HUGE_VALL; __real__ res = HUGE_VALL;
__imag__ res = __nanl (""); __imag__ res = __nanl ("");
#ifdef FE_INVALID
if (__isinfl (__real__ x))
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
__real__ res = __nanl (""); __real__ res = __nanl ("");
__imag__ res = __nanl (""); __imag__ res = __nanl ("");
#ifdef FE_INVALID
if (isfinite (__imag__ x))
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -59,6 +60,10 @@ __cexpf (__complex__ float x)
is not +-inf the result is NaN + iNaN. */ is not +-inf the result is NaN + iNaN. */
__real__ retval = __nanf (""); __real__ retval = __nanf ("");
__imag__ retval = __nanf (""); __imag__ retval = __nanf ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
} }
} }
else if (rcls == FP_INFINITE) else if (rcls == FP_INFINITE)
@ -89,6 +94,11 @@ __cexpf (__complex__ float x)
{ {
__real__ retval = HUGE_VALF; __real__ retval = HUGE_VALF;
__imag__ retval = __nanf (""); __imag__ retval = __nanf ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
@ -101,6 +111,11 @@ __cexpf (__complex__ float x)
/* If the real part is NaN the result is NaN + iNaN. */ /* If the real part is NaN the result is NaN + iNaN. */
__real__ retval = __nanf (""); __real__ retval = __nanf ("");
__imag__ retval = __nanf (""); __imag__ retval = __nanf ("");
#ifdef FE_INVALID
if (rcls != FP_NAN || icls != FP_NAN)
feraiseexcept (FE_INVALID);
#endif
} }
return retval; return retval;

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -59,6 +60,10 @@ __cexpl (__complex__ long double x)
is not +-inf the result is NaN + iNaN. */ is not +-inf the result is NaN + iNaN. */
__real__ retval = __nanl (""); __real__ retval = __nanl ("");
__imag__ retval = __nanl (""); __imag__ retval = __nanl ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
} }
} }
else if (rcls == FP_INFINITE) else if (rcls == FP_INFINITE)
@ -89,6 +94,11 @@ __cexpl (__complex__ long double x)
{ {
__real__ retval = HUGE_VALL; __real__ retval = HUGE_VALL;
__imag__ retval = __nanl (""); __imag__ retval = __nanl ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
@ -101,6 +111,11 @@ __cexpl (__complex__ long double x)
/* If the real part is NaN the result is NaN + iNaN. */ /* If the real part is NaN the result is NaN + iNaN. */
__real__ retval = __nanl (""); __real__ retval = __nanl ("");
__imag__ retval = __nanl (""); __imag__ retval = __nanl ("");
#ifdef FE_INVALID
if (rcls != FP_NAN || icls != FP_NAN)
feraiseexcept (FE_INVALID);
#endif
} }
return retval; return retval;

View File

@ -27,7 +27,7 @@ __cproj (__complex__ double x)
{ {
__complex__ double res; __complex__ double res;
if (!finite (__real__ x) || !finite (__imag__ x)) if (!isfinite (__real__ x) || !isfinite (__imag__ x))
{ {
__real__ res = INFINITY; __real__ res = INFINITY;
__imag__ res = __copysign (0.0, __imag__ x); __imag__ res = __copysign (0.0, __imag__ x);

View File

@ -27,7 +27,7 @@ __cprojf (__complex__ float x)
{ {
__complex__ float res; __complex__ float res;
if (!finite (__real__ x) || !finite (__imag__ x)) if (!isfinite (__real__ x) || !isfinite (__imag__ x))
{ {
__real__ res = INFINITY; __real__ res = INFINITY;
__imag__ res = __copysignf (0.0, __imag__ x); __imag__ res = __copysignf (0.0, __imag__ x);

View File

@ -27,7 +27,7 @@ __cprojl (__complex__ long double x)
{ {
__complex__ long double res; __complex__ long double res;
if (!finite (__real__ x) || !finite (__imag__ x)) if (!isfinite (__real__ x) || !isfinite (__imag__ x))
{ {
__real__ res = INFINITY; __real__ res = INFINITY;
__imag__ res = __copysignl (0.0, __imag__ x); __imag__ res = __copysignl (0.0, __imag__ x);

View File

@ -19,46 +19,110 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h"
__complex__ double __complex__ double
__csin (__complex__ double x) __csin (__complex__ double x)
{ {
__complex__ double res; __complex__ double retval;
int negate = signbit (__real__ x);
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
if (!isfinite (__real__ x) || isnan (__imag__ x)) __real__ x = fabs (__real__ x);
if (icls >= FP_ZERO)
{ {
if (__real__ x == 0.0 || __imag__ x == 0.0) /* Imaginary part is finite. */
if (rcls >= FP_ZERO)
{ {
__real__ res = __nan (""); /* Real part is finite. */
__imag__ res = 0.0; double sinh_val = __ieee754_sinh (__imag__ x);
} double cosh_val = __ieee754_cosh (__imag__ x);
else if (__isinf (__imag__ x)) double sinix, cosix;
{
__real__ res = __nan (""); __sincos (__real__ x, &sinix, &cosix);
__imag__ res = __imag__ x;
__real__ retval = cosh_val * sinix;
__imag__ retval = sinh_val * cosix;
if (negate)
__real__ retval = -__real__ retval;
} }
else else
{ {
__real__ res = __nan (""); if (icls == FP_ZERO)
__imag__ res = __nan (""); {
/* Imaginary part is 0.0. */
__real__ retval = __nan ("");
__imag__ retval = __imag__ x;
#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
}
else
{
__real__ retval = __nan ("");
__imag__ retval = __nan ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
}
}
}
else if (icls == FP_INFINITE)
{
/* Imaginary part is infinite. */
if (rcls == FP_ZERO)
{
/* Real part is 0.0. */
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __imag__ x;
}
else if (rcls > FP_ZERO)
{
/* Real part is finite. */
double sinix, cosix;
__sincos (__real__ x, &sinix, &cosix);
__real__ retval = __copysign (HUGE_VAL, sinix);
__imag__ retval = __copysign (HUGE_VAL, cosix);
if (negate)
__real__ retval = -__real__ retval;
if (signbit (__imag__ x))
__imag__ retval = -__imag__ retval;
}
else
{
/* The addition raises the invalid exception. */
__real__ retval = __nan ("");
__imag__ retval = HUGE_VAL;
#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else
{ {
__complex__ double y; if (rcls == FP_ZERO)
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
__real__ y = -__imag__ x; else
__imag__ y = __real__ x; __real__ retval = __nan ("");
__imag__ retval = __nan ("");
y = __csinh (y);
__real__ res = __imag__ y;
__imag__ res = -__real__ y;
} }
return res; return retval;
} }
weak_alias (__csin, csin) weak_alias (__csin, csin)
#ifdef NO_LONG_DOUBLE #ifdef NO_LONG_DOUBLE

View File

@ -19,45 +19,109 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h"
__complex__ float __complex__ float
__csinf (__complex__ float x) __csinf (__complex__ float x)
{ {
__complex__ float res; __complex__ float retval;
int negate = signbit (__real__ x);
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
if (!isfinite (__real__ x) || isnan (__imag__ x)) __real__ x = fabsf (__real__ x);
if (icls >= FP_ZERO)
{ {
if (__real__ x == 0.0 || __imag__ x == 0.0) /* Imaginary part is finite. */
if (rcls >= FP_ZERO)
{ {
__real__ res = __nanf (""); /* Real part is finite. */
__imag__ res = 0.0; float sinh_val = __ieee754_sinhf (__imag__ x);
} float cosh_val = __ieee754_coshf (__imag__ x);
else if (__isinff (__imag__ x)) float sinix, cosix;
{
__real__ res = __nanf (""); __sincosf (__real__ x, &sinix, &cosix);
__imag__ res = __imag__ x;
__real__ retval = cosh_val * sinix;
__imag__ retval = sinh_val * cosix;
if (negate)
__real__ retval = -__real__ retval;
} }
else else
{ {
__real__ res = __nanf (""); if (icls == FP_ZERO)
__imag__ res = __nanf (""); {
/* Imaginary part is 0.0. */
__real__ retval = __nanf ("");
__imag__ retval = __imag__ x;
#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
}
else
{
__real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
}
}
}
else if (icls == FP_INFINITE)
{
/* Imaginary part is infinite. */
if (rcls == FP_ZERO)
{
/* Real part is 0.0. */
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __imag__ x;
}
else if (rcls > FP_ZERO)
{
/* Real part is finite. */
float sinix, cosix;
__sincosf (__real__ x, &sinix, &cosix);
__real__ retval = __copysignf (HUGE_VALF, sinix);
__imag__ retval = __copysignf (HUGE_VALF, cosix);
if (negate)
__real__ retval = -__real__ retval;
if (signbit (__imag__ x))
__imag__ retval = -__imag__ retval;
}
else
{
/* The addition raises the invalid exception. */
__real__ retval = __nanf ("");
__imag__ retval = HUGE_VALF;
#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else
{ {
__complex__ float y; if (rcls == FP_ZERO)
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
__real__ y = -__imag__ x; else
__imag__ y = __real__ x; __real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
y = __csinhf (y);
__real__ res = __imag__ y;
__imag__ res = -__real__ y;
} }
return res; return retval;
} }
weak_alias (__csinf, csinf) weak_alias (__csinf, csinf)

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -41,12 +42,13 @@ __csinh (__complex__ double x)
{ {
/* Imaginary part is finite. */ /* Imaginary part is finite. */
double sinh_val = __ieee754_sinh (__real__ x); double sinh_val = __ieee754_sinh (__real__ x);
double cosh_val = __ieee754_cosh (__real__ x);
double sinix, cosix; double sinix, cosix;
__sincos (__imag__ x, &sinix, &cosix); __sincos (__imag__ x, &sinix, &cosix);
__real__ retval = sinh_val * cosix; __real__ retval = sinh_val * cosix;
__imag__ retval = sinh_val * sinix; __imag__ retval = cosh_val * sinix;
if (negate) if (negate)
__real__ retval = -__real__ retval; __real__ retval = -__real__ retval;
@ -58,11 +60,20 @@ __csinh (__complex__ double x)
/* Real part is 0.0. */ /* Real part is 0.0. */
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0); __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nan ("") + __nan (""); __imag__ retval = __nan ("") + __nan ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
__real__ retval = __nan (""); __real__ retval = __nan ("");
__imag__ retval = __nan (""); __imag__ retval = __nan ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
} }
} }
} }
@ -93,6 +104,11 @@ __csinh (__complex__ double x)
/* The addition raises the invalid exception. */ /* The addition raises the invalid exception. */
__real__ retval = HUGE_VAL; __real__ retval = HUGE_VAL;
__imag__ retval = __nan ("") + __nan (""); __imag__ retval = __nan ("") + __nan ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -41,12 +42,13 @@ __csinhf (__complex__ float x)
{ {
/* Imaginary part is finite. */ /* Imaginary part is finite. */
float sinh_val = __ieee754_sinhf (__real__ x); float sinh_val = __ieee754_sinhf (__real__ x);
float cosh_val = __ieee754_coshf (__real__ x);
float sinix, cosix; float sinix, cosix;
__sincosf (__imag__ x, &sinix, &cosix); __sincosf (__imag__ x, &sinix, &cosix);
__real__ retval = sinh_val * cosix; __real__ retval = sinh_val * cosix;
__imag__ retval = sinh_val * sinix; __imag__ retval = cosh_val * sinix;
if (negate) if (negate)
__real__ retval = -__real__ retval; __real__ retval = -__real__ retval;
@ -58,11 +60,20 @@ __csinhf (__complex__ float x)
/* Real part is 0.0. */ /* Real part is 0.0. */
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0); __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanf ("") + __nanf (""); __imag__ retval = __nanf ("") + __nanf ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
__real__ retval = __nanf (""); __real__ retval = __nanf ("");
__imag__ retval = __nanf (""); __imag__ retval = __nanf ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
} }
} }
} }
@ -93,6 +104,11 @@ __csinhf (__complex__ float x)
/* The addition raises the invalid exception. */ /* The addition raises the invalid exception. */
__real__ retval = HUGE_VALF; __real__ retval = HUGE_VALF;
__imag__ retval = __nanf ("") + __nanf (""); __imag__ retval = __nanf ("") + __nanf ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -41,12 +41,13 @@ __csinhl (__complex__ long double x)
{ {
/* Imaginary part is finite. */ /* Imaginary part is finite. */
long double sinh_val = __ieee754_sinhl (__real__ x); long double sinh_val = __ieee754_sinhl (__real__ x);
long double cosh_val = __ieee754_coshl (__real__ x);
long double sinix, cosix; long double sinix, cosix;
__sincosl (__imag__ x, &sinix, &cosix); __sincosl (__imag__ x, &sinix, &cosix);
__real__ retval = sinh_val * cosix; __real__ retval = sinh_val * cosix;
__imag__ retval = sinh_val * sinix; __imag__ retval = cosh_val * sinix;
if (negate) if (negate)
__real__ retval = -__real__ retval; __real__ retval = -__real__ retval;
@ -58,11 +59,20 @@ __csinhl (__complex__ long double x)
/* Real part is 0.0. */ /* Real part is 0.0. */
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0); __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanl ("") + __nanl (""); __imag__ retval = __nanl ("") + __nanl ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
else else
{ {
__real__ retval = __nanl (""); __real__ retval = __nanl ("");
__imag__ retval = __nanl (""); __imag__ retval = __nanl ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
} }
} }
} }
@ -93,6 +103,11 @@ __csinhl (__complex__ long double x)
/* The addition raises the invalid exception. */ /* The addition raises the invalid exception. */
__real__ retval = HUGE_VALL; __real__ retval = HUGE_VALL;
__imag__ retval = __nanl ("") + __nanl (""); __imag__ retval = __nanl ("") + __nanl ("");
#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,45 +19,109 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h"
__complex__ long double __complex__ long double
__csinl (__complex__ long double x) __csinl (__complex__ long double x)
{ {
__complex__ long double res; __complex__ long double retval;
int negate = signbit (__real__ x);
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
if (!isfinite (__real__ x) || isnan (__imag__ x)) __real__ x = fabsl (__real__ x);
if (icls >= FP_ZERO)
{ {
if (__real__ x == 0.0 || __imag__ x == 0.0) /* Imaginary part is finite. */
if (rcls >= FP_ZERO)
{ {
__real__ res = __nanl (""); /* Real part is finite. */
__imag__ res = 0.0; long double sinh_val = __ieee754_sinhl (__imag__ x);
} long double cosh_val = __ieee754_coshl (__imag__ x);
else if (__isinfl (__imag__ x)) long double sinix, cosix;
{
__real__ res = __nanl (""); __sincosl (__real__ x, &sinix, &cosix);
__imag__ res = __imag__ x;
__real__ retval = cosh_val * sinix;
__imag__ retval = sinh_val * cosix;
if (negate)
__real__ retval = -__real__ retval;
} }
else else
{ {
__real__ res = __nanl (""); if (icls == FP_ZERO)
__imag__ res = __nanl (""); {
/* Imaginary part is 0.0. */
__real__ retval = __nanl ("");
__imag__ retval = __imag__ x;
#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
}
else
{
__real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
#endif
}
}
}
else if (icls == FP_INFINITE)
{
/* Imaginary part is infinite. */
if (rcls == FP_ZERO)
{
/* Real part is 0.0. */
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __imag__ x;
}
else if (rcls > FP_ZERO)
{
/* Real part is finite. */
long double sinix, cosix;
__sincosl (__real__ x, &sinix, &cosix);
__real__ retval = __copysignl (HUGE_VALL, sinix);
__imag__ retval = __copysignl (HUGE_VALL, cosix);
if (negate)
__real__ retval = -__real__ retval;
if (signbit (__imag__ x))
__imag__ retval = -__imag__ retval;
}
else
{
/* The addition raises the invalid exception. */
__real__ retval = __nanl ("");
__imag__ retval = HUGE_VALL;
#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else
{ {
__complex__ long double y; if (rcls == FP_ZERO)
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
__real__ y = -__imag__ x; else
__imag__ y = __real__ x; __real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
y = __csinhl (y);
__real__ res = __imag__ y;
__imag__ res = -__real__ y;
} }
return res; return retval;
} }
weak_alias (__csinl, csinl) weak_alias (__csinl, csinl)

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -44,6 +45,11 @@ __ctanh (__complex__ double x)
{ {
__real__ res = __nan (""); __real__ res = __nan ("");
__imag__ res = __nan (""); __imag__ res = __nan ("");
#ifdef FE_INVALID
if (__isinf (__imag__ x))
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -44,6 +45,11 @@ __ctanhf (__complex__ float x)
{ {
__real__ res = __nanf (""); __real__ res = __nanf ("");
__imag__ res = __nanf (""); __imag__ res = __nanf ("");
#ifdef FE_INVALID
if (__isinff (__imag__ x))
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

View File

@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <complex.h> #include <complex.h>
#include <fenv.h>
#include <math.h> #include <math.h>
#include "math_private.h" #include "math_private.h"
@ -44,6 +45,11 @@ __ctanhl (__complex__ long double x)
{ {
__real__ res = __nanl (""); __real__ res = __nanl ("");
__imag__ res = __nanl (""); __imag__ res = __nanl ("");
#ifdef FE_INVALID
if (__isinfl (__imag__ x))
feraiseexcept (FE_INVALID);
#endif
} }
} }
else else

3
sysdeps/stub/abi-tag.h Normal file
View File

@ -0,0 +1,3 @@
#error must define an ABI tag for this port
#define ABI_TAG 0xff123abc

View File

@ -0,0 +1,16 @@
/* Define the GNU ABI tag for the Linux kernel we need.
The is a 4-byte quantity in native byte order:
the high byte is 0 to indicate Linux;
the low three bytes are the LINUX_VERSION_CODE for the earliest
compatible Linux kernel. */
#define ABI_LINUX_TAG 0
#define ABI_LINUX_MAJOR 2
#define ABI_LINUX_MINOR 0
#define ABI_LINUX_PATCH 0
#define ABI_TAG ((ABI_LINUX_TAG << 24) | \
(ABI_LINUX_MAJOR << 16) | \
(ABI_LINUX_MINOR << 8) | \
(ABI_LINUX_PATCH << 0))

View File

@ -44,7 +44,7 @@ ENTRY(__clone)
/* Do the system call */ /* Do the system call */
mov a0,pv /* get fn ptr out of the way */ mov a0,pv /* get fn ptr out of the way */
mov a3,a4 /* get fn arg out of the way */ mov a3,t0 /* get fn arg out of the way */
mov a2,a0 mov a2,a0
ldiq v0,__NR_clone ldiq v0,__NR_clone
call_pal PAL_callsys call_pal PAL_callsys
@ -74,7 +74,7 @@ thread_start:
.prologue 0 .prologue 0
/* Call the user's function */ /* Call the user's function */
mov a4,a0 mov t0,a0
jsr ra,(pv) jsr ra,(pv)
ldgp gp,0(ra) ldgp gp,0(ra)

View File

@ -56,12 +56,12 @@ struct in6_rtmsg
struct in6_addr rtmsg_dst; struct in6_addr rtmsg_dst;
struct in6_addr rtmsg_src; struct in6_addr rtmsg_src;
struct in6_addr rtmsg_gateway; struct in6_addr rtmsg_gateway;
unsigned long int rtmsg_type; u_int32_t rtmsg_type;
unsigned short int rtmsg_dst_len; u_int16_t rtmsg_dst_len;
unsigned short int rtmsg_src_len; u_int16_t rtmsg_src_len;
unsigned long int rtmsg_metric; u_int32_t rtmsg_metric;
unsigned long int rtmsg_info; unsigned long int rtmsg_info;
unsigned long int rtmsg_flags; u_int32_t rtmsg_flags;
int rtmsg_ifindex; int rtmsg_ifindex;
}; };

View File

@ -48,7 +48,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <netinet/icmp.h> #include <netinet/ip_icmp.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/ip.h> #include <netinet/ip.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>

View File

@ -175,6 +175,7 @@ localtime_r (t, tp)
/* Some systems lack the `memset' function and we don't want to /* Some systems lack the `memset' function and we don't want to
introduce additional dependencies. */ introduce additional dependencies. */
static const char spaces[16] = " "; static const char spaces[16] = " ";
static const char zeroes[16] = "0000000000000000";
# define memset_space(P, Len) \ # define memset_space(P, Len) \
do { \ do { \
@ -189,8 +190,23 @@ static const char spaces[16] = " ";
} \ } \
while (_len > 0); \ while (_len > 0); \
} while (0) } while (0)
# define memset_zero(P, Len) \
do { \
int _len = (Len); \
\
do \
{ \
int _this = _len > 16 ? 16 : _len; \
memcpy ((P), zeroes, _this); \
(P) += _this; \
_len -= _this; \
} \
while (_len > 0); \
} while (0)
#else #else
# define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len)) # define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len))
# define memset_zero(P, Len) (memset ((P), '0', (Len)), (P) += (Len))
#endif #endif
#define add(n, f) \ #define add(n, f) \
@ -204,7 +220,12 @@ static const char spaces[16] = " ";
if (p) \ if (p) \
{ \ { \
if (_delta > 0) \ if (_delta > 0) \
{ \
if (pad == '0') \
memset_zero (p, _delta); \
else \
memset_space (p, _delta); \ memset_space (p, _delta); \
} \
f; \ f; \
p += _n; \ p += _n; \
} \ } \

View File

@ -377,7 +377,7 @@ strptime_internal (buf, format, tm, decided)
case 'I': case 'I':
/* Match hour in 12-hour clock. */ /* Match hour in 12-hour clock. */
get_number (1, 12); get_number (1, 12);
tm->tm_hour = val - 1; tm->tm_hour = val % 12;
have_I = 1; have_I = 1;
break; break;
case 'j': case 'j':