summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-04-12 23:41:36 +0000
committerUlrich Drepper <drepper@redhat.com>1997-04-12 23:41:36 +0000
commit6355131153fd618d50286f0f24ac49b405d03ee5 (patch)
tree4927449e56ae721b2ddb0d42efcce211b6068004
parentc131718ccc1db101df54fb04f34f5611c3678450 (diff)
Update.
1997-04-13 01:06 Ulrich Drepper <drepper@cygnus.com> * isomac.c: Improve messages. * math/Makefile (libm-calls): Add s_nearbyint, s_catan, s_casin, s_ccos, s_csin, s_ctan, s_ctanh, s_cacos, s_casinh, s_cacosh, s_catanh, s_csqrt, and s_cpow. * math/libm-test.c: New functions ccos_test, cacos_test, cacosh_test, casin_test, casinh_test, catan_test, catanh_test, ctanh_test, csqrt_test, cpow_test, rint_test. * math/math.h: Include new header mathbits.h which defines some more (system dependent) types and some macros. (isfinite): Use __finite instead of fpclassify. * sysdeps/generic/mathbits.h: New file. * sysdeps/i386/fpu/mathbits.h: New file. * sysdeps/i386/huge_val.h: Don't define INFINITY. * sysdeps/ieee754/huge_val.h: Likewise. * sysdeps/m68k/huge_val.h: Likewise. * sysdeps/i386/fpu/fenvbits.h: Define FE_NOMASK_ENV. * sysdeps/i386/fpu/fesetenv.c: Handle FE_NOMASK_ENV. * math/complex.h (_Imaginary_I): Define correctly. I misread the standard first. * sysdeps/libm-i387/s_finite.S: Optimized rewrite. * sysdeps/libm-i387/s_finitef.S: Likewise. * sysdeps/libm-i387/s_finitel.S: Likewise. Provided by Joe Keane <jgk@jgk.org>. * sysdeps/libm-i387/s_nearbyint.S: New file. * sysdeps/libm-i387/s_nearbyintf.S: New file. * sysdeps/libm-i387/s_nearbyintl.S: New file. * sysdeps/libm-ieee754/s_nearbyint.S: New file. * sysdeps/libm-ieee754/s_nearbyintf.S: New file. * sysdeps/libm-ieee754/s_nearbyintl.S: New file. * sysdeps/libm-ieee754/s_cacos.c: New file. * sysdeps/libm-ieee754/s_cacosf.c: New file. * sysdeps/libm-ieee754/s_cacosl.c: New file. * sysdeps/libm-ieee754/s_cacosh.c: New file. * sysdeps/libm-ieee754/s_cacoshf.c: New file. * sysdeps/libm-ieee754/s_cacoshl.c: New file. * sysdeps/libm-ieee754/s_casin.c: New file. * sysdeps/libm-ieee754/s_casinf.c: New file. * sysdeps/libm-ieee754/s_casinl.c: New file. * sysdeps/libm-ieee754/s_casinh.c: New file. * sysdeps/libm-ieee754/s_casinhf.c: New file. * sysdeps/libm-ieee754/s_casinhl.c: New file. * sysdeps/libm-ieee754/s_catan.c: New file. * sysdeps/libm-ieee754/s_catanf.c: New file. * sysdeps/libm-ieee754/s_catanl.c: New file. * sysdeps/libm-ieee754/s_catanh.c: New file. * sysdeps/libm-ieee754/s_catanhf.c: New file. * sysdeps/libm-ieee754/s_catanhl.c: New file. * sysdeps/libm-ieee754/s_ccos.c: New file. * sysdeps/libm-ieee754/s_ccosf.c: New file. * sysdeps/libm-ieee754/s_ccosl.c: New file. * sysdeps/libm-ieee754/s_cpow.c: New file. * sysdeps/libm-ieee754/s_cpowf.c: New file. * sysdeps/libm-ieee754/s_cpowl.c: New file. * sysdeps/libm-ieee754/s_csin.c: New file. * sysdeps/libm-ieee754/s_csinf.c: New file. * sysdeps/libm-ieee754/s_csinl.c: New file. * sysdeps/libm-ieee754/s_csqrt.c: New file. * sysdeps/libm-ieee754/s_csqrtf.c: New file. * sysdeps/libm-ieee754/s_csqrtl.c: New file. * sysdeps/libm-ieee754/s_ctan.c: New file. * sysdeps/libm-ieee754/s_ctanf.c: New file. * sysdeps/libm-ieee754/s_ctanl.c: New file. * sysdeps/libm-ieee754/s_ctanh.c: New file. * sysdeps/libm-ieee754/s_ctanhf.c: New file. * sysdeps/libm-ieee754/s_ctanhl.c: New file. * time/strftime.c (memset_space): Increment pointer. * time/strptime.c: Interpret year number 00-59 as 2000--2059. Patches by Karl Heuer <kwzh@gnu.ai.mit.edu>. 1997-04-11 11:57 Miguel de Icaza <miguel@nuclecu.unam.mx> * sysdeps/unix/sysv/linux/sparc/syscalls.list: Remove fork, pipe, syscall. 1997-04-05 00:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/s_remquo.c: Change algorithm, although probably still wrong. * sysdeps/libm-ieee754/s_remquof.c: Likewise. * sysdeps/libm-ieee754/s_remquol.c: Likewise. * math/libm-test.c (remquo_test): Corrected. 1997-04-11 00:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/__math.h (__rinttol, rinttol): New inline. * sysdeps/m68k/fpu/s_rinttol.c: New file. * sysdeps/m68k/fpu/s_rinttoll.c: New file. * math/libm-test.c (remquo_test): Use check_long to test the quotient. (cbrt_test): Add epsilons for long double. 1997-04-10 18:48 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * locale/localeinfo.h: Update declaration of _nl_current. 1997-04-11 11:27 Ulrich Drepper <drepper@cygnus.com> * rellnsh-sh: Use explicitely /bin/pwd to find the external program. * math/Makefile (headers): Add fenv.h and fenvbits.h. (libm-support): Add s_rountol, s_roundtoll, fclrexcpt, fgetexcptflg, fraiseexcpt, fsetexcptflg, ftestexcept, fegetround, fesetround, fegetenv, feholdexcpt, fesetenv, feupdateenv. (libm-calls): Add s_round. * math/fenv.h: New file. * math/libm-test.c: Correct tests for s_rinttol and s_rinttoll. Add roundtol_check and roundtoll_check. * math/math.h: Pretty printing. * sysdeps/i386/fpu/fclrexcpt.c: New file. * sysdeps/i386/fpu/fegetenv.c: New file. * sysdeps/i386/fpu/fegetround.c: New file. * sysdeps/i386/fpu/feholdexcpt.c: New file. * sysdeps/i386/fpu/fenvbits.h: New file. * sysdeps/i386/fpu/fesetenv.c: New file. * sysdeps/i386/fpu/fesetround.c: New file. * sysdeps/i386/fpu/fgetexcptflg.c: New file. * sysdeps/i386/fpu/fraiseexcpt.c: New file. * sysdeps/i386/fpu/fsetexcptflg.c: New file. * sysdeps/i386/fpu/ftestexcept.c: New file. * sysdeps/stub/fclrexcpt.c: New file. * sysdeps/stub/fegetenv.c: New file. * sysdeps/stub/fegetround.c: New file. * sysdeps/stub/feholdexcpt.c: New file. * sysdeps/stub/fenvbits.h: New file. * sysdeps/stub/fesetenv.c: New file. * sysdeps/stub/fesetround.c: New file. * sysdeps/stub/fgetexcptflg.c: New file. * sysdeps/stub/fraiseexcpt.c: New file. * sysdeps/stub/fsetexcptflg.c: New file. * sysdeps/stub/ftestexcept.c: New file. * sysdeps/libm-i387/s_trunc.S: New file. * sysdeps/libm-i387/s_truncf.S: New file. * sysdeps/libm-i387/s_truncl.S: New file. * sysdeps/libm-ieee754/s_round.c: New file. * sysdeps/libm-ieee754/s_roundf.c: New file. * sysdeps/libm-ieee754/s_roundl.c: New file. * sysdeps/libm-ieee754/s_ccosh.c: Rewritten to use fpclassify. * 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_clog.c: Likewise. * sysdeps/libm-ieee754/s_clogf.c: Likewise. * sysdeps/libm-ieee754/s_clogl.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_ceill.c: Corrected. The mantissa has only 63 bits. * sysdeps/libm-ieee754/s_floorl.c: Likewise. * po/pl.po: Updated. * string/swab.c: Correctly handle array of odd length. * sysdeps/generic/memmem.c: Update copyright. 1997-04-10 20:22 Ulrich Drepper <drepper@cygnus.com> * hurd/Makefile (sunrpc-headers): Add clnt.h. Proposed by Thomas Bushnell <thomas@gnu.ai.mit.edu>. 1997-04-09 14:21 Miguel de Icaza <miguel@nuclecu.unam.mx> * sysdeps/sparc/dl-machine.h: Bug fix: I was not loading the proper value from the GOT. Pass argument block to init function. * sysdeps/sparc/elf/start.c: Call atexit (_fini) after calling _init (). * sysdeps/sparc/fpu_control.h: Fix the FPU constants. I got them wrong the first time. * sysdeps/sparc/setjmp.S: PIC code was clobbering a callee saved register. * sysdeps/sparc/udiv_qrnnd.S: Add type @function. * sysdeps/unix/sysv/linux/sparc/init-first.h: Linux/SPARC specific SYSDEP_CALL_INIT. * sysdeps/unix/sysv/linux/sparc/signum.h: Remove definition for NSIG and duplicated SIGIOT. 1997-04-05 00:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/s_remquo.c: Change algorithm, although probably still wrong. * sysdeps/libm-ieee754/s_remquof.c: Likewise. * sysdeps/libm-ieee754/s_remquol.c: Likewise. * math/libm-test.c (remquo_test): Corrected. 1997-04-03 18:35 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (parent-tests): New target to run the tests to that they are executed even if some subdir tests have failed. (tests): Depend on parent-tests instead of running the tests directly. 1997-04-03 12:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> Clean up name space pollution in libnss_*.so: * nis/nss_compat/compat-pwd.c, resolv/mapv4v6addr.h, resolv/nss_dns/dns-host.c: Replace bzero by memset, bcopy by memcpy and bcmp by memcmp to clean up namespace. * nss/nss_db/db-XXX.c (internal_setent): Use __dbopen instead of dbopen. * nss/nss_db/db-alias.c (internal_setent): Likewise. * nss/nss_db/db-netgrp.c (_nss_db_setnetgrent): Likewise. * db/db/db.c [_LIBC]: Define __dbopen instead of dbopen and make the latter a weak alias. * db/db.h: Declare __dbopen. * db/btree/btree.h [_LIBC]: Prepend __ to all mpool functions. * db/mpool/mpool.c [_LIBC]: Define all external functions with __ prefix and make the old names weak aliases. * db/mpool.h: Declare the new internal names. 1997-04-04 23:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdio-common/vfscanf.c: Fix scanning of hexadecimal fp number. * stdio-common/tstscanf.c: Add test case for this. 1997-04-04 17:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c: Fix more typos. 1997-04-03 17:15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c (csinh_test): Fix test names. (ccosh_test): Likewise. * sysdeps/libm-ieee754/s_csinh.c: Use sinh function instead of computing it directly. * sysdeps/libm-ieee754/s_csinhf.c: Likewise. * sysdeps/libm-ieee754/s_csinhl.c: Likewise. * sysdeps/libm-ieee754/s_ccosh.c: Use cosh function instead of computing it directly. * sysdeps/libm-ieee754/s_ccoshf.c: Likewise. * sysdeps/libm-ieee754/s_ccoshl.c: Likewise. * sysdeps/libm-ieee754/s_cexp.c: Use internal exp function instead of wrapper. * sysdeps/libm-ieee754/s_cexpf.c: Likewise. * sysdeps/libm-ieee754/s_cexpl.c: Likewise. * sysdeps/m68k/fpu/s_cexp.c: Likewise. Correct handling of special values. Avoid use of fsincos if all that is needed is the quadrant. * sysdeps/m68k/fpu/s_ccosh.c: New file. * sysdeps/m68k/fpu/s_ccoshf.c: New file. * sysdeps/m68k/fpu/s_ccoshl.c: New file. * sysdeps/m68k/fpu/s_csinh.c: New file. * sysdeps/m68k/fpu/s_csinhl.c: New file. * sysdeps/m68k/fpu/s_csinhf.c: New file. 1997-04-03 10:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/Makefile (dir-add.texi): Simplify. * libio/genops.c (_IO_flush_all_linebuffered): Don't flush on
-rw-r--r--ChangeLog280
-rw-r--r--Makefile8
-rw-r--r--PROJECTS3
-rw-r--r--db/btree/btree.h12
-rw-r--r--db/db.h1
-rw-r--r--db/db/db.c10
-rw-r--r--db/mpool.h8
-rw-r--r--db/mpool/mpool.c29
-rw-r--r--hurd/Makefile2
-rw-r--r--isomac.c2
-rw-r--r--libio/genops.c2
-rw-r--r--locale/localeinfo.h2
-rw-r--r--manual/Makefile8
-rw-r--r--manual/string.texi2
-rw-r--r--math/Makefile14
-rw-r--r--math/complex.h2
-rw-r--r--math/fenv.h114
-rw-r--r--math/libm-test.c635
-rw-r--r--math/math.h27
-rw-r--r--nis/nss_compat/compat-pwd.c2
-rw-r--r--nss/nss_db/db-XXX.c2
-rw-r--r--nss/nss_db/db-alias.c2
-rw-r--r--nss/nss_db/db-netgrp.c2
-rw-r--r--po/pl.po2451
-rwxr-xr-xrellns-sh27
-rw-r--r--resolv/mapv4v6addr.h4
-rw-r--r--resolv/nss_dns/dns-host.c8
-rw-r--r--stdio-common/tstscanf.c6
-rw-r--r--stdio-common/vfscanf.c30
-rw-r--r--string/swab.c3
-rw-r--r--sysdeps/generic/mathbits.h35
-rw-r--r--sysdeps/generic/memmem.c58
-rw-r--r--sysdeps/i386/fpu/fclrexcpt.c40
-rw-r--r--sysdeps/i386/fpu/fegetenv.c27
-rw-r--r--sysdeps/i386/fpu/fegetround.c31
-rw-r--r--sysdeps/i386/fpu/feholdexcpt.c36
-rw-r--r--sysdeps/i386/fpu/fenvbits.h91
-rw-r--r--sysdeps/i386/fpu/fesetenv.c76
-rw-r--r--sysdeps/i386/fpu/fesetround.c38
-rw-r--r--sysdeps/i386/fpu/feupdateenv.c39
-rw-r--r--sysdeps/i386/fpu/fgetexcptflg.c32
-rw-r--r--sysdeps/i386/fpu/fraiseexcpt.c75
-rw-r--r--sysdeps/i386/fpu/fsetexcptflg.c40
-rw-r--r--sysdeps/i386/fpu/ftestexcept.c32
-rw-r--r--sysdeps/i386/fpu/mathbits.h36
-rw-r--r--sysdeps/i386/huge_val.h6
-rw-r--r--sysdeps/ieee754/huge_val.h6
-rw-r--r--sysdeps/libm-i387/s_finite.S12
-rw-r--r--sysdeps/libm-i387/s_finitef.S12
-rw-r--r--sysdeps/libm-i387/s_finitel.S14
-rw-r--r--sysdeps/libm-i387/s_nearbyint.S23
-rw-r--r--sysdeps/libm-i387/s_nearbyintf.S23
-rw-r--r--sysdeps/libm-i387/s_nearbyintl.S23
-rw-r--r--sysdeps/libm-i387/s_trunc.S36
-rw-r--r--sysdeps/libm-i387/s_truncf.S36
-rw-r--r--sysdeps/libm-i387/s_truncl.S36
-rw-r--r--sysdeps/libm-ieee754/s_cacos.c41
-rw-r--r--sysdeps/libm-ieee754/s_cacosf.c37
-rw-r--r--sysdeps/libm-ieee754/s_cacosh.c88
-rw-r--r--sysdeps/libm-ieee754/s_cacoshf.c84
-rw-r--r--sysdeps/libm-ieee754/s_cacoshl.c84
-rw-r--r--sysdeps/libm-ieee754/s_cacosl.c37
-rw-r--r--sysdeps/libm-ieee754/s_casin.c66
-rw-r--r--sysdeps/libm-ieee754/s_casinf.c62
-rw-r--r--sysdeps/libm-ieee754/s_casinh.c84
-rw-r--r--sysdeps/libm-ieee754/s_casinhf.c80
-rw-r--r--sysdeps/libm-ieee754/s_casinhl.c80
-rw-r--r--sysdeps/libm-ieee754/s_casinl.c62
-rw-r--r--sysdeps/libm-ieee754/s_catan.c89
-rw-r--r--sysdeps/libm-ieee754/s_catanf.c85
-rw-r--r--sysdeps/libm-ieee754/s_catanh.c84
-rw-r--r--sysdeps/libm-ieee754/s_catanhf.c80
-rw-r--r--sysdeps/libm-ieee754/s_catanhl.c80
-rw-r--r--sysdeps/libm-ieee754/s_catanl.c85
-rw-r--r--sysdeps/libm-ieee754/s_ccos.c64
-rw-r--r--sysdeps/libm-ieee754/s_ccosf.c60
-rw-r--r--sysdeps/libm-ieee754/s_ccosh.c50
-rw-r--r--sysdeps/libm-ieee754/s_ccoshf.c52
-rw-r--r--sysdeps/libm-ieee754/s_ccoshl.c52
-rw-r--r--sysdeps/libm-ieee754/s_ccosl.c60
-rw-r--r--sysdeps/libm-ieee754/s_ceill.c14
-rw-r--r--sysdeps/libm-ieee754/s_cexpf.c23
-rw-r--r--sysdeps/libm-ieee754/s_cexpl.c25
-rw-r--r--sysdeps/libm-ieee754/s_clog.c14
-rw-r--r--sysdeps/libm-ieee754/s_clogf.c14
-rw-r--r--sysdeps/libm-ieee754/s_clogl.c14
-rw-r--r--sysdeps/libm-ieee754/s_cpow.c34
-rw-r--r--sysdeps/libm-ieee754/s_cpowf.c30
-rw-r--r--sysdeps/libm-ieee754/s_cpowl.c30
-rw-r--r--sysdeps/libm-ieee754/s_csin.c67
-rw-r--r--sysdeps/libm-ieee754/s_csinf.c63
-rw-r--r--sysdeps/libm-ieee754/s_csinh.c41
-rw-r--r--sysdeps/libm-ieee754/s_csinhf.c43
-rw-r--r--sysdeps/libm-ieee754/s_csinhl.c45
-rw-r--r--sysdeps/libm-ieee754/s_csinl.c63
-rw-r--r--sysdeps/libm-ieee754/s_csqrt.c111
-rw-r--r--sysdeps/libm-ieee754/s_csqrtf.c107
-rw-r--r--sysdeps/libm-ieee754/s_csqrtl.c107
-rw-r--r--sysdeps/libm-ieee754/s_ctan.c64
-rw-r--r--sysdeps/libm-ieee754/s_ctanf.c60
-rw-r--r--sysdeps/libm-ieee754/s_ctanh.c64
-rw-r--r--sysdeps/libm-ieee754/s_ctanhf.c60
-rw-r--r--sysdeps/libm-ieee754/s_ctanhl.c60
-rw-r--r--sysdeps/libm-ieee754/s_ctanl.c60
-rw-r--r--sysdeps/libm-ieee754/s_floorl.c14
-rw-r--r--sysdeps/libm-ieee754/s_nearbyint.c98
-rw-r--r--sysdeps/libm-ieee754/s_nearbyintf.c80
-rw-r--r--sysdeps/libm-ieee754/s_nearbyintl.c104
-rw-r--r--sysdeps/libm-ieee754/s_remquo.c32
-rw-r--r--sysdeps/libm-ieee754/s_remquof.c32
-rw-r--r--sysdeps/libm-ieee754/s_remquol.c38
-rw-r--r--sysdeps/libm-ieee754/s_round.c97
-rw-r--r--sysdeps/libm-ieee754/s_roundf.c73
-rw-r--r--sysdeps/libm-ieee754/s_roundl.c100
-rw-r--r--sysdeps/libm-ieee754/s_roundtol.c177
-rw-r--r--sysdeps/libm-ieee754/s_roundtoll.c179
-rw-r--r--sysdeps/m68k/fpu/__math.h8
-rw-r--r--sysdeps/m68k/fpu/s_ccosh.c119
-rw-r--r--sysdeps/m68k/fpu/s_ccoshf.c4
-rw-r--r--sysdeps/m68k/fpu/s_ccoshl.c4
-rw-r--r--sysdeps/m68k/fpu/s_cexp.c62
-rw-r--r--sysdeps/m68k/fpu/s_csinh.c128
-rw-r--r--sysdeps/m68k/fpu/s_csinhf.c4
-rw-r--r--sysdeps/m68k/fpu/s_csinhl.c4
-rw-r--r--sysdeps/m68k/fpu/s_rinttol.c31
-rw-r--r--sysdeps/m68k/fpu/s_rinttoll.c62
-rw-r--r--sysdeps/m68k/huge_val.h6
-rw-r--r--sysdeps/sparc/dl-machine.h9
-rw-r--r--sysdeps/sparc/elf/start.c2
-rw-r--r--sysdeps/sparc/fpu_control.h24
-rw-r--r--sysdeps/sparc/setjmp.S8
-rw-r--r--sysdeps/sparc/udiv_qrnnd.S2
-rw-r--r--sysdeps/stub/fclrexcpt.c27
-rw-r--r--sysdeps/stub/fegetenv.c27
-rw-r--r--sysdeps/stub/fegetround.c28
-rw-r--r--sysdeps/stub/feholdexcpt.c28
-rw-r--r--sysdeps/stub/fenvbits.h63
-rw-r--r--sysdeps/stub/fesetenv.c27
-rw-r--r--sysdeps/stub/fesetround.c28
-rw-r--r--sysdeps/stub/feupdateenv.c27
-rw-r--r--sysdeps/stub/fgetexcptflg.c27
-rw-r--r--sysdeps/stub/fraiseexcpt.c27
-rw-r--r--sysdeps/stub/fsetexcptflg.c27
-rw-r--r--sysdeps/stub/ftestexcept.c28
-rw-r--r--sysdeps/unix/sysv/linux/sparc/init-first.h52
-rw-r--r--sysdeps/unix/sysv/linux/sparc/signum.h3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/syscalls.list3
-rw-r--r--time/strftime.c4
-rw-r--r--time/strptime.c2
149 files changed, 8449 insertions, 950 deletions
diff --git a/ChangeLog b/ChangeLog
index 97aa6fcac3..a63c8c2dcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,281 @@
+1997-04-13 01:06 Ulrich Drepper <drepper@cygnus.com>
+
+ * isomac.c: Improve messages.
+
+ * math/Makefile (libm-calls): Add s_nearbyint, s_catan, s_casin,
+ s_ccos, s_csin, s_ctan, s_ctanh, s_cacos, s_casinh, s_cacosh,
+ s_catanh, s_csqrt, and s_cpow.
+ * math/libm-test.c: New functions ccos_test, cacos_test, cacosh_test,
+ casin_test, casinh_test, catan_test, catanh_test, ctanh_test,
+ csqrt_test, cpow_test, rint_test.
+ * math/math.h: Include new header mathbits.h which defines some
+ more (system dependent) types and some macros.
+ (isfinite): Use __finite instead of fpclassify.
+ * sysdeps/generic/mathbits.h: New file.
+ * sysdeps/i386/fpu/mathbits.h: New file.
+ * sysdeps/i386/huge_val.h: Don't define INFINITY.
+ * sysdeps/ieee754/huge_val.h: Likewise.
+ * sysdeps/m68k/huge_val.h: Likewise.
+
+ * sysdeps/i386/fpu/fenvbits.h: Define FE_NOMASK_ENV.
+ * sysdeps/i386/fpu/fesetenv.c: Handle FE_NOMASK_ENV.
+
+ * math/complex.h (_Imaginary_I): Define correctly. I misread the
+ standard first.
+
+ * sysdeps/libm-i387/s_finite.S: Optimized rewrite.
+ * sysdeps/libm-i387/s_finitef.S: Likewise.
+ * sysdeps/libm-i387/s_finitel.S: Likewise.
+ Provided by Joe Keane <jgk@jgk.org>.
+
+ * sysdeps/libm-i387/s_nearbyint.S: New file.
+ * sysdeps/libm-i387/s_nearbyintf.S: New file.
+ * sysdeps/libm-i387/s_nearbyintl.S: New file.
+ * sysdeps/libm-ieee754/s_nearbyint.S: New file.
+ * sysdeps/libm-ieee754/s_nearbyintf.S: New file.
+ * sysdeps/libm-ieee754/s_nearbyintl.S: New file.
+
+ * sysdeps/libm-ieee754/s_cacos.c: New file.
+ * sysdeps/libm-ieee754/s_cacosf.c: New file.
+ * sysdeps/libm-ieee754/s_cacosl.c: New file.
+ * sysdeps/libm-ieee754/s_cacosh.c: New file.
+ * sysdeps/libm-ieee754/s_cacoshf.c: New file.
+ * sysdeps/libm-ieee754/s_cacoshl.c: New file.
+ * sysdeps/libm-ieee754/s_casin.c: New file.
+ * sysdeps/libm-ieee754/s_casinf.c: New file.
+ * sysdeps/libm-ieee754/s_casinl.c: New file.
+ * sysdeps/libm-ieee754/s_casinh.c: New file.
+ * sysdeps/libm-ieee754/s_casinhf.c: New file.
+ * sysdeps/libm-ieee754/s_casinhl.c: New file.
+ * sysdeps/libm-ieee754/s_catan.c: New file.
+ * sysdeps/libm-ieee754/s_catanf.c: New file.
+ * sysdeps/libm-ieee754/s_catanl.c: New file.
+ * sysdeps/libm-ieee754/s_catanh.c: New file.
+ * sysdeps/libm-ieee754/s_catanhf.c: New file.
+ * sysdeps/libm-ieee754/s_catanhl.c: New file.
+ * sysdeps/libm-ieee754/s_ccos.c: New file.
+ * sysdeps/libm-ieee754/s_ccosf.c: New file.
+ * sysdeps/libm-ieee754/s_ccosl.c: New file.
+ * sysdeps/libm-ieee754/s_cpow.c: New file.
+ * sysdeps/libm-ieee754/s_cpowf.c: New file.
+ * sysdeps/libm-ieee754/s_cpowl.c: New file.
+ * sysdeps/libm-ieee754/s_csin.c: New file.
+ * sysdeps/libm-ieee754/s_csinf.c: New file.
+ * sysdeps/libm-ieee754/s_csinl.c: New file.
+ * sysdeps/libm-ieee754/s_csqrt.c: New file.
+ * sysdeps/libm-ieee754/s_csqrtf.c: New file.
+ * sysdeps/libm-ieee754/s_csqrtl.c: New file.
+ * sysdeps/libm-ieee754/s_ctan.c: New file.
+ * sysdeps/libm-ieee754/s_ctanf.c: New file.
+ * sysdeps/libm-ieee754/s_ctanl.c: New file.
+ * sysdeps/libm-ieee754/s_ctanh.c: New file.
+ * sysdeps/libm-ieee754/s_ctanhf.c: New file.
+ * sysdeps/libm-ieee754/s_ctanhl.c: New file.
+
+ * time/strftime.c (memset_space): Increment pointer.
+ * time/strptime.c: Interpret year number 00-59 as 2000--2059.
+ Patches by Karl Heuer <kwzh@gnu.ai.mit.edu>.
+
+1997-04-11 11:57 Miguel de Icaza <miguel@nuclecu.unam.mx>
+
+ * sysdeps/unix/sysv/linux/sparc/syscalls.list: Remove fork,
+ pipe, syscall.
+
+1997-04-05 00:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/libm-ieee754/s_remquo.c: Change algorithm, although
+ probably still wrong.
+ * sysdeps/libm-ieee754/s_remquof.c: Likewise.
+ * sysdeps/libm-ieee754/s_remquol.c: Likewise.
+
+ * math/libm-test.c (remquo_test): Corrected.
+
+1997-04-11 00:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/m68k/fpu/__math.h (__rinttol, rinttol): New inline.
+ * sysdeps/m68k/fpu/s_rinttol.c: New file.
+ * sysdeps/m68k/fpu/s_rinttoll.c: New file.
+
+ * math/libm-test.c (remquo_test): Use check_long to test the
+ quotient.
+ (cbrt_test): Add epsilons for long double.
+
+1997-04-10 18:48 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * locale/localeinfo.h: Update declaration of _nl_current.
+
+1997-04-11 11:27 Ulrich Drepper <drepper@cygnus.com>
+
+ * rellnsh-sh: Use explicitely /bin/pwd to find the external program.
+
+ * math/Makefile (headers): Add fenv.h and fenvbits.h.
+ (libm-support): Add s_rountol, s_roundtoll, fclrexcpt, fgetexcptflg,
+ fraiseexcpt, fsetexcptflg, ftestexcept, fegetround, fesetround,
+ fegetenv, feholdexcpt, fesetenv, feupdateenv.
+ (libm-calls): Add s_round.
+ * math/fenv.h: New file.
+ * math/libm-test.c: Correct tests for s_rinttol and s_rinttoll.
+ Add roundtol_check and roundtoll_check.
+ * math/math.h: Pretty printing.
+ * sysdeps/i386/fpu/fclrexcpt.c: New file.
+ * sysdeps/i386/fpu/fegetenv.c: New file.
+ * sysdeps/i386/fpu/fegetround.c: New file.
+ * sysdeps/i386/fpu/feholdexcpt.c: New file.
+ * sysdeps/i386/fpu/fenvbits.h: New file.
+ * sysdeps/i386/fpu/fesetenv.c: New file.
+ * sysdeps/i386/fpu/fesetround.c: New file.
+ * sysdeps/i386/fpu/fgetexcptflg.c: New file.
+ * sysdeps/i386/fpu/fraiseexcpt.c: New file.
+ * sysdeps/i386/fpu/fsetexcptflg.c: New file.
+ * sysdeps/i386/fpu/ftestexcept.c: New file.
+ * sysdeps/stub/fclrexcpt.c: New file.
+ * sysdeps/stub/fegetenv.c: New file.
+ * sysdeps/stub/fegetround.c: New file.
+ * sysdeps/stub/feholdexcpt.c: New file.
+ * sysdeps/stub/fenvbits.h: New file.
+ * sysdeps/stub/fesetenv.c: New file.
+ * sysdeps/stub/fesetround.c: New file.
+ * sysdeps/stub/fgetexcptflg.c: New file.
+ * sysdeps/stub/fraiseexcpt.c: New file.
+ * sysdeps/stub/fsetexcptflg.c: New file.
+ * sysdeps/stub/ftestexcept.c: New file.
+
+ * sysdeps/libm-i387/s_trunc.S: New file.
+ * sysdeps/libm-i387/s_truncf.S: New file.
+ * sysdeps/libm-i387/s_truncl.S: New file.
+
+ * sysdeps/libm-ieee754/s_round.c: New file.
+ * sysdeps/libm-ieee754/s_roundf.c: New file.
+ * sysdeps/libm-ieee754/s_roundl.c: New file.
+
+ * sysdeps/libm-ieee754/s_ccosh.c: Rewritten to use fpclassify.
+ * 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_clog.c: Likewise.
+ * sysdeps/libm-ieee754/s_clogf.c: Likewise.
+ * sysdeps/libm-ieee754/s_clogl.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_ceill.c: Corrected. The mantissa has only
+ 63 bits.
+ * sysdeps/libm-ieee754/s_floorl.c: Likewise.
+
+ * po/pl.po: Updated.
+
+ * string/swab.c: Correctly handle array of odd length.
+
+ * sysdeps/generic/memmem.c: Update copyright.
+
+1997-04-10 20:22 Ulrich Drepper <drepper@cygnus.com>
+
+ * hurd/Makefile (sunrpc-headers): Add clnt.h.
+ Proposed by Thomas Bushnell <thomas@gnu.ai.mit.edu>.
+
+1997-04-09 14:21 Miguel de Icaza <miguel@nuclecu.unam.mx>
+
+ * sysdeps/sparc/dl-machine.h: Bug fix: I was not loading
+ the proper value from the GOT. Pass argument block to
+ init function.
+
+ * sysdeps/sparc/elf/start.c: Call atexit (_fini) after calling
+ _init ().
+
+ * sysdeps/sparc/fpu_control.h: Fix the FPU constants. I got them
+ wrong the first time.
+
+ * sysdeps/sparc/setjmp.S: PIC code was clobbering a callee saved
+ register.
+
+ * sysdeps/sparc/udiv_qrnnd.S: Add type @function.
+
+ * sysdeps/unix/sysv/linux/sparc/init-first.h: Linux/SPARC specific
+ SYSDEP_CALL_INIT.
+
+ * sysdeps/unix/sysv/linux/sparc/signum.h: Remove definition for
+ NSIG and duplicated SIGIOT.
+
+1997-04-05 00:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/libm-ieee754/s_remquo.c: Change algorithm, although
+ probably still wrong.
+ * sysdeps/libm-ieee754/s_remquof.c: Likewise.
+ * sysdeps/libm-ieee754/s_remquol.c: Likewise.
+
+ * math/libm-test.c (remquo_test): Corrected.
+
+1997-04-03 18:35 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * Makefile (parent-tests): New target to run the tests to that
+ they are executed even if some subdir tests have failed.
+ (tests): Depend on parent-tests instead of running the tests
+ directly.
+
+1997-04-03 12:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ Clean up name space pollution in libnss_*.so:
+ * nis/nss_compat/compat-pwd.c, resolv/mapv4v6addr.h,
+ resolv/nss_dns/dns-host.c: Replace bzero by memset, bcopy by
+ memcpy and bcmp by memcmp to clean up namespace.
+ * nss/nss_db/db-XXX.c (internal_setent): Use __dbopen instead of
+ dbopen.
+ * nss/nss_db/db-alias.c (internal_setent): Likewise.
+ * nss/nss_db/db-netgrp.c (_nss_db_setnetgrent): Likewise.
+ * db/db/db.c [_LIBC]: Define __dbopen instead of dbopen and make
+ the latter a weak alias.
+ * db/db.h: Declare __dbopen.
+ * db/btree/btree.h [_LIBC]: Prepend __ to all mpool functions.
+ * db/mpool/mpool.c [_LIBC]: Define all external functions with __
+ prefix and make the old names weak aliases.
+ * db/mpool.h: Declare the new internal names.
+
+1997-04-04 23:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * stdio-common/vfscanf.c: Fix scanning of hexadecimal fp number.
+ * stdio-common/tstscanf.c: Add test case for this.
+
+1997-04-04 17:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * math/libm-test.c: Fix more typos.
+
+1997-04-03 17:15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * math/libm-test.c (csinh_test): Fix test names.
+ (ccosh_test): Likewise.
+
+ * sysdeps/libm-ieee754/s_csinh.c: Use sinh function instead of
+ computing it directly.
+ * sysdeps/libm-ieee754/s_csinhf.c: Likewise.
+ * sysdeps/libm-ieee754/s_csinhl.c: Likewise.
+
+ * sysdeps/libm-ieee754/s_ccosh.c: Use cosh function instead of
+ computing it directly.
+ * sysdeps/libm-ieee754/s_ccoshf.c: Likewise.
+ * sysdeps/libm-ieee754/s_ccoshl.c: Likewise.
+
+ * sysdeps/libm-ieee754/s_cexp.c: Use internal exp function instead
+ of wrapper.
+ * sysdeps/libm-ieee754/s_cexpf.c: Likewise.
+ * sysdeps/libm-ieee754/s_cexpl.c: Likewise.
+ * sysdeps/m68k/fpu/s_cexp.c: Likewise. Correct handling of
+ special values. Avoid use of fsincos if all that is needed is the
+ quadrant.
+
+ * sysdeps/m68k/fpu/s_ccosh.c: New file.
+ * sysdeps/m68k/fpu/s_ccoshf.c: New file.
+ * sysdeps/m68k/fpu/s_ccoshl.c: New file.
+ * sysdeps/m68k/fpu/s_csinh.c: New file.
+ * sysdeps/m68k/fpu/s_csinhl.c: New file.
+ * sysdeps/m68k/fpu/s_csinhf.c: New file.
+
+1997-04-03 10:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * manual/Makefile (dir-add.texi): Simplify.
+
1997-04-09 01:24 Ulrich Drepper <drepper@cygnus.com>
* rellns-sh: Rewrite to work also in presence of symlinks.
@@ -38,7 +316,7 @@
1997-04-08 07:19 H.J. Lu <hjl@gnu.ai.mit.edu>
- * libio/genops.c (_IO_flush_all_linebuffered): don't flush on
+ * libio/genops.c (_IO_flush_all_linebuffered): Don't flush on
a read-only stream.
1997-04-09 01:19 Ulrich Drepper <drepper@cygnus.com>
diff --git a/Makefile b/Makefile
index f441d90896..a2509248d5 100644
--- a/Makefile
+++ b/Makefile
@@ -280,10 +280,12 @@ parent_echo-distinfo:
$(addprefix +nodist+,$(generated))
+.PHONY: parent-tests
+tests: parent-tests
+
# Run a test on the header files we use.
-tests: $(objpfx)isomac
- $(objpfx)./isomac '$(CC)' '$(+sysdep-includes)' \
- >$(common-objpfx)isomac.out
+parent-tests: $(objpfx)isomac
+ $(dir $<)$(notdir $<) '$(CC)' '$(+sysdep-includes)' > $<.out
$(objpfx)isomac: isomac.c
$(native-compile)
diff --git a/PROJECTS b/PROJECTS
index ea876c1cf4..85cd22e060 100644
--- a/PROJECTS
+++ b/PROJECTS
@@ -58,9 +58,6 @@ contact <bug-glibc@prep.ai.mit.edu>
- exp2
- nearbyint
- - round
- - roundtol
- - roundtoll
each with float, double, and long double arguments. Writing these
functions should be possible when following the implementation of
diff --git a/db/btree/btree.h b/db/btree/btree.h
index ab4c5b5ec4..45f7c94ed4 100644
--- a/db/btree/btree.h
+++ b/db/btree/btree.h
@@ -43,6 +43,18 @@
#include <mpool.h>
+#ifdef _LIBC
+/* In the GNU C library we must not pollute the namespace because libdb is
+ needed by libnss_db. */
+#define mpool_open __mpool_open
+#define mpool_filter __mpool_filter
+#define mpool_new __mpool_new
+#define mpool_get __mpool_get
+#define mpool_put __mpool_put
+#define mpool_sync __mpool_sync
+#define mpool_close __mpool_close
+#endif
+
#define DEFMINKEYPAGE (2) /* Minimum keys per page */
#define MINCACHE (5) /* Minimum cached pages */
#define MINPSIZE (512) /* Minimum page size */
diff --git a/db/db.h b/db/db.h
index 13c7495d64..8f1a9de9e2 100644
--- a/db/db.h
+++ b/db/db.h
@@ -224,6 +224,7 @@ typedef struct {
#endif
__BEGIN_DECLS
+DB *__dbopen __P((const char *, int, int, DBTYPE, const void *));
DB *dbopen __P((const char *, int, int, DBTYPE, const void *));
#ifdef __DBINTERFACE_PRIVATE
diff --git a/db/db/db.c b/db/db/db.c
index c93b36ff75..49f6124580 100644
--- a/db/db/db.c
+++ b/db/db/db.c
@@ -44,6 +44,12 @@ static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94";
#include <db.h>
+#ifdef _LIBC
+/* In the GNU C library we must not pollute the namespace, because libdb
+ is needed by libnss_db. */
+#define dbopen __dbopen
+#endif
+
DB *
dbopen(fname, flags, mode, type, openinfo)
const char *fname;
@@ -72,6 +78,10 @@ dbopen(fname, flags, mode, type, openinfo)
errno = EINVAL;
return (NULL);
}
+#ifdef _LIBC
+#undef dbopen
+weak_alias (__dbopen, dbopen)
+#endif
static int
__dberr __P((void))
diff --git a/db/mpool.h b/db/mpool.h
index 40d1022309..e533072a65 100644
--- a/db/mpool.h
+++ b/db/mpool.h
@@ -85,13 +85,21 @@ typedef struct MPOOL {
} MPOOL;
__BEGIN_DECLS
+MPOOL *__mpool_open __P((void *, int, pgno_t, pgno_t));
MPOOL *mpool_open __P((void *, int, pgno_t, pgno_t));
+void __mpool_filter __P((MPOOL *, void (*)(void *, pgno_t, void *),
+ void (*)(void *, pgno_t, void *), void *));
void mpool_filter __P((MPOOL *, void (*)(void *, pgno_t, void *),
void (*)(void *, pgno_t, void *), void *));
+void *__mpool_new __P((MPOOL *, pgno_t *));
void *mpool_new __P((MPOOL *, pgno_t *));
+void *__mpool_get __P((MPOOL *, pgno_t, u_int));
void *mpool_get __P((MPOOL *, pgno_t, u_int));
+int __mpool_put __P((MPOOL *, void *, u_int));
int mpool_put __P((MPOOL *, void *, u_int));
+int __mpool_sync __P((MPOOL *));
int mpool_sync __P((MPOOL *));
+int __mpool_close __P((MPOOL *));
int mpool_close __P((MPOOL *));
#ifdef STATISTICS
void mpool_stat __P((MPOOL *));
diff --git a/db/mpool/mpool.c b/db/mpool/mpool.c
index 9956aca87b..7ced76fd4f 100644
--- a/db/mpool/mpool.c
+++ b/db/mpool/mpool.c
@@ -50,6 +50,18 @@ static char sccsid[] = "@(#)mpool.c 8.5 (Berkeley) 7/26/94";
#define __MPOOLINTERFACE_PRIVATE
#include <mpool.h>
+#ifdef _LIBC
+/* In the GNU C library we must not pollute the namespace because libdb is
+ needed by libnss_db. */
+#define mpool_open __mpool_open
+#define mpool_filter __mpool_filter
+#define mpool_new __mpool_new
+#define mpool_get __mpool_get
+#define mpool_put __mpool_put
+#define mpool_sync __mpool_sync
+#define mpool_close __mpool_close
+#endif
+
static BKT *mpool_bkt __P((MPOOL *));
static BKT *mpool_look __P((MPOOL *, pgno_t));
static int mpool_write __P((MPOOL *, BKT *));
@@ -301,6 +313,23 @@ mpool_sync(mp)
return (fsync(mp->fd) ? RET_ERROR : RET_SUCCESS);
}
+#ifdef _LIBC
+#undef mpool_open
+#undef mpool_filter
+#undef mpool_new
+#undef mpool_get
+#undef mpool_put
+#undef mpool_close
+#undef mpool_sync
+weak_alias (__mpool_open, mpool_open)
+weak_alias (__mpool_filter, mpool_filter)
+weak_alias (__mpool_new, mpool_new)
+weak_alias (__mpool_get, mpool_get)
+weak_alias (__mpool_put, mpool_put)
+weak_alias (__mpool_close, mpool_close)
+weak_alias (__mpool_sync, mpool_sync)
+#endif
+
/*
* mpool_bkt
* Get a page from the cache (or create one).
diff --git a/hurd/Makefile b/hurd/Makefile
index deafb1ec3d..a42d148675 100644
--- a/hurd/Makefile
+++ b/hurd/Makefile
@@ -73,7 +73,7 @@ include ../Rules
# from $(subdirs), and this rule arranges for the headers in question
# to get installed.
sunrpc-headers = netdb.h pmap_prot.h xdr.h types.h auth.h \
- rpc_msg.h auth_unix.h
+ rpc_msg.h auth_unix.h clnt.h
installed-sunrpc-headers = $(addprefix $(inst_includedir)/rpc/, \
$(sunrpc-headers))
install-headers-nosubdir: $(installed-sunrpc-headers)
diff --git a/isomac.c b/isomac.c
index 11d0ecdcb7..074d11f823 100644
--- a/isomac.c
+++ b/isomac.c
@@ -207,6 +207,8 @@ main (int argc, char *argv[])
/* First get list of symbols which are defined by the compiler. */
ignore_list = get_null_defines ();
+ fputs ("Tested files:\n", stdout);
+
for (h = 0; h < NUMBER_OF_HEADERS; ++h)
{
char file_name[HEADER_MAX];
diff --git a/libio/genops.c b/libio/genops.c
index db7fb180a3..c08598686d 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -615,7 +615,7 @@ DEFUN_VOID(_IO_flush_all_linebuffered)
{
_IO_FILE *fp;
for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
- if (fp->_flags & _IO_LINE_BUF)
+ if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF)
_IO_OVERFLOW (fp, EOF);
}
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
index c029f63480..b062200b3b 100644
--- a/locale/localeinfo.h
+++ b/locale/localeinfo.h
@@ -104,7 +104,7 @@ extern struct locale_data *_nl_current_##category;
extern const char *const _nl_category_names[LC_ALL + 1];
extern const size_t _nl_category_name_sizes[LC_ALL + 1];
-extern struct locale_data * *const _nl_current[LC_ALL];
+extern struct locale_data * *const _nl_current[LC_ALL + 1];
/* Name of the standard locale. */
extern const char _nl_C_name[];
diff --git a/manual/Makefile b/manual/Makefile
index fafa7e77d9..c99f4974a8 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -67,12 +67,8 @@ stamp-summary: summary.awk $(chapters) $(chapters-incl)
# access to the documentation of the function, variables, and other
# definitions.
dir-add.texi: xtract-typefun.awk $(chapters)
- if test -n "$(chapters)"; then \
- (for i in $(chapters); do \
- $(GAWK) -f $< < $$i; \
- done) | sort > $@.new; \
- ./move-if-change $@.new $@; \
- fi
+ $(GAWK) -f $^ | sort > $@.new;
+ mv -f $@.new $@
# Generate Texinfo files from the C source for the example programs.
%.c.texi: examples/%.c
diff --git a/manual/string.texi b/manual/string.texi
index efcc23e59a..9d242b7c19 100644
--- a/manual/string.texi
+++ b/manual/string.texi
@@ -881,7 +881,7 @@ strstr ("hello, world", "wo")
@comment string.h
@comment GNU
-@deftypefun {void *} memmem (const void *@var{needle}, size_t @var{needle-len},@*const void *@var{haystack}, size_t @var{haystack-len})
+@deftypefun {void *} memmem (const void *@var{haystack}, size_t @var{haystack-len},@*const void *@var{needle}, size_t @var{needle-len})
This is like @code{strstr}, but @var{needle} and @var{haystack} are byte
arrays rather than null-terminated strings. @var{needle-len} is the
length of @var{needle} and @var{haystack-len} is the length of
diff --git a/math/Makefile b/math/Makefile
index 64803a345c..86418b003a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -22,7 +22,8 @@ subdir := math
# Installed header files.
headers := math.h mathcalls.h __math.h huge_val.h nan.h \
- fpu_control.h complex.h cmathcalls.h
+ fpu_control.h complex.h cmathcalls.h fenv.h \
+ fenvbits.h
# Internal header files.
distribute := math_private.h machine/asm.h machine/endian.h
@@ -36,7 +37,10 @@ extra-libs := libm
extra-libs-others = $(extra-libs)
libm-support = k_standard s_lib_version s_matherr s_signgam \
- s_rinttol s_rinttoll
+ s_rinttol s_rinttoll s_roundtol s_roundtoll \
+ fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \
+ ftestexcept fegetround fesetround fegetenv feholdexcpt \
+ fesetenv feupdateenv
libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod \
e_hypot e_j0 e_j1 e_jn e_lgamma_r e_log e_log10 e_pow \
e_rem_pio2 e_remainder e_scalb e_sinh e_sqrt k_cos \
@@ -49,8 +53,10 @@ libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod \
w_gamma_r w_hypot w_j0 w_j1 w_jn w_lgamma w_lgamma_r \
w_log w_log10 w_pow w_remainder w_scalb w_sinh w_sqrt \
s_signbit s_fpclassify s_fmax s_fmin s_fdim s_nan s_trunc \
- s_remquo s_log2 s_exp2 \
- conj cimag creal cabs carg s_cexp s_csinh s_ccosh s_clog
+ s_remquo s_log2 s_exp2 s_round s_nearbyint \
+ conj cimag creal cabs carg s_cexp s_csinh s_ccosh s_clog \
+ s_catan s_casin s_ccos s_csin s_ctan s_ctanh s_cacos \
+ s_casinh s_cacosh s_catanh s_csqrt s_cpow
libm-routines = $(libm-support) $(libm-calls) \
$(patsubst %_rf,%f_r,$(libm-calls:=f)) \
$(long-m-$(long-double-fcts))
diff --git a/math/complex.h b/math/complex.h
index 42143531dc..938823b5fb 100644
--- a/math/complex.h
+++ b/math/complex.h
@@ -38,7 +38,7 @@ __BEGIN_DECLS
/* Narrowest imaginary unit. This depends on the floating-point
evaluation method.
XXX This probably has to go into a gcc related file. */
-#define _Imaginary_I (DBL_EPSISON * 1.0i)
+#define _Imaginary_I (1.0iF)
/* Another more descriptive name is `I'. */
#undef I
diff --git a/math/fenv.h b/math/fenv.h
new file mode 100644
index 0000000000..c9a8a5c94b
--- /dev/null
+++ b/math/fenv.h
@@ -0,0 +1,114 @@
+/* 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.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * ISO C 9X 7.6: Floating-point environment <fenv.h>
+ */
+
+#ifndef _FENV_H
+
+#define __FENV_H 1
+#include <features.h>
+
+/* Get the architecture dependend definitions. The following definitions
+ are expected to be done:
+
+ fenv_t type for object representing an entire floating-point
+ environment
+
+ FE_DFL_ENV macro of type pointer to fenv_t to be used as the argument
+ to functions taking an argument of type fenv_t; in this
+ case the default environment will be used
+
+ fexcept_t type for object representing the floating-point exception
+ flags including status associated with the flags
+
+ The following macros are defined iff the implementation supports this
+ kind of exception.
+ FE_INEXACT inxeact result
+ FE_DIVBYZERO devision by zero
+ FE_UNDERFLOW result not representable due to underflow
+ FE_OVERFLOW result not representable due to overflow
+ FE_INVALID invalid operation
+
+ FE_ALL_EXCEPT bitwise OR of all supported exceptions
+
+ The next macros are defined iff the appropriate rounding mode is
+ supported by the implementation.
+ FE_TONEAREST round to nearest
+ FE_UPWARD round toward +Inf
+ FE_DOWNWARD round toward -Inf
+ FE_TOWARDZERO round toward 0
+*/
+#include <fenvbits.h>
+
+__BEGIN_DECLS
+
+/* Floating-point exception handling. */
+
+/* Clear the supported exceptions represented by EXCEPTS. */
+extern void feclearexcept __P ((int __excepts));
+
+/* Store implementation-defined representation of the exception flags
+ indicated by EXCEPTS in the object pointed to by FLAGP. */
+extern void fegetexceptflag __P ((fexcept_t *__flagp, int __excepts));
+
+/* Raise the supported exceptions represented by EXCEPTS. */
+extern void feraiseexcept __P ((int __excepts));
+
+/* Set complete status for exceptions inidicated by EXCEPTS according to
+ the representation in the object pointed to by FLAGP. */
+extern void fesetexceptflag __P ((__const fexcept_t *__flagp, int __excepts));
+
+/* Determine which of subset of the exceptions specified by EXCEPTS are
+ currently set. */
+extern int fetestexcept __P ((int __excepts));
+
+
+/* Rounding control. */
+
+/* Get current rounding direction. */
+extern int fegetround __P ((void));
+
+/* Establish the rounding direction represented by ROUND. */
+extern int fesetround __P ((int __round));
+
+
+/* Floating-point environment. */
+
+/* Store the current floating-point environment in the object pointed
+ to by ENVP. */
+extern void fegetenv __P ((fenv_t *__envp));
+
+/* Save the current environment in the object pointed to by ENVP, clear
+ exception flags and install a non-stop mode (if available) for all
+ exceptions. */
+extern int feholdexcept __P ((fenv_t *__envp));
+
+/* Establish the floating-point environment represented by the object
+ pointed to by ENVP. */
+extern void fesetenv __P ((__const fenv_t *__envp));
+
+/* Save current exceptions in temporary storage, install environment
+ represented by object pointed to by ENVP and raise exceptions
+ according to saved exceptions. */
+extern void feupdateenv __P ((__const fenv_t *__envp));
+
+__END_DECLS
+
+#endif /* fenv.h */
diff --git a/math/libm-test.c b/math/libm-test.c
index 5171d0fc5e..356cc91a16 100644
--- a/math/libm-test.c
+++ b/math/libm-test.c
@@ -633,8 +633,9 @@ cbrt_test (void)
check_isinfn ("cbrt (-inf) == -inf", FUNC(cbrt) (minus_infty));
check_isnan ("cbrt (NaN) == NaN", FUNC(cbrt) (nan_value));
- check ("cbrt (8) == 2", FUNC(cbrt) (8), 2);
- check ("cbrt (-27) == -3", FUNC(cbrt) (-27.0), -3.0);
+ check_eps ("cbrt (8) == 2", FUNC(cbrt) (8), 2, CHOOSE (5e-17L, 0, 0));
+ check_eps ("cbrt (-27) == -3", FUNC(cbrt) (-27.0), -3.0,
+ CHOOSE (3e-16L, 0, 0));
}
@@ -1573,19 +1574,19 @@ remquo_test (void)
result = FUNC(remquo) (1.625, 1.0, &quo);
check ("remquo(1.625, 1.0, &x) == -0.375", result, -0.375);
- check ("remquo(1.625, 1.0, &x) puts 1 in x", quo, 1);
+ check_long ("remquo(1.625, 1.0, &x) puts 1 in x", quo, 1);
result = FUNC(remquo) (-1.625, 1.0, &quo);
check ("remquo(-1.625, 1.0, &x) == 0.375", result, 0.375);
- check ("remquo(-1.625, 1.0, &x) puts -1 in x", quo, -1);
+ check_long ("remquo(-1.625, 1.0, &x) puts -1 in x", quo, -1);
result = FUNC(remquo) (1.625, -1.0, &quo);
- check ("remquo(1.125, -1.0, &x) == 0.125", result, 0.125);
- check ("remquo(1.125, -1.0, &x) puts -1 in x", quo, -1);
+ check ("remquo(1.625, -1.0, &x) == -0.375", result, -0.375);
+ check_long ("remquo(1.625, -1.0, &x) puts -1 in x", quo, -1);
result = FUNC(remquo) (-1.625, -1.0, &quo);
- check ("remquo(-1.125, -1.0, &x) == 0.125", result, 0.125);
- check ("remquo(-1.125, -1.0, &x) puts 1 in x", quo, 1);
+ check ("remquo(-1.625, -1.0, &x) == 0.375", result, 0.375);
+ check_long ("remquo(-1.625, -1.0, &x) puts 1 in x", quo, 1);
}
@@ -1667,10 +1668,10 @@ cexp_test (void)
result = FUNC(cexp) (BUILD_COMPLEX (nan_value, 1.0));
check_isnan ("real(cexp(NaN + 1i)) = NaN", __real__ result);
check_isnan ("imag(cexp(NaN + 1i)) = NaN", __imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (nan_value, 1.0));
+ result = FUNC(cexp) (BUILD_COMPLEX (nan_value, plus_infty));
check_isnan ("real(cexp(NaN + i inf)) = NaN", __real__ result);
check_isnan ("imag(cexp(NaN + i inf)) = NaN", __imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (nan_value, 1.0));
+ result = FUNC(cexp) (BUILD_COMPLEX (nan_value, nan_value));
check_isnan ("real(cexp(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(cexp(NaN + i NaN)) = NaN", __imag__ result);
@@ -1702,16 +1703,16 @@ csinh_test (void)
check ("imag(csinh(-0 - 0i)) = -0", __imag__ result, minus_zero);
result = FUNC(csinh) (BUILD_COMPLEX (0.0, plus_infty));
- check ("real(csinh(0 + i Inf)) = 0", FUNC(fabs) (__real__ result), 0);
+ check ("real(csinh(0 + i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(0 + i Inf)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, plus_infty));
- check ("real(csinh(-0 + i Inf)) = -0", FUNC(fabs) (__real__ result), 0);
+ check ("real(csinh(-0 + i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(-0 + i Inf)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (0.0, minus_infty));
- check ("real(csinh(0 - i Inf)) = 0", FUNC(fabs) (__real__ result), 0);
+ check ("real(csinh(0 - i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(0 - i Inf)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, minus_infty));
- check ("real(csinh(-0 - i Inf)) = -0", FUNC(fabs) (__real__ result), 0);
+ check ("real(csinh(-0 - i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(-0 - i Inf)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, 0.0));
@@ -1740,7 +1741,7 @@ csinh_test (void)
FUNC(fabs) (__real__ result));
check_isnan ("imag(csinh(Inf - i Inf)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, minus_infty));
- check_isinfp ("real(csinh(-Inf - i Inf)) = -Inf",
+ check_isinfp ("real(csinh(-Inf - i Inf)) = +-Inf",
FUNC(fabs) (__real__ result));
check_isnan ("imag(csinh(-Inf - i Inf)) = NaN", __imag__ result);
@@ -1771,10 +1772,10 @@ csinh_test (void)
check_isnan ("imag(csinh(-6.75 - i Inf)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (0.0, nan_value));
- check ("real(csinh(0 + i NaN)) = 0", FUNC(fabs) (__real__ result), 0);
+ check ("real(csinh(0 + i NaN)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(0 + i NaN)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, nan_value));
- check ("real(csinh(-0 + i NaN)) = -0", FUNC(fabs) (__real__ result), 0);
+ check ("real(csinh(-0 + i NaN)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(-0 + i NaN)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, nan_value));
@@ -1784,7 +1785,7 @@ csinh_test (void)
result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, nan_value));
check_isinfp ("real(csinh(-Inf + i NaN)) = +-Inf",
FUNC(fabs) (__real__ result));
- check_isnan ("imag(csinh(-0 + i NaN)) = NaN", __imag__ result);
+ check_isnan ("imag(csinh(-Inf + i NaN)) = NaN", __imag__ result);
result = FUNC(csinh) (BUILD_COMPLEX (9.0, nan_value));
check_isnan ("real(csinh(9.0 + i NaN)) = NaN", __real__ result);
@@ -1795,10 +1796,10 @@ csinh_test (void)
result = FUNC(csinh) (BUILD_COMPLEX (nan_value, 0.0));
check_isnan ("real(csinh(NaN + i0)) = NaN", __real__ result);
- check ("imag(csinh(NaN + i0)) = NaN", __imag__ result, 0.0);
+ check ("imag(csinh(NaN + i0)) = 0", __imag__ result, 0.0);
result = FUNC(csinh) (BUILD_COMPLEX (nan_value, minus_zero));
check_isnan ("real(csinh(NaN - i0)) = NaN", __real__ result);
- check ("imag(csinh(NaN - i0)) = NaN", __imag__ result, minus_zero);
+ check ("imag(csinh(NaN - i0)) = -0", __imag__ result, minus_zero);
result = FUNC(csinh) (BUILD_COMPLEX (nan_value, 10.0));
check_isnan ("real(csinh(NaN + i10)) = NaN", __real__ result);
@@ -1821,21 +1822,152 @@ csinh_test (void)
static void
+ccos_test (void)
+{
+ __complex__ MATHTYPE result;
+
+ result = FUNC(ccos) (BUILD_COMPLEX (0.0, 0.0));
+ check ("real(ccos(0 + 0i)) = 1.0", __real__ result, 1.0);
+ check ("imag(ccos(0 + 0i)) = 0", __imag__ result, 0);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, 0.0));
+ check ("real(ccos(-0 + 0i)) = 1.0", __real__ result, 1.0);
+ check ("imag(ccos(-0 + 0i)) = -0", __imag__ result, minus_zero);
+ result = FUNC(ccos) (BUILD_COMPLEX (0.0, minus_zero));
+ check ("real(ccos(0 - 0i)) = 1.0", __real__ result, 1.0);
+ check ("imag(ccos(0 - 0i)) = 0", __imag__ result, 0.0);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, minus_zero));
+ check ("real(ccos(-0 - 0i)) = 1.0", __real__ result, 1.0);
+ check ("imag(ccos(-0 - 0i)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, 0.0));
+ check_isnan ("real(ccos(+Inf + i0)) = NaN", __real__ result);
+ check ("imag(ccos(Inf + i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
+ result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, minus_zero));
+ check_isnan ("real(ccos(Inf - i0)) = NaN", __real__ result);
+ check ("imag(ccos(Inf - i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, 0.0));
+ check_isnan ("real(ccos(-Inf + i0)) = NaN", __real__ result);
+ check ("imag(ccos(-Inf + i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, minus_zero));
+ check_isnan ("real(ccos(-Inf - i0)) = NaN", __real__ result);
+ check ("imag(ccos(-Inf - i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (0.0, plus_infty));
+ check_isinfp ("real(ccos(0 + i Inf)) = +Inf", __real__ result);
+ check ("imag(ccos(0 + i Inf)) = 0", __imag__ result, 0);
+ result = FUNC(ccos) (BUILD_COMPLEX (0.0, minus_infty));
+ check_isinfp ("real(ccos(0 - i Inf)) = +Inf", __real__ result);
+ check ("imag(ccos(0 - i Inf)) = 0", __imag__ result, 0);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, plus_infty));
+ check_isinfp ("real(ccos(-0 + i Inf)) = +Inf", __real__ result);
+ check ("imag(ccos(-0 + i Inf)) = -0", __imag__ result, minus_zero);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, minus_infty));
+ check_isinfp ("real(ccos(-0 - i Inf)) = +Inf", __real__ result);
+ check ("imag(ccos(-0 - i Inf)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, plus_infty));
+ check_isinfp ("real(ccos(+Inf + i Inf)) = +Inf", __real__ result);
+ check_isnan ("imag(ccos(+Inf + i Inf)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, plus_infty));
+ check_isinfp ("real(ccos(-Inf + i Inf)) = +Inf", __real__ result);
+ check_isnan ("imag(ccos(-Inf + i Inf)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, minus_infty));
+ check_isinfp ("real(ccos(Inf - i Inf)) = +Inf", __real__ result);
+ check_isnan ("imag(ccos(Inf - i Inf)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, minus_infty));
+ check_isinfp ("real(ccos(-Inf - i Inf)) = +Inf", __real__ result);
+ check_isnan ("imag(ccos(-Inf - i Inf)) = NaN", __imag__ result);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (4.625, plus_infty));
+ check_isinfn ("real(ccos(4.625 + i Inf)) = -Inf", __real__ result);
+ check_isinfn ("imag(ccos(4.625 + i Inf)) = -Inf", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (4.625, minus_infty));
+ check_isinfn ("real(ccos(4.625 - i Inf)) = -Inf", __real__ result);
+ check_isinfn ("imag(ccos(4.625 - i Inf)) = -Inf", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (-4.625, plus_infty));
+ check_isinfn ("real(ccos(-4.625 + i Inf)) = -Inf", __real__ result);
+ check_isinfp ("imag(ccos(-4.625 + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (-4.625, minus_infty));
+ check_isinfn ("real(ccos(-4.625 - i Inf)) = -Inf", __real__ result);
+ check_isinfp ("imag(ccos(-4.625 - i Inf)) = +Inf", __imag__ result);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, 6.75));
+ check_isnan ("real(ccos(+Inf + i6.75)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(+Inf + i6.75)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, -6.75));
+ check_isnan ("real(ccos(+Inf - i6.75)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(+Inf - i6.75)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, 6.75));
+ check_isnan ("real(ccos(-Inf + i6.75)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(-Inf + i6.75)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, -6.75));
+ check_isnan ("real(ccos(-Inf - i6.75)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(-Inf - i6.75)) = NaN", __imag__ result);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (nan_value, 0.0));
+ check_isnan ("real(ccos(NaN + i0)) = NaN", __real__ result);
+ check ("imag(ccos(NaN + i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
+ result = FUNC(ccos) (BUILD_COMPLEX (nan_value, minus_zero));
+ check_isnan ("real(ccos(NaN - i0)) = NaN", __real__ result);
+ check ("imag(ccos(NaN - i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (nan_value, plus_infty));
+ check_isinfp ("real(ccos(NaN + i Inf)) = +Inf", __real__ result);
+ check_isnan ("imag(ccos(NaN + i Inf)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (nan_value, minus_infty));
+ check_isinfp ("real(ccos(NaN - i Inf)) = +Inf", __real__ result);
+ check_isnan ("imag(ccos(NaN - i Inf)) = NaN", __imag__ result);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (nan_value, 9.0));
+ check_isnan ("real(ccos(NaN + i9.0)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(NaN + i9.0)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (nan_value, -9.0));
+ check_isnan ("real(ccos(NaN - i9.0)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(NaN - i9.0)) = NaN", __imag__ result);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (0.0, nan_value));
+ check_isnan ("real(ccos(0 + i NaN)) = NaN", __real__ result);
+ check ("imag(ccos(0 + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, nan_value));
+ check_isnan ("real(ccos(-0 + i NaN)) = NaN", __real__ result);
+ check ("imag(ccos(-0 + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (10.0, nan_value));
+ check_isnan ("real(ccos(10 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(10 + i NaN)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (-10.0, nan_value));
+ check_isnan ("real(ccos(-10 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(-10 + i NaN)) = NaN", __imag__ result);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, nan_value));
+ check_isnan ("real(ccos(+Inf + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(+Inf + i NaN)) = NaN", __imag__ result);
+ result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, nan_value));
+ check_isnan ("real(ccos(-Inf + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(-Inf + i NaN)) = NaN", __imag__ result);
+
+ result = FUNC(ccos) (BUILD_COMPLEX (nan_value, nan_value));
+ check_isnan ("real(ccos(NaN + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(ccos(NaN + i NaN)) = NaN", __imag__ result);
+}
+
+
+static void
ccosh_test (void)
{
__complex__ MATHTYPE result;
result = FUNC(ccosh) (BUILD_COMPLEX (0.0, 0.0));
- check ("real(ccosh(0 + 0i)) = 0", __real__ result, 1.0);
+ check ("real(ccosh(0 + 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(0 + 0i)) = 0", __imag__ result, 0);
result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, 0.0));
- check ("real(ccosh(-0 + 0i)) = -0", __real__ result, 1.0);
+ check ("real(ccosh(-0 + 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(-0 + 0i)) = 0", __imag__ result, 0);
result = FUNC(ccosh) (BUILD_COMPLEX (0.0, minus_zero));
- check ("real(ccosh(0 - 0i)) = 0", __real__ result, 1.0);
+ check ("real(ccosh(0 - 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(0 - 0i)) = -0", __imag__ result, minus_zero);
result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, minus_zero));
- check ("real(ccosh(-0 - 0i)) = -0", __real__ result, 1.0);
+ check ("real(ccosh(-0 - 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(-0 - 0i)) = -0", __imag__ result, minus_zero);
result = FUNC(ccosh) (BUILD_COMPLEX (0.0, plus_infty));
@@ -1843,13 +1975,13 @@ ccosh_test (void)
check ("imag(ccosh(0 + i Inf)) = +-0", FUNC(fabs) (__imag__ result), 0);
result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, plus_infty));
check_isnan ("real(ccosh(-0 + i Inf)) = NaN", __real__ result);
- check ("imag(ccosh(-0 + i Inf)) = -0", FUNC(fabs) (__imag__ result), 0);
+ check ("imag(ccosh(-0 + i Inf)) = +-0", FUNC(fabs) (__imag__ result), 0);
result = FUNC(ccosh) (BUILD_COMPLEX (0.0, minus_infty));
check_isnan ("real(ccosh(0 - i Inf)) = NaN", __real__ result);
- check ("imag(ccosh(0 - i Inf)) = 0", FUNC(fabs) (__imag__ result), 0);
+ check ("imag(ccosh(0 - i Inf)) = +-0", FUNC(fabs) (__imag__ result), 0);
result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, minus_infty));
check_isnan ("real(ccosh(-0 - i Inf)) = NaN", __real__ result);
- check ("imag(ccosh(-0 - i Inf)) = -0", FUNC(fabs) (__imag__ result), 0);
+ check ("imag(ccosh(-0 - i Inf)) = +-0", FUNC(fabs) (__imag__ result), 0);
result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, 0.0));
check_isinfp ("real(ccosh(+Inf + 0i)) = +Inf", __real__ result);
@@ -1915,7 +2047,7 @@ ccosh_test (void)
check_isnan ("imag(ccosh(+Inf + i NaN)) = NaN", __imag__ result);
result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, nan_value));
check_isinfp ("real(ccosh(-Inf + i NaN)) = +Inf", __real__ result);
- check_isnan ("imag(ccosh(-0 + i NaN)) = NaN", __imag__ result);
+ check_isnan ("imag(ccosh(-Inf + i NaN)) = NaN", __imag__ result);
result = FUNC(ccosh) (BUILD_COMPLEX (9.0, nan_value));
check_isnan ("real(ccosh(9.0 + i NaN)) = NaN", __real__ result);
@@ -1926,10 +2058,10 @@ ccosh_test (void)
result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, 0.0));
check_isnan ("real(ccosh(NaN + i0)) = NaN", __real__ result);
- check ("imag(ccosh(NaN + i0)) = NaN", __imag__ result, 0.0);
+ check ("imag(ccosh(NaN + i0)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, minus_zero));
check_isnan ("real(ccosh(NaN - i0)) = NaN", __real__ result);
- check ("imag(ccosh(NaN - i0)) = NaN", __imag__ result, minus_zero);
+ check ("imag(ccosh(NaN - i0)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, 10.0));
check_isnan ("real(ccosh(NaN + i10)) = NaN", __real__ result);
@@ -1951,8 +2083,6 @@ ccosh_test (void)
}
-#if 0
-/* Enable these tests as soon as the functions are available. */
static void
cacos_test (void)
{
@@ -2194,6 +2324,131 @@ cacosh_test (void)
static void
+casin_test (void)
+{
+ __complex__ MATHTYPE result;
+
+ result = FUNC(casin) (BUILD_COMPLEX (0, 0));
+ check ("real(casin(0 + i0)) = 0", __real__ result, 0);
+ check ("imag(casin(0 + i0)) = 0", __imag__ result, 0);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_zero, 0));
+ check ("real(casin(-0 + i0)) = -0", __real__ result, minus_zero);
+ check ("imag(casin(-0 + i0)) = 0", __imag__ result, 0);
+ result = FUNC(casin) (BUILD_COMPLEX (0, minus_zero));
+ check ("real(casin(0 - i0)) = 0", __real__ result, 0);
+ check ("imag(casin(0 - i0)) = -0", __imag__ result, minus_zero);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_zero, minus_zero));
+ check ("real(casin(-0 - i0)) = -0", __real__ result, minus_zero);
+ check ("imag(casin(-0 - i0)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(casin) (BUILD_COMPLEX (plus_infty, plus_infty));
+ check ("real(casin(+Inf + i Inf)) = pi/4", __real__ result, M_PI_4);
+ check_isinfp ("imag(casin(+Inf + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (plus_infty, minus_infty));
+ check ("real(casin(+Inf - i Inf)) = pi/4", __real__ result, M_PI_4);
+ check_isinfn ("imag(casin(+Inf - i Inf)) = -Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_infty, plus_infty));
+ check ("real(casin(-Inf + i Inf)) = -pi/4", __real__ result, -M_PI_4);
+ check_isinfp ("imag(casin(-Inf + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_infty, minus_infty));
+ check ("real(casin(-Inf - i Inf)) = -pi/4", __real__ result, -M_PI_4);
+ check_isinfn ("imag(casin(-Inf - i Inf)) = -Inf", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (-10.0, plus_infty));
+ check ("real(casin(-10.0 + i Inf)) = -0", __real__ result, minus_zero);
+ check_isinfp ("imag(casin(-10.0 + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (-10.0, minus_infty));
+ check ("real(casin(-10.0 - i Inf)) = -0", __real__ result, minus_zero);
+ check_isinfn ("imag(casin(-10.0 - i Inf)) = -Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (0, plus_infty));
+ check ("real(casin(0 + i Inf)) = 0", __real__ result, 0.0);
+ check_isinfp ("imag(casin(0 + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (0, minus_infty));
+ check ("real(casin(0 - i Inf)) = 0", __real__ result, 0.0);
+ check_isinfn ("imag(casin(0 - i Inf)) = -Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_zero, plus_infty));
+ check ("real(casin(-0 + i Inf)) = -0", __real__ result, minus_zero);
+ check_isinfp ("imag(casin(-0 + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_zero, minus_infty));
+ check ("real(casin(-0 - i Inf)) = -0", __real__ result, minus_zero);
+ check_isinfn ("imag(casin(-0 - i Inf)) = -Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (0.1, plus_infty));
+ check ("real(casin(0.1 + i Inf)) = 0", __real__ result, 0);
+ check_isinfp ("imag(casin(0.1 + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (0.1, minus_infty));
+ check ("real(casin(0.1 - i Inf)) = 0", __real__ result, 0);
+ check_isinfn ("imag(casin(0.1 - i Inf)) = -Inf", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (minus_infty, 0));
+ check ("real(casin(-Inf + i0)) = -pi/2", __real__ result, -M_PI_2);
+ check_isinfp ("imag(casin(-Inf + i0)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_infty, minus_zero));
+ check ("real(casin(-Inf - i0)) = -pi/2", __real__ result, -M_PI_2);
+ check_isinfn ("imag(casin(-Inf - i0)) = -Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_infty, 100));
+ check ("real(casin(-Inf + i100)) = -pi/2", __real__ result, -M_PI_2);
+ check_isinfp ("imag(casin(-Inf + i100)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_infty, -100));
+ check ("real(casin(-Inf - i100)) = -pi/2", __real__ result, -M_PI_2);
+ check_isinfn ("imag(casin(-Inf - i100)) = -Inf", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (plus_infty, 0));
+ check ("real(casin(+Inf + i0)) = pi/2", __real__ result, M_PI_2);
+ check_isinfp ("imag(casin(+Inf + i0)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (plus_infty, minus_zero));
+ check ("real(casin(+Inf - i0)) = pi/2", __real__ result, M_PI_2);
+ check_isinfn ("imag(casin(+Inf - i0)) = -Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (plus_infty, 0.5));
+ check ("real(casin(+Inf + i0.5)) = pi/2", __real__ result, M_PI_2);
+ check_isinfp ("imag(casin(+Inf + i0.5)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (plus_infty, -0.5));
+ check ("real(casin(+Inf - i0.5)) = pi/2", __real__ result, M_PI_2);
+ check_isinfn ("imag(casin(+Inf - i0.5)) = -Inf", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (nan_value, plus_infty));
+ check_isnan ("real(casin(NaN + i Inf)) = NaN", __real__ result);
+ check_isinfp ("imag(casin(NaN + i Inf)) = +Inf", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (nan_value, minus_infty));
+ check_isnan ("real(casin(NaN - i Inf)) = NaN", __real__ result);
+ check_isinfn ("imag(casin(NaN - i Inf)) = -Inf", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (0.0, nan_value));
+ check ("real(casin(0 + i NaN)) = 0", __real__ result, 0.0);
+ check_isnan ("imag(casin(0 + i NaN)) = NaN", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (minus_zero, nan_value));
+ check ("real(casin(-0 + i NaN)) = -0", __real__ result, minus_zero);
+ check_isnan ("imag(casin(-0 + i NaN)) = NaN", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (plus_infty, nan_value));
+ check_isnan ("real(casin(+Inf + i NaN)) = NaN", __real__ result);
+ check_isinfp ("imag(casin(+Inf + i NaN)) = +-Inf",
+ FUNC(fabs) (__imag__ result));
+ result = FUNC(casin) (BUILD_COMPLEX (minus_infty, nan_value));
+ check_isnan ("real(casin(-Inf + i NaN)) = NaN", __real__ result);
+ check_isinfp ("imag(casin(-Inf + NaN)) = +-Inf",
+ FUNC(fabs) (__imag__ result));
+
+ result = FUNC(casin) (BUILD_COMPLEX (nan_value, 10.5));
+ check_isnan ("real(casin(NaN + i10.5)) = NaN", __real__ result);
+ check_isnan ("imag(casin(NaN + i10.5)) = NaN", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (nan_value, -10.5));
+ check_isnan ("real(casin(NaN - i10.5)) = NaN", __real__ result);
+ check_isnan ("imag(casin(NaN - i10.5)) = NaN", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (0.75, nan_value));
+ check_isnan ("real(casin(0.75 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(casin(0.75 + i NaN)) = NaN", __imag__ result);
+ result = FUNC(casin) (BUILD_COMPLEX (-0.75, nan_value));
+ check_isnan ("real(casin(-0.75 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(casin(-0.75 + i NaN)) = NaN", __imag__ result);
+
+ result = FUNC(casin) (BUILD_COMPLEX (nan_value, nan_value));
+ check_isnan ("real(casin(NaN + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(casin(NaN + i NaN)) = NaN", __imag__ result);
+}
+
+
+static void
casinh_test (void)
{
__complex__ MATHTYPE result;
@@ -2236,6 +2491,12 @@ casinh_test (void)
result = FUNC(casinh) (BUILD_COMPLEX (0, minus_infty));
check_isinfp ("real(casinh(0 - i Inf)) = +Inf", __real__ result);
check ("imag(casinh(0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2);
+ result = FUNC(casinh) (BUILD_COMPLEX (minus_zero, plus_infty));
+ check_isinfn ("real(casinh(-0 + i Inf)) = -Inf", __real__ result);
+ check ("imag(casinh(-0 + i Inf)) = pi/2", __imag__ result, M_PI_2);
+ result = FUNC(casinh) (BUILD_COMPLEX (minus_zero, minus_infty));
+ check_isinfn ("real(casinh(-0 - i Inf)) = -Inf", __real__ result);
+ check ("imag(casinh(-0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2);
result = FUNC(casinh) (BUILD_COMPLEX (0.1, plus_infty));
check_isinfp ("real(casinh(0.1 + i Inf)) = +Inf", __real__ result);
check ("imag(casinh(0.1 + i Inf)) = pi/2", __imag__ result, M_PI_2);
@@ -2278,17 +2539,17 @@ casinh_test (void)
result = FUNC(casinh) (BUILD_COMPLEX (nan_value, 0));
check_isnan ("real(casinh(NaN + i0)) = NaN", __real__ result);
- check ("imag(casinh(NaN + i0)) = 0", __imag__ resul, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_zero, nan_value));
+ check ("imag(casinh(NaN + i0)) = 0", __imag__ result, 0);
+ result = FUNC(casinh) (BUILD_COMPLEX (nan_value, minus_zero));
check_isnan ("real(casinh(NaN - i0)) = NaN", __real__ result);
check ("imag(casinh(NaN - i0)) = -0", __imag__ result, minus_zero);
result = FUNC(casinh) (BUILD_COMPLEX (nan_value, plus_infty));
- check_isinfp ("real(casinh(NaN + i Inf)) = +Inf",
+ check_isinfp ("real(casinh(NaN + i Inf)) = +-Inf",
FUNC(fabs) (__real__ result));
check_isnan ("imag(casinh(NaN + i Inf)) = NaN", __imag__ result);
result = FUNC(casinh) (BUILD_COMPLEX (nan_value, minus_infty));
- check_isinfp ("real(casinh(NaN - i Inf)) = +Inf",
+ check_isinfp ("real(casinh(NaN - i Inf)) = +-Inf",
FUNC(fabs) (__real__ result));
check_isnan ("imag(casinh(NaN - i Inf)) = NaN", __imag__ result);
@@ -2302,7 +2563,7 @@ casinh_test (void)
result = FUNC(casinh) (BUILD_COMPLEX (nan_value, 0.75));
check_isnan ("real(casinh(NaN + i0.75)) = NaN", __real__ result);
check_isnan ("imag(casinh(NaN + i0.75)) = NaN", __imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(casinh) (BUILD_COMPLEX (-0.75, nan_value));
check_isnan ("real(casinh(NaN - i0.75)) = NaN", __real__ result);
check_isnan ("imag(casinh(NaN - i0.75)) = NaN", __imag__ result);
@@ -2313,6 +2574,136 @@ casinh_test (void)
static void
+catan_test (void)
+{
+ __complex__ MATHTYPE result;
+
+ result = FUNC(catan) (BUILD_COMPLEX (0, 0));
+ check ("real(catan(0 + i0)) = 0", __real__ result, 0);
+ check ("imag(catan(0 + i0)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_zero, 0));
+ check ("real(catan(-0 + i0)) = -0", __real__ result, minus_zero);
+ check ("imag(catan(-0 + i0)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (0, minus_zero));
+ check ("real(catan(0 - i0)) = 0", __real__ result, 0);
+ check ("imag(catan(0 - i0)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_zero, minus_zero));
+ check ("real(catan(-0 - i0)) = -0", __real__ result, minus_zero);
+ check ("imag(catan(-0 - i0)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(catan) (BUILD_COMPLEX (plus_infty, plus_infty));
+ check ("real(catan(+Inf + i Inf)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(+Inf + i Inf)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (plus_infty, minus_infty));
+ check ("real(catan(+Inf - i Inf)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(+Inf - i Inf)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_infty, plus_infty));
+ check ("real(catan(-Inf + i Inf)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-Inf + i Inf)) = 0", __imag__ result, 0.0);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_infty, minus_infty));
+ check ("real(catan(-Inf - i Inf)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-Inf - i Inf)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(catan) (BUILD_COMPLEX (plus_infty, -10.0));
+ check ("real(catan(+Inf - i10.0)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(+Inf - i10.0)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_infty, -10.0));
+ check ("real(catan(-Inf - i10.0)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-Inf - i10.0)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (plus_infty, minus_zero));
+ check ("real(catan(Inf - i0)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(Inf - i0)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_infty, minus_zero));
+ check ("real(catan(-Inf - i0)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-Inf - i0)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (plus_infty, 0.0));
+ check ("real(catan(Inf + i0)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(Inf + i0)) = 0", __imag__ result, 0.0);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_infty, 0.0));
+ check ("real(catan(-Inf + i0)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-Inf + i0)) = 0", __imag__ result, 0.0);
+ result = FUNC(catan) (BUILD_COMPLEX (plus_infty, 0.1));
+ check ("real(catan(+Inf + i0.1)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(+Inf + i0.1)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_infty, 0.1));
+ check ("real(catan(-Inf + i0.1)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-Inf + i0.1)) = 0", __imag__ result, 0);
+
+ result = FUNC(catan) (BUILD_COMPLEX (0.0, minus_infty));
+ check ("real(catan(0 - i Inf)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(0 - i Inf)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_zero, minus_infty));
+ check ("real(catan(-0 - i Inf)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-0 - i Inf)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (100.0, minus_infty));
+ check ("real(catan(100 - i Inf)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(100 - i Inf)) = -0", __imag__ result, minus_zero);
+ result = FUNC(catan) (BUILD_COMPLEX (-100.0, minus_infty));
+ check ("real(catan(-100 - i Inf)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-100 - i Inf)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(catan) (BUILD_COMPLEX (0.0, plus_infty));
+ check ("real(catan(0 + i Inf)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(0 + i Inf)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_zero, plus_infty));
+ check ("real(catan(-0 + i Inf)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-0 + i Inf)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (0.5, plus_infty));
+ check ("real(catan(0.5 + i Inf)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(0.5 + i Inf)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (-0.5, plus_infty));
+ check ("real(catan(-0.5 + i Inf)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-0.5 + i Inf)) = 0", __imag__ result, 0);
+
+ result = FUNC(catan) (BUILD_COMPLEX (nan_value, 0.0));
+ check_isnan ("real(catan(NaN + i0)) = NaN", __real__ result);
+ check ("imag(catan(NaN + i0)) = 0", __imag__ result, 0.0);
+ result = FUNC(catan) (BUILD_COMPLEX (nan_value, minus_zero));
+ check_isnan ("real(catan(NaN - i0)) = NaN", __real__ result);
+ check ("imag(catan(NaN - i0)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(catan) (BUILD_COMPLEX (nan_value, plus_infty));
+ check_isnan ("real(catan(NaN + i Inf)) = NaN", __real__ result);
+ check ("imag(catan(NaN + i Inf)) = 0", __imag__ result, 0);
+ result = FUNC(catan) (BUILD_COMPLEX (nan_value, minus_infty));
+ check_isnan ("real(catan(NaN - i Inf)) = NaN", __real__ result);
+ check ("imag(catan(NaN - i Inf)) = -0", __imag__ result, minus_zero);
+
+ result = FUNC(catan) (BUILD_COMPLEX (0.0, nan_value));
+ check_isnan ("real(catan(0 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(catan(0 + i NaN)) = NaN", __imag__ result);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_zero, nan_value));
+ check_isnan ("real(catan(-0 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(catan(-0 + i NaN)) = NaN", __imag__ result);
+
+ result = FUNC(catan) (BUILD_COMPLEX (plus_infty, nan_value));
+ check ("real(catan(+Inf + i NaN)) = pi/2", __real__ result, M_PI_2);
+ check ("imag(catan(+Inf + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
+ result = FUNC(catan) (BUILD_COMPLEX (minus_infty, nan_value));
+ check ("real(catan(-Inf + i NaN)) = -pi/2", __real__ result, -M_PI_2);
+ check ("imag(catan(-Inf + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
+
+ result = FUNC(catan) (BUILD_COMPLEX (nan_value, 10.5));
+ check_isnan ("real(catan(NaN + i10.5)) = NaN", __real__ result);
+ check_isnan ("imag(catan(NaN + i10.5)) = NaN", __imag__ result);
+ result = FUNC(catan) (BUILD_COMPLEX (nan_value, -10.5));
+ check_isnan ("real(catan(NaN - i10.5)) = NaN", __real__ result);
+ check_isnan ("imag(catan(NaN - i10.5)) = NaN", __imag__ result);
+
+ result = FUNC(catan) (BUILD_COMPLEX (0.75, nan_value));
+ check_isnan ("real(catan(0.75 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(catan(0.75 + i NaN)) = NaN", __imag__ result);
+ result = FUNC(catan) (BUILD_COMPLEX (-0.75, nan_value));
+ check_isnan ("real(catan(-0.75 + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(catan(-0.75 + i NaN)) = NaN", __imag__ result);
+
+ result = FUNC(catan) (BUILD_COMPLEX (nan_value, nan_value));
+ check_isnan ("real(catan(NaN + i NaN)) = NaN", __real__ result);
+ check_isnan ("imag(catan(NaN + i NaN)) = NaN", __imag__ result);
+}
+
+
+static void
catanh_test (void)
{
__complex__ MATHTYPE result;
@@ -2344,11 +2735,17 @@ catanh_test (void)
check ("imag(catanh(-Inf - i Inf)) = -pi/2", __imag__ result, -M_PI_2);
result = FUNC(catanh) (BUILD_COMPLEX (-10.0, plus_infty));
- check ("real(catanh(-10.0 + i Inf)) = -0", __real__ result, -minus_zero);
+ check ("real(catanh(-10.0 + i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-10.0 + i Inf)) = pi/2", __imag__ result, M_PI_2);
result = FUNC(catanh) (BUILD_COMPLEX (-10.0, minus_infty));
- check ("real(catanh(-10.0 - i Inf)) = -0", __real__ result, minus_infty);
+ check ("real(catanh(-10.0 - i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-10.0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2);
+ result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, plus_infty));
+ check ("real(catanh(-0 + i Inf)) = -0", __real__ result, minus_zero);
+ check ("imag(catanh(-0 + i Inf)) = pi/2", __imag__ result, M_PI_2);
+ result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, minus_infty));
+ check ("real(catanh(-0 - i Inf)) = -0", __real__ result, minus_zero);
+ check ("imag(catanh(-0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2);
result = FUNC(catanh) (BUILD_COMPLEX (0, plus_infty));
check ("real(catanh(0 + i Inf)) = 0", __real__ result, 0);
check ("imag(catanh(0 + i Inf)) = pi/2", __imag__ result, M_PI_2);
@@ -2390,10 +2787,10 @@ catanh_test (void)
result = FUNC(catanh) (BUILD_COMPLEX (0, nan_value));
check ("real(catanh(0 + i NaN)) = 0", __real__ result, 0);
- check_isnan ("imag(catanh(+Inf + i NaN)) = NaN", __imag__ result);
+ check_isnan ("imag(catanh(0 + i NaN)) = NaN", __imag__ result);
result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, nan_value));
check ("real(catanh(-0 + i NaN)) = -0", __real__ result, minus_zero);
- check_isnan ("imag(catanh(-Inf + i NaN)) = NaN", __imag__ result);
+ check_isnan ("imag(catanh(-0 + i NaN)) = NaN", __imag__ result);
result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, nan_value));
check ("real(catanh(+Inf + i NaN)) = 0", __real__ result, 0);
@@ -2404,8 +2801,8 @@ catanh_test (void)
result = FUNC(catanh) (BUILD_COMPLEX (nan_value, 0));
check_isnan ("real(catanh(NaN + i0)) = NaN", __real__ result);
- check_isnan ("imag(catanh(NaN + i0)) = NaN", __imag__ resul);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, nan_value));
+ check_isnan ("imag(catanh(NaN + i0)) = NaN", __imag__ result);
+ result = FUNC(catanh) (BUILD_COMPLEX (nan_value, minus_zero));
check_isnan ("real(catanh(NaN - i0)) = NaN", __real__ result);
check_isnan ("imag(catanh(NaN - i0)) = NaN", __imag__ result);
@@ -2426,7 +2823,7 @@ catanh_test (void)
result = FUNC(catanh) (BUILD_COMPLEX (nan_value, 0.75));
check_isnan ("real(catanh(NaN + i0.75)) = NaN", __real__ result);
check_isnan ("imag(catanh(NaN + i0.75)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX (nan_value, -0.75));
check_isnan ("real(catanh(NaN - i0.75)) = NaN", __real__ result);
check_isnan ("imag(catanh(NaN - i0.75)) = NaN", __imag__ result);
@@ -2449,7 +2846,7 @@ ctanh_test (void)
check ("imag(ctanh(0 - i0)) = -0", __imag__ result, minus_zero);
result = FUNC(ctanh) (BUILD_COMPLEX (minus_zero, 0));
check ("real(ctanh(-0 + i0)) = -0", __real__ result, minus_zero);
- check ("imag(ctanh(-0 + i0)) = -0", __imag__ result, 0);
+ check ("imag(ctanh(-0 + i0)) = 0", __imag__ result, 0);
result = FUNC(ctanh) (BUILD_COMPLEX (minus_zero, minus_zero));
check ("real(ctanh(-0 - i0)) = -0", __real__ result, minus_zero);
check ("imag(ctanh(-0 - i0)) = -0", __imag__ result, minus_zero);
@@ -2472,7 +2869,7 @@ ctanh_test (void)
result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, 1));
check ("real(ctanh(-Inf + i1)) = -1", __real__ result, -1);
check ("imag(ctanh(-Inf + i1)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (pminus_infty, minus_zero));
+ result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, minus_zero));
check ("real(ctanh(-Inf - i0)) = -1", __real__ result, -1);
check ("imag(ctanh(-Inf - i0)) = -0", __imag__ result, minus_zero);
result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, -1));
@@ -2514,9 +2911,9 @@ ctanh_test (void)
result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, 0));
check_isnan ("real(ctanh(NaN + i0)) = NaN", __real__ result);
check ("imag(ctanh(NaN + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, minus_zero));
check_isnan ("real(ctanh(NaN - i0)) = NaN", __real__ result);
- check ("imag(ctanh(NaN - i0)) = -0", __imag__ result, minus_infty);
+ check ("imag(ctanh(NaN - i0)) = -0", __imag__ result, minus_zero);
result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, 0.5));
check_isnan ("real(ctanh(NaN + i0.5)) = NaN", __real__ result);
@@ -2542,7 +2939,6 @@ ctanh_test (void)
check_isnan ("real(ctanh(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(ctanh(NaN + i NaN)) = NaN", __imag__ result);
}
-#endif
static void
@@ -2639,7 +3035,7 @@ clog_test (void)
result = FUNC(clog) (BUILD_COMPLEX (nan_value, plus_infty));
check_isinfp ("real(clog(NaN + i Inf)) = +Inf", __real__ result);
check_isnan ("imag(clog(NaN + i Inf)) = NaN", __imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX (nan_value, minus_infty));
check_isinfp ("real(clog(NaN - i Inf)) = +Inf", __real__ result);
check_isnan ("imag(clog(NaN - i Inf)) = NaN", __imag__ result);
@@ -2675,7 +3071,6 @@ clog_test (void)
}
-#if 0
static void
csqrt_test (void)
{
@@ -2709,16 +3104,16 @@ csqrt_test (void)
result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, 0));
check_isinfp ("real(csqrt(+Inf + i0)) = +Inf", __real__ result);
- check ("imag(csqrt(-Inf + i0)) = 0", __imag__ result, 0);
+ check ("imag(csqrt(+Inf + i0)) = 0", __imag__ result, 0);
result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, 6));
check_isinfp ("real(csqrt(+Inf + i6)) = +Inf", __real__ result);
- check ("imag(csqrt(-Inf + i6)) = 0", __imag__ result, 0);
+ check ("imag(csqrt(+Inf + i6)) = 0", __imag__ result, 0);
result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, minus_zero));
check_isinfp ("real(csqrt(+Inf - i0)) = +Inf", __real__ result);
- check ("imag(csqrt(-Inf - i0)) = -0", __imag__ result, minus_zero);
+ check ("imag(csqrt(+Inf - i0)) = -0", __imag__ result, minus_zero);
result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, -6));
check_isinfp ("real(csqrt(+Inf - i6)) = +Inf", __real__ result);
- check ("imag(csqrt(-Inf - i6)) = -0", __imag__ result, minus_zero);
+ check ("imag(csqrt(+Inf - i6)) = -0", __imag__ result, minus_zero);
result = FUNC(csqrt) (BUILD_COMPLEX (0, plus_infty));
check_isinfp ("real(csqrt(0 + i Inf)) = +Inf", __real__ result);
@@ -2796,7 +3191,23 @@ csqrt_test (void)
check_isnan ("real(csqrt(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(csqrt(NaN + i NaN)) = NaN", __imag__ result);
}
-#endif
+
+
+static void
+cpow_test (void)
+{
+ __complex__ MATHTYPE result;
+}
+
+
+static void
+rint_test (void)
+{
+ check ("rint(0) = 0", FUNC(rint) (0.0), 0.0);
+ check ("rint(-0) = -0", FUNC(rint) (minus_zero), minus_zero);
+ check_isinfp ("rint(+Inf) = +Inf", FUNC(rint) (plus_infty));
+ check_isinfn ("rint(-Inf) = -Inf", FUNC(rint) (minus_infty));
+}
static void
@@ -2806,16 +3217,17 @@ rinttol_test (void)
the rounding method and test the critical cases. So far, only
unproblematic numbers are tested. */
- check_long ("rinttol(0) = 0", 0.0, 0);
- check_long ("rinttol(-0) = 0", minus_zero, 0);
- check_long ("rinttol(0.2) = 0", 0.2, 0);
- check_long ("rinttol(-0.2) = 0", -0.2, 0);
+ check_long ("rinttol(0) = 0", rinttol (0.0), 0);
+ check_long ("rinttol(-0) = 0", rinttol (minus_zero), 0);
+ check_long ("rinttol(0.2) = 0", rinttol (0.2), 0);
+ check_long ("rinttol(-0.2) = 0", rinttol (-0.2), 0);
- check_long ("rinttol(1.4) = 1", 1.4, 1);
- check_long ("rinttol(-1.4) = -1", -1.4, -1);
+ check_long ("rinttol(1.4) = 1", rinttol (1.4), 1);
+ check_long ("rinttol(-1.4) = -1", rinttol (-1.4), -1);
- check_long ("rinttol(8388600.3) = 8388600", 8388600.3, 8388600);
- check_long ("rinttol(-8388600.3) = -8388600", -8388600.3, -8388600);
+ check_long ("rinttol(8388600.3) = 8388600", rinttol (8388600.3), 8388600);
+ check_long ("rinttol(-8388600.3) = -8388600", rinttol (-8388600.3),
+ -8388600);
}
@@ -2826,16 +3238,79 @@ rinttoll_test (void)
the rounding method and test the critical cases. So far, only
unproblematic numbers are tested. */
- check_longlong ("rinttoll(0) = 0", 0.0, 0);
- check_longlong ("rinttoll(-0) = 0", minus_zero, 0);
- check_longlong ("rinttoll(0.2) = 0", 0.2, 0);
- check_longlong ("rinttoll(-0.2) = 0", -0.2, 0);
+ check_longlong ("rinttoll(0) = 0", rinttoll (0.0), 0);
+ check_longlong ("rinttoll(-0) = 0", rinttoll (minus_zero), 0);
+ check_longlong ("rinttoll(0.2) = 0", rinttoll (0.2), 0);
+ check_longlong ("rinttoll(-0.2) = 0", rinttoll (-0.2), 0);
- check_longlong ("rinttoll(1.4) = 1", 1.4, 1);
- check_longlong ("rinttoll(-1.4) = -1", -1.4, -1);
+ check_longlong ("rinttoll(1.4) = 1", rinttoll (1.4), 1);
+ check_longlong ("rinttoll(-1.4) = -1", rinttoll (-1.4), -1);
- check_longlong ("rinttoll(8388600.3) = 8388600", 8388600.3, 8388600);
- check_longlong ("rinttoll(-8388600.3) = -8388600", -8388600.3, -8388600);
+ check_longlong ("rinttoll(8388600.3) = 8388600", rinttoll (8388600.3),
+ 8388600);
+ check_longlong ("rinttoll(-8388600.3) = -8388600", rinttoll (-8388600.3),
+ -8388600);
+}
+
+
+static void
+round_test (void)
+{
+ check ("round(0) = 0", FUNC(round) (0), 0);
+ check ("round(-0) = -0", FUNC(round) (minus_zero), minus_zero);
+ check ("round(0.2) = 0", FUNC(round) (0.2), 0.0);
+ check ("round(-0.2) = -0", FUNC(round) (-0.2), minus_zero);
+ check ("round(0.5) = 1", FUNC(round) (0.5), 1.0);
+ check ("round(-0.5) = -1", FUNC(round) (-0.5), -1.0);
+ check ("round(0.8) = 1", FUNC(round) (0.8), 1.0);
+ check ("round(-0.8) = -1", FUNC(round) (-0.8), -1.0);
+ check ("round(1.5) = 2", FUNC(round) (1.5), 2.0);
+ check ("round(-1.5) = -2", FUNC(round) (-1.5), -2.0);
+ check ("round(2097152.5) = 2097153", FUNC(round) (2097152.5), 2097153);
+ check ("round(-2097152.5) = -2097153", FUNC(round) (-2097152.5), -2097153);
+}
+
+
+static void
+roundtol_test (void)
+{
+ check_long ("roundtol(0) = 0", roundtol (0), 0);
+ check_long ("roundtol(-0) = 0", roundtol (minus_zero), 0);
+ check_long ("roundtol(0.2) = 0", roundtol (0.2), 0.0);
+ check_long ("roundtol(-0.2) = 0", roundtol (-0.2), 0);
+ check_long ("roundtol(0.5) = 1", roundtol (0.5), 1);
+ check_long ("roundtol(-0.5) = -1", roundtol (-0.5), -1);
+ check_long ("roundtol(0.8) = 1", roundtol (0.8), 1);
+ check_long ("roundtol(-0.8) = -1", roundtol (-0.8), -1);
+ check_long ("roundtol(1.5) = 2", roundtol (1.5), 2);
+ check_long ("roundtol(-1.5) = -2", roundtol (-1.5), -2);
+ check_long ("roundtol(2097152.5) = 2097153", roundtol (2097152.5), 2097153);
+ check_long ("roundtol(-2097152.5) = -2097153", roundtol (-2097152.5),
+ -2097153);
+}
+
+
+static void
+roundtoll_test (void)
+{
+ check_longlong ("roundtoll(0) = 0", roundtoll (0), 0);
+ check_longlong ("roundtoll(-0) = 0", roundtoll (minus_zero), 0);
+ check_longlong ("roundtoll(0.2) = 0", roundtoll (0.2), 0.0);
+ check_longlong ("roundtoll(-0.2) = 0", roundtoll (-0.2), 0);
+ check_longlong ("roundtoll(0.5) = 1", roundtoll (0.5), 1);
+ check_longlong ("roundtoll(-0.5) = -1", roundtoll (-0.5), -1);
+ check_longlong ("roundtoll(0.8) = 1", roundtoll (0.8), 1);
+ check_longlong ("roundtoll(-0.8) = -1", roundtoll (-0.8), -1);
+ check_longlong ("roundtoll(1.5) = 2", roundtoll (1.5), 2);
+ check_longlong ("roundtoll(-1.5) = -2", roundtoll (-1.5), -2);
+ check_longlong ("roundtoll(2097152.5) = 2097153",
+ roundtoll (2097152.5), 2097153);
+ check_longlong ("roundtoll(-2097152.5) = -2097153",
+ roundtoll (-2097152.5), -2097153);
+ check_longlong ("roundtoll(34359738368.5) = 34359738369",
+ roundtoll (34359738368.5), 34359738369ll);
+ check_longlong ("roundtoll(-34359738368.5) = -34359738369",
+ roundtoll (-34359738368.5), -34359738369ll);
}
@@ -3168,11 +3643,25 @@ main (int argc, char *argv[])
#endif
cexp_test ();
csinh_test ();
+ ccos_test ();
ccosh_test ();
clog_test ();
-
+ cacos_test ();
+ cacosh_test ();
+ casin_test ();
+ casinh_test ();
+ catan_test ();
+ catanh_test ();
+ ctanh_test ();
+ csqrt_test ();
+ cpow_test ();
+
+ rint_test ();
rinttol_test ();
rinttoll_test ();
+ round_test ();
+ roundtol_test ();
+ roundtoll_test ();
identities ();
inverse_functions ();
diff --git a/math/math.h b/math/math.h
index ce4f4867fa..bf3ef9bcee 100644
--- a/math/math.h
+++ b/math/math.h
@@ -115,6 +115,25 @@ extern int signgam;
/* ISO C 9X defines some generic macros which work on any data type. */
#if __USE_ISOC9X
+/* Get the architecture specific values describing the floating-point
+ evaluation. The following symbols will get defined:
+
+ float_t floating-point type at least as wide as `float' used
+ to evaluate `float' expressions
+ double_t floating-point type at least as wide as `double' used
+ to evaluate `double' expressions
+
+ FLT_EVAL_METHOD
+ Defined to
+ 0 if `float_t' is `float' and `double_t' is `double'
+ 1 if `float_t' and `double_t' are `double'
+ 2 if `float_t' and `double_t' are `long double'
+ else `float_t' and `double_t' are unspecified
+
+ INFINITY representation of the infinity value of type `float_t'
+*/
+#include <mathbits.h>
+
/* All floating-point numbers can be put in one of these categories. */
enum
{
@@ -133,7 +152,7 @@ enum
/* Return number of classification appropriate for X. */
#define fpclassify(x) \
(sizeof (x) == sizeof (float) ? \
- __fpclassifyf (x) \
+ __fpclassifyf (x) \
: sizeof (x) == sizeof (double) ? \
__fpclassify (x) : __fpclassifyl (x))
@@ -145,7 +164,11 @@ enum
__signbit (x) : __signbitl (x))
/* Return nonzero value if X is not +-Inf or NaN. */
-#define isfinite(x) (fpclassify (x) >= FP_ZERO)
+#define isfinite(x) \
+ (sizeof (x) == sizeof (float) ? \
+ __finitef (x) \
+ : sizeof (x) == sizeof (double) ? \
+ __finite (x) : __finitel (x))
/* Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. */
#define isnormal(x) (fpclassify (x) == FP_NORMAL)
diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c
index 1a80355d0f..194b332c38 100644
--- a/nis/nss_compat/compat-pwd.c
+++ b/nis/nss_compat/compat-pwd.c
@@ -332,7 +332,7 @@ getpwent_next_nis_netgr (struct passwd *result, ent_t *ent, char *group,
if (ent->first == TRUE)
{
- bzero (&ent->netgrdata, sizeof (struct __netgrent));
+ memset (&ent->netgrdata, 0, sizeof (struct __netgrent));
__internal_setnetgrent (group, &ent->netgrdata);
ent->first = FALSE;
}
diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c
index 1596be560a..f4ecb981ab 100644
--- a/nss/nss_db/db-XXX.c
+++ b/nss/nss_db/db-XXX.c
@@ -63,7 +63,7 @@ internal_setent (int stayopen)
if (db == NULL)
{
- db = dbopen (DBFILE, O_RDONLY, 0, DB_BTREE, NULL);
+ db = __dbopen (DBFILE, O_RDONLY, 0, DB_BTREE, NULL);
if (db == NULL)
status = NSS_STATUS_UNAVAIL;
diff --git a/nss/nss_db/db-alias.c b/nss/nss_db/db-alias.c
index 2c44f4df79..51a63a8103 100644
--- a/nss/nss_db/db-alias.c
+++ b/nss/nss_db/db-alias.c
@@ -47,7 +47,7 @@ internal_setent (int stayopen)
if (db == NULL)
{
- db = dbopen (_PATH_VARDB "aliases.db", O_RDONLY, 0, DB_BTREE, NULL);
+ db = __dbopen (_PATH_VARDB "aliases.db", O_RDONLY, 0, DB_BTREE, NULL);
if (db == NULL)
status = NSS_STATUS_UNAVAIL;
diff --git a/nss/nss_db/db-netgrp.c b/nss/nss_db/db-netgrp.c
index b7c172ddb0..c27c8de9ca 100644
--- a/nss/nss_db/db-netgrp.c
+++ b/nss/nss_db/db-netgrp.c
@@ -49,7 +49,7 @@ _nss_db_setnetgrent (const char *group)
/* Make sure the data base file is open. */
if (db == NULL)
{
- db = dbopen (DBFILE, O_RDONLY, 0, DB_BTREE, NULL);
+ db = __dbopen (DBFILE, O_RDONLY, 0, DB_BTREE, NULL);
if (db == NULL)
status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
diff --git a/po/pl.po b/po/pl.po
index e0cb684098..bd71cfcf67 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,28 +1,21 @@
-# Polish translation for glibc-1.90.
+# Polish translation for GNU libc-2.0.3
# Copyright (C) 1996 Free Software Foundation, Inc.
-# Pawe³ Krawczyk <kravietz@pipeta.chemia.pk.edu.pl>, 1996.
+# Pawe³ Krawczyk <kravietz@ceti.com.pl>, 1996-97.
#
msgid ""
msgstr ""
-"Project-Id-Version: glibc 1.90\n"
-"POT-Creation-Date: 1996-05-29 14:03\n"
-"PO-Revision-Date: 1996-07-27 16:50+0100\n"
-"Last-Translator: Pawe³ Krawczyk <kravietz@pipeta.chemia.pk.edu.pl>\n"
+"Project-Id-Version: libc 2.0.3\n"
+"POT-Creation-Date: 1997-03-30 19:08+0200\n"
+"PO-Revision-Date: 1997-04-08 09:36+0200\n"
+"Last-Translator: Pawe³ Krawczyk <kravietz@ceti.com.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-2\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: sunrpc/rpc_main.c:80
-#, c-format
-msgid " %s [-c | -h | -l | -m] [-o outfile] [infile]\n"
-msgstr " %s [-c | -h | -l | -m] [-o plik_wy] [plik_we]\n"
-
-#: sunrpc/rpc_main.c:83
-#, c-format
-msgid " %s [-s udp|tcp]* [-o outfile] [infile]\n"
-msgstr " %s [-s udp|tcp]* [-o plik_wy] [plik_we]\n"
-
+# collation symbol...
+# collation element... dlaczego 'element ³±cz±cy' ??? -pk
+#
#: sunrpc/rpcinfo.c:612
msgid " rpcinfo -b prognum versnum\n"
msgstr " rpcinfo -b nr_programu nr_wersji\n"
@@ -43,212 +36,227 @@ msgstr " rpcinfo [ -n nr_portu ] -t host nr_programu [ nr_wersji ]\n"
msgid " program vers proto port\n"
msgstr " program wer. proto port\n"
-#: time/zic.c:423
+#: time/zic.c:419
#, c-format
msgid " (rule from \"%s\", line %d)"
msgstr " (regu³a z \"%s\", linia %d)"
-#: time/zic.c:420
+#: locale/programs/ld-collate.c:363 locale/programs/ld-ctype.c:1242
+msgid " done\n"
+msgstr " wykonano\n"
+
+#: time/zic.c:416
#, c-format
msgid "\"%s\", line %d: %s"
msgstr "\"%s\", linia %d: %s"
-#: time/zic.c:908
+#: time/zic.c:943
#, c-format
msgid "\"Zone %s\" line and -l option are mutually exclusive"
msgstr "Linia \"Zone %s\" i opcja -l wykluczaj± siê wzajemnie"
-#: time/zic.c:916
+#: time/zic.c:951
#, c-format
msgid "\"Zone %s\" line and -p option are mutually exclusive"
msgstr "Linia \"Zone %s\" i opcja -p wykluczaj± siê wzajemnie"
-#: time/zic.c:721
+#: time/zic.c:754
#, c-format
msgid "%s in ruleless zone"
msgstr "%s w strefie bez regu³"
-#: assert/assert.c:48
+#: assert/assert.c:46
#, c-format
msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
-msgstr "%s%s%s:%u: %s%sAsercja `%s' nie powiod³a siê.\n"
+msgstr "%s%s%s:%u: %s%sWarunek `%s' nie zosta³ spe³niony.\n"
-#: assert/assert-perr.c:46
+#: assert/assert-perr.c:47
#, c-format
msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
msgstr "%s%s%s:%u %s%sNiespodziewany b³±d: %s.\n"
-#: stdio-common/psignal.c:48
+#: stdio-common/psignal.c:47
#, c-format
msgid "%s%sUnknown signal %d\n"
msgstr "%s%sNieznany sygna³ %d\n"
-#: sunrpc/rpc_util.c:258
-#, c-format
-msgid "%s, line %d: "
-msgstr "%s, linia %d: "
-
-#: time/zic.c:2035
+#: time/zic.c:2172
#, c-format
msgid "%s: %d did not sign extend correctly\n"
msgstr "%s: %d niepoprawnie rozszerzy³ znak\n"
-#: time/zic.c:1339
+#: locale/programs/charmap.c:176
+#, c-format
+msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n"
+msgstr "%s: <mb_cur_max> musi byæ wiêkszy ni¿ <mb_cur_min>\n"
+
+#: time/zic.c:1443
#, c-format
msgid "%s: Can't create %s: %s\n"
msgstr "%s: Nie mogê stworzyæ %s: %s\n"
-#: time/zic.c:2014
+#: time/zic.c:2150
#, c-format
msgid "%s: Can't create directory %s: %s\n"
msgstr "%s: Nie mogê stworzyæ katalogu %s: %s\n"
-#: time/zic.c:600
+#: time/zic.c:608
#, c-format
msgid "%s: Can't link from %s to %s: %s\n"
msgstr "%s: Nie mogê dowi±zaæ %s do %s: %s\n"
-#: time/zic.c:746
+#: time/zic.c:780
#, c-format
msgid "%s: Can't open %s: %s\n"
msgstr "%s: Nie mogê otworzyæ %s: %s\n"
-#: time/zic.c:814
+#: time/zic.c:1433
+#, c-format
+msgid "%s: Can't remove %s: %s\n"
+msgstr "%s: Usuniêcie %s jest niemo¿liwe: %s\n"
+
+#: time/zic.c:849
#, c-format
msgid "%s: Error closing %s: %s\n"
msgstr "%s: B³±d przy zamykaniu %s: %s\n"
-#: time/zic.c:808
+#: time/zic.c:842
#, c-format
msgid "%s: Error reading %s\n"
msgstr "%s: B³±d odczytu %s\n"
-#: time/zic.c:1404
+#: time/zic.c:1507
#, c-format
msgid "%s: Error writing %s\n"
msgstr "%s: B³±d zapisu %s\n"
-#: time/zdump.c:257
+#: time/zdump.c:266
#, c-format
msgid "%s: Error writing standard output "
msgstr "%s: B³±d zapisu na standardowe wyj¶cie "
-#: time/zic.c:793
+#: time/zic.c:827
#, c-format
msgid "%s: Leap line in non leap seconds file %s\n"
msgstr "%s: linia Leap nie znajduje siê w pliku sekund przestêpnych %s\n"
-#: time/zic.c:360
+#: time/zic.c:357
#, c-format
msgid "%s: Memory exhausted: %s\n"
msgstr "%s: Brak pamiêci: %s\n"
-#: time/zic.c:515
+#: time/zic.c:522
#, c-format
msgid "%s: More than one -L option specified\n"
msgstr "%s: Podano wiêcej ni¿ jedn± opcjê -L\n"
-#: time/zic.c:475
+#: time/zic.c:482
#, c-format
msgid "%s: More than one -d option specified\n"
msgstr "%s: Podano wiêcej ni¿ jedn± opcjê -d\n"
-#: time/zic.c:485
+#: time/zic.c:492
#, c-format
msgid "%s: More than one -l option specified\n"
msgstr "%s: Podano wiêcej ni¿ jedn± opcjê -l\n"
-#: time/zic.c:495
+#: time/zic.c:502
#, c-format
msgid "%s: More than one -p option specified\n"
msgstr "%s: Podano wiêcej ni¿ jedn± opcjê -p\n"
-#: time/zic.c:505
+#: time/zic.c:512
#, c-format
msgid "%s: More than one -y option specified\n"
msgstr "%s: Podano wiêcej ni¿ jedn± opcjê -y\n"
-#: posix/getconf.c:149
-#, c-format
-msgid "%s: Unrecognized variable `%s'\n"
-msgstr "%s: Nierozpoznana zmienna `%s'\n"
-
-#: time/zic.c:1741
+#: time/zic.c:1872
#, c-format
msgid "%s: command was '%s', result was %d\n"
msgstr "%s: polecenie `%s' zwróci³o %d\n"
-#: posix/getopt.c:686
+#: locale/programs/charmap.c:593 locale/programs/locfile.c:900
+#, c-format
+msgid "%s: error in state machine"
+msgstr "%s: b³±d w funkcji stanu"
+
+#: posix/getopt.c:783
#, c-format
msgid "%s: illegal option -- %c\n"
-msgstr "%s: z³a opcja -- %c\n"
+msgstr "%s: niew³a¶ciwa opcja -- %c\n"
-#: posix/getopt.c:689
+#: posix/getopt.c:786
#, c-format
msgid "%s: invalid option -- %c\n"
msgstr "%s: b³êdna opcja -- %c\n"
-#: posix/getopt.c:610
+#: posix/getopt.c:707
#, c-format
msgid "%s: option `%c%s' doesn't allow an argument\n"
msgstr "%s: opcja `%c%s' nie mo¿e mieæ argumentów\n"
-#: posix/getopt.c:581
+#: posix/getopt.c:678
#, c-format
msgid "%s: option `%s' is ambiguous\n"
msgstr "%s: opcja `%s' jest niejednoznaczna\n"
-#: posix/getopt.c:627
+#: posix/getopt.c:724 posix/getopt.c:897
#, c-format
msgid "%s: option `%s' requires an argument\n"
msgstr "%s: opcja `%s' musi mieæ argument\n"
-#: posix/getopt.c:605
+#: posix/getopt.c:702
#, c-format
msgid "%s: option `--%s' doesn't allow an argument\n"
msgstr "%s: opcja `--%s' nie mo¿e mieæ argumentów\n"
-#: posix/getopt.c:725
+#: posix/getopt.c:881
#, c-format
-msgid "%s: option requires an argument -- %c\n"
-msgstr "%s: opcja musi mieæ argument -- %c\n"
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opcja `-W %s' nie mo¿e mieæ argumentów\n"
-#: sunrpc/rpc_main.c:146
+#: posix/getopt.c:863
#, c-format
-msgid "%s: output would overwrite %s\n"
-msgstr "%s: wyj¶cie nadpisze %s\n"
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opcja `-W %s' jest niejednoznaczna\n"
+
+#: posix/getopt.c:816 posix/getopt.c:946
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opcja musi mieæ argument -- %c\n"
-#: time/zic.c:800 zic.c:1212 zic.c:1232
+#: time/zic.c:834 time/zic.c:1246 time/zic.c:1266
#, c-format
msgid "%s: panic: Invalid l_value %d\n"
msgstr "%s: panika: B³êdna l-warto¶æ %d\n"
-#: sunrpc/rpc_main.c:152
+#: locale/programs/charmap.c:600
#, c-format
-msgid "%s: unable to open "
-msgstr "%s: nie mogê otworzyæ "
+msgid "%s: premature end of file"
+msgstr "%s: przedwczesny koniec pliku"
-#: posix/getopt.c:660
+#: posix/getopt.c:757
#, c-format
msgid "%s: unrecognized option `%c%s'\n"
msgstr "%s: nieznana opcja `%c%s'\n"
-#: posix/getopt.c:656
+#: posix/getopt.c:753
#, c-format
msgid "%s: unrecognized option `--%s'\n"
msgstr "%s: nieznana opcja `--%s'\n"
-#: time/zic.c:432
+#: time/zic.c:441
#, c-format
msgid ""
-"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d directory ]\n"
+"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d "
+"directory ]\n"
"\t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
msgstr ""
"%s: sk³adnia: %s [ -s ] [ -v ] [ -l czas_lokalny ] [ -p regu³y_POSIX ]\n"
"\t[ -d katalog ] [ -L sek_przestêpne ] [ -y yearistype ]\n"
"\t[ plik ... ]\n"
-#: time/zdump.c:165
+#: time/zdump.c:174
#, c-format
msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"
msgstr "%s: sk³adnia: %s [ -v ] [ -c rok ] nazwa_strefy...\n"
@@ -256,236 +264,549 @@ msgstr "%s: sk³adnia: %s [ -v ] [ -c rok ] nazwa_strefy...\n"
#: sunrpc/clnt_perr.c:125
#, c-format
msgid "(unknown authentication error - %d)"
-msgstr "(nieznany b³±d uwierzytelniania - %d)"
+msgstr "(nieznany b³±d autoryzacji - %d)"
#: sunrpc/rpcinfo.c:555
msgid "(unknown)"
msgstr "(nieznany)"
-#: catgets/gencat.c:242
+#: catgets/gencat.c:254
msgid "*standard input*"
msgstr "*standardowe wej¶cie*"
-#: inet/rcmd.c:325
+#: stdio-common/../sysdeps/gnu/errlist.c:766
+msgid ".lib section in a.out corrupted"
+msgstr "sekcja .lib w a.out jest uszkodzona"
+
+#: inet/rcmd.c:363
msgid ".rhosts fstat failed"
-msgstr "fstat pliku .rhosts nieudany"
+msgstr "fstat pliku .rhosts nieudane"
-#: inet/rcmd.c:321
+#: inet/rcmd.c:359
msgid ".rhosts lstat failed"
-msgstr "lstat pliku .rhosts nieudany"
+msgstr "lstat pliku .rhosts nieudane"
-#: inet/rcmd.c:323
+#: inet/rcmd.c:361
msgid ".rhosts not regular file"
msgstr ".rhosts nie jest zwyk³ym plikiem"
-#: inet/rcmd.c:329
+#: inet/rcmd.c:367
msgid ".rhosts writeable by other than owner"
msgstr ".rhosts zapisywalny nie tylko przez w³a¶ciciela"
-#: clnt_perr.c:133 sunrpc/clnt_perr.c:112
+#: sunrpc/clnt_perr.c:112 sunrpc/clnt_perr.c:133
#, c-format
msgid "; low version = %lu, high version = %lu"
-msgstr "; wersja minor = %lu, wersja major = %lu"
+msgstr "; wersja poboczna = %lu, wersja g³ówna = %lu"
#: sunrpc/clnt_perr.c:119
msgid "; why = "
-msgstr "; why = "
+msgstr "; bo = "
+
+#: locale/programs/ld-ctype.c:331
+#, c-format
+msgid "<SP> character must not be in class `%s'"
+msgstr "znak <SP> nie mo¿e znajdowaæ siê w klasie `%s'"
+
+#: locale/programs/ld-ctype.c:321
+#, c-format
+msgid "<SP> character not in class `%s'"
+msgstr "znak <SP> nie jest w klasie `%s'"
+#. TRANS The experienced user will know what is wrong.
+#. TRANS @c This error code is a joke. Its perror text is part of the joke.
+#. TRANS @c Don't change it.
+#: stdio-common/../sysdeps/gnu/errlist.c:591
msgid "?"
msgstr "?"
+#: sysdeps/unix/sysv/linux/siglist.h:27
+msgid "Aborted"
+msgstr "Przerwane"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:762
+msgid "Accessing a corrupted shared library"
+msgstr "U¿ycie uszkodzonej biblioteki dzielonej"
+
+#. TRANS The requested socket address is already in use. @xref{Socket Addresses}.
+#: stdio-common/../sysdeps/gnu/errlist.c:354
msgid "Address already in use"
msgstr "Adres jest ju¿ w u¿yciu"
-msgid "Address family not supported by protocol family"
-msgstr "Rodzina adresów nie obs³ugiwana przez rodzinê protoko³ów"
+#. TRANS The address family specified for a socket is not supported; it is
+#. TRANS inconsistent with the protocol being used on the socket. @xref{Sockets}.
+#: stdio-common/../sysdeps/gnu/errlist.c:349
+msgid "Address family not supported by protocol"
+msgstr "Rodzina adresów nie obs³ugiwana przez protokó³"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:730
+msgid "Advertise error"
+msgstr "B³±d podczas og³aszania"
+#: stdio-common/../sysdeps/unix/siglist.c:43
+#: sysdeps/unix/sysv/linux/siglist.h:33
msgid "Alarm clock"
msgstr "Budzik"
+#. TRANS Argument list too long; used when the arguments passed to a new program
+#. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a
+#. TRANS File}) occupy too much memory space. This condition never arises in the
+#. TRANS GNU system.
+#: stdio-common/../sysdeps/gnu/errlist.c:57
msgid "Argument list too long"
msgstr "Lista argumentów za d³uga"
+#: stdio-common/../sysdeps/gnu/errlist.c:770
+msgid "Attempting to link in too many shared libraries"
+msgstr "Próba ³±czenia ze zbyt wieloma bibliotekami dzielonymi"
+
#: sunrpc/clnt_perr.c:276
msgid "Authentication OK"
-msgstr "Uwierzytelnienie powiod³o siê"
+msgstr "Autoryzacja OK"
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:549
msgid "Authentication error"
-msgstr "B³±d podczas uwierzytelniania"
+msgstr "B³±d autoryzacji"
+#. TRANS Bad address; an invalid pointer was detected.
+#. TRANS In the GNU system, this error never happens; you get a signal instead.
+#: stdio-common/../sysdeps/gnu/errlist.c:102
msgid "Bad address"
-msgstr "Z³y adres"
+msgstr "B³êdny adres"
+#. TRANS Bad file descriptor; for example, I/O on a descriptor that has been
+#. TRANS closed or reading from a descriptor open only for writing (or vice
+#. TRANS versa).
+#: stdio-common/../sysdeps/gnu/errlist.c:70
msgid "Bad file descriptor"
-msgstr "Z³y deskryptor pliku"
+msgstr "B³êdny deskryptor pliku"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:718
+msgid "Bad font file format"
+msgstr "B³êdny format pliku czcionek"
+#: stdio-common/../sysdeps/gnu/errlist.c:610
+msgid "Bad message"
+msgstr "B³êdny komunikat"
+
+#: stdio-common/../sysdeps/unix/siglist.c:41
+#: sysdeps/unix/sysv/linux/siglist.h:56
+msgid "Bad system call"
+msgstr "B³êdne wywo³anie systemowe"
+
+#. TRANS A file that isn't a block special file was given in a situation that
+#. TRANS requires one. For example, trying to mount an ordinary file as a file
+#. TRANS system in Unix gives this error.
+#: stdio-common/../sysdeps/gnu/errlist.c:109
msgid "Block device required"
msgstr "Wymagane urz±dzenie blokowe"
-#: sunrpc/pmap_rmt.c:336
+#: sunrpc/pmap_rmt.c:338
msgid "Broadcast select problem"
msgstr "Problem przy wyborze transmisji"
+#. TRANS Broken pipe; there is no process reading from the other end of a pipe.
+#. TRANS Every library function that returns this error code also generates a
+#. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled
+#. TRANS or blocked. Thus, your program will never actually see @code{EPIPE}
+#. TRANS unless it has handled or blocked @code{SIGPIPE}.
+#: stdio-common/../sysdeps/gnu/errlist.c:222
+#: stdio-common/../sysdeps/unix/siglist.c:42
+#: sysdeps/unix/sysv/linux/siglist.h:32
msgid "Broken pipe"
msgstr "Przerwany potok"
+#: stdio-common/../sysdeps/unix/siglist.c:39
+#: sysdeps/unix/sysv/linux/siglist.h:30
msgid "Bus error"
msgstr "B³±d szyny"
+#: sysdeps/unix/sysv/linux/siglist.h:43
msgid "CPU time limit exceeded"
msgstr "Przekroczony limit czasu procesora"
-msgid "Can't assign requested address"
-msgstr "Nie mogê przypisaæ ¿±danego adresu"
+#: stdio-common/../sysdeps/gnu/errlist.c:758
+msgid "Can not access a needed shared library"
+msgstr "Brak dostêpu do wymaganej biblioteki dzielonej"
+
+#: nis/ypclnt.c:695
+msgid "Can't bind to server which serves this domain"
+msgstr "Po³±czenie z serwerem dla tej domeny jest niemo¿liwe"
+
+#: nis/ypclnt.c:707
+msgid "Can't communicate with portmapper"
+msgstr "Komunikacja z portmapperem jest niemo¿liwa"
+
+#: nis/ypclnt.c:709
+msgid "Can't communicate with ypbind"
+msgstr "Komunikacja z ypbind jest niemo¿liwa"
-msgid "Can't send after socket shutdown"
-msgstr "Nie mogê wysy³aæ po zamkniêciu gniazda"
+#: nis/ypclnt.c:711
+msgid "Can't communicate with ypserv"
+msgstr "Komunikacja z ypserv jest niemo¿liwa"
+#. TRANS No memory available. The system cannot allocate more virtual memory
+#. TRANS because its capacity is full.
+#: stdio-common/../sysdeps/gnu/errlist.c:91
msgid "Cannot allocate memory"
-msgstr "Nie mogê zarezerwowaæ pamiêci"
+msgstr "Zarezerwowanie pamiêci niemo¿liwe"
-#: sunrpc/pmap_rmt.c:254
+#. TRANS The requested socket address is not available; for example, you tried
+#. TRANS to give a socket a name that doesn't match the local host name.
+#. TRANS @xref{Socket Addresses}.
+#: stdio-common/../sysdeps/gnu/errlist.c:361
+msgid "Cannot assign requested address"
+msgstr "Przypisanie ¿±danego adresu niemo¿liwe"
+
+#: sunrpc/pmap_rmt.c:255
msgid "Cannot create socket for broadcast rpc"
-msgstr "Nie mogê stworzyæ gniazda dla transmisji rpc"
+msgstr "Stworzenie gniazda dla transmisji rpc niemo¿liwe"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:774
+msgid "Cannot exec a shared library directly"
+msgstr "Bezpo¶rednie uruchomienie biblioteki dzielonej jest niemo¿liwe"
-#: sunrpc/pmap_rmt.c:348
+#: sunrpc/pmap_rmt.c:350
msgid "Cannot receive reply to broadcast"
-msgstr "Nie dostajê odpowiedzi na transmisjê"
+msgstr "Brak odpowiedzi na transmisjê"
#: sunrpc/pmap_clnt.c:79
msgid "Cannot register service"
-msgstr "Nie mogê zarejestrowaæ us³ugi"
+msgstr "Zarejestrowanie us³ugi niemo¿liwe"
+
+#. TRANS The socket has already been shut down.
+#: stdio-common/../sysdeps/gnu/errlist.c:422
+msgid "Cannot send after transport endpoint shutdown"
+msgstr "Wysy³anie po zamkniêciu gniazda niemo¿liwe"
-#: sunrpc/pmap_rmt.c:312
+#: sunrpc/pmap_rmt.c:313
msgid "Cannot send broadcast packet"
-msgstr "Nie mogê wys³aæ pakietu transmisji"
+msgstr "Wys³anie pakietu transmisji niemo¿liwe"
-#: sunrpc/pmap_rmt.c:260
+#: sunrpc/pmap_rmt.c:261
msgid "Cannot set socket option SO_BROADCAST"
-msgstr "Nie mogê ustawiæ opcji gniazda SO_BROADCAST"
+msgstr "Ustawienie opcji gniazda SO_BROADCAST niemo¿liwe"
+#: stdio-common/../sysdeps/gnu/errlist.c:658
+msgid "Channel number out of range"
+msgstr "Numer kana³u poza zakresem"
+
+#: stdio-common/../sysdeps/unix/siglist.c:49
+#: sysdeps/unix/sysv/linux/siglist.h:39
msgid "Child exited"
-msgstr "Proces potomny zakoñczy³"
+msgstr "Proces potomny zakoñczy³ pracê"
#: sunrpc/clnt_perr.c:286
msgid "Client credential too weak"
-msgstr "Wiarygodno¶æ klienta jest zbyt ma³a"
+msgstr "Wiarygodno¶æ klienta zbyt ma³a"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:738
+msgid "Communication error on send"
+msgstr "B³±d komunikacji podczas wysy³ania"
+#. TRANS Go home and have a glass of warm, dairy-fresh milk.
+#: stdio-common/../sysdeps/gnu/errlist.c:601
msgid "Computer bought the farm"
-msgstr "Komputer kupil farme"
+msgstr "Komputer kupi³ gospodarstwo"
+#: locale/programs/ld-ctype.c:1204
+msgid "Computing table size for character classes might take a while..."
+msgstr "Obliczanie rozmiaru tablicy klas znaków mo¿e chwilê potrwaæ..."
+
+#: locale/programs/ld-collate.c:329
+msgid "Computing table size for collation information might take a while..."
+msgstr "Obliczanie rozmiaru tablicy sortowania mo¿e chwilê potrwaæ..."
+
+#. TRANS A remote host refused to allow the network connection (typically because
+#. TRANS it is not running the requested service).
+#: stdio-common/../sysdeps/gnu/errlist.c:439
msgid "Connection refused"
-msgstr "Po³±czenie odrzucone"
+msgstr "Odmowa po³±czenia"
+#. TRANS A network connection was closed for reasons outside the control of the
+#. TRANS local host, such as by the remote machine rebooting or an unrecoverable
+#. TRANS protocol violation.
+#: stdio-common/../sysdeps/gnu/errlist.c:389
msgid "Connection reset by peer"
msgstr "Po³±czenie zerwane przez drug± stronê"
+#. TRANS A socket operation with a specified timeout received no response during
+#. TRANS the timeout period.
+#: stdio-common/../sysdeps/gnu/errlist.c:433
msgid "Connection timed out"
-msgstr "Nie doczeka³em siê po³±czenia"
+msgstr "Po³±czenie nie doczekane"
+#: stdio-common/../sysdeps/unix/siglist.c:48
+#: sysdeps/unix/sysv/linux/siglist.h:38
msgid "Continued"
msgstr "Kontynuacja"
+#: catgets/gencat.c:169 db/makedb.c:120 locale/programs/locale.c:187
+#: locale/programs/localedef.c:180
+#, c-format
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"Oprogramowanie darmowe. Warunki kopiowania zamieszczone s± w kodzie "
+"¼ród³owym.\n"
+"Nie podlega ¿adnej gwarancji, nawet gwarancji przydatno¶ci do "
+"jakiegokolwiek\n"
+"zastosowania lub sprzeda¿y.\n"
+
+#: stdio-common/../sysdeps/unix/siglist.c:53
+msgid "Cputime limit exceeded"
+msgstr "Przekroczenie limitu czasu procesora"
+
+#: nis/ypclnt.c:721
+msgid "Database is busy"
+msgstr "Baza danych jest zajêta"
+
+#. TRANS No default destination address was set for the socket. You get this
+#. TRANS error when you try to transmit data over a connectionless socket,
+#. TRANS without first specifying a destination for the data with @code{connect}.
+#: stdio-common/../sysdeps/gnu/errlist.c:417
msgid "Destination address required"
msgstr "Wymagany adres docelowy"
-msgid "Device busy"
-msgstr "Urz±dzenie zajête"
+#: stdio-common/../sysdeps/gnu/errlist.c:638
+msgid "Device not a stream"
+msgstr "Urz±dzenie nie jest strumieniem"
+#. TRANS No such device or address. The system tried to use the device
+#. TRANS represented by a file you specified, and it couldn't find the device.
+#. TRANS This can mean that the device file was installed incorrectly, or that
+#. TRANS the physical device is missing or not correctly attached to the
+#. TRANS computer.
+#: stdio-common/../sysdeps/gnu/errlist.c:49
msgid "Device not configured"
-msgstr "Urz±dzenie nie skofigurowane"
-
+msgstr "Urz±dzenie nie jest skonfigurowane"
+
+#. TRANS Resource busy; a system resource that can't be shared is already in use.
+#. TRANS For example, if you try to delete a file that is the root of a currently
+#. TRANS mounted filesystem, you get this error.
+#: stdio-common/../sysdeps/gnu/errlist.c:116
+msgid "Device or resource busy"
+msgstr "Urz±dzenie lub zasoby s± zajête"
+
+#. TRANS Directory not empty, where an empty directory was expected. Typically,
+#. TRANS this error occurs when you are trying to delete a directory.
+#: stdio-common/../sysdeps/gnu/errlist.c:468
msgid "Directory not empty"
msgstr "Katalog nie jest pusty"
+#. TRANS The user's disk quota was exceeded.
+#: stdio-common/../sysdeps/gnu/errlist.c:486
msgid "Disc quota exceeded"
msgstr "Przekroczony limit dyskowy"
+#: nis/ypclnt.c:767
+msgid "Domain not bound"
+msgstr "Domena nie zosta³a zwi±zana"
+
+#: stdio-common/../sysdeps/unix/siglist.c:36
+#: sysdeps/unix/sysv/linux/siglist.h:53
+msgid "EMT trap"
+msgstr "pu³apka EMT"
+
#: sunrpc/clnt_perr.c:254
#, c-format
msgid "Error %d"
msgstr "B³±d %d"
-#: string/../sysdeps/mach/_strerror.c:43
+#: string/../sysdeps/mach/_strerror.c:52
msgid "Error in unknown error system: "
-msgstr "B³±d w nieznanym systemie: "
+msgstr "B³±d w nieznanym systemie b³êdów: "
+
+#: inet/ruserpass.c:161
+msgid "Error: .netrc file is readable by others."
+msgstr "B³±d: plik .netrc mo¿e byæ czytany przez ka¿dego."
+#: stdio-common/../sysdeps/gnu/errlist.c:698
+msgid "Exchange full"
+msgstr "Przepe³niona wymiana"
+
+#. TRANS Invalid executable file format. This condition is detected by the
+#. TRANS @code{exec} functions; see @ref{Executing a File}.
+#: stdio-common/../sysdeps/gnu/errlist.c:63
msgid "Exec format error"
msgstr "B³êdny format pliku wykonywalnego"
+#: locale/programs/localedef.c:216
+msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'"
+msgstr "PRZERWANIE: system nie definiuje `_POSIX2_LOCALEDEF'"
+
#: sunrpc/clnt_perr.c:290
msgid "Failed (unspecified error)"
-msgstr "Bez powodzenia (nieustalony b³±d)"
+msgstr "Nieudane (nieustalony b³±d)"
+#: stdio-common/../sysdeps/gnu/errlist.c:750
+msgid "File descriptor in bad state"
+msgstr "Deskryptor pliku w z³ym stanie"
+
+#. TRANS File exists; an existing file was specified in a context where it only
+#. TRANS makes sense to specify a new file.
+#: stdio-common/../sysdeps/gnu/errlist.c:122
msgid "File exists"
msgstr "Plik istnieje"
+#: stdio-common/../sysdeps/gnu/errlist.c:714
+msgid "File locking deadlock error"
+msgstr "B³±d zakleszczenia podczas blokowania pliku"
+
+#. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for
+#. TRANS Files}) or host name too long (in @code{gethostname} or
+#. TRANS @code{sethostname}; @pxref{Host Identification}).
+#: stdio-common/../sysdeps/gnu/errlist.c:452
msgid "File name too long"
msgstr "Za d³uga nazwa pliku"
+#: sysdeps/unix/sysv/linux/siglist.h:44
msgid "File size limit exceeded"
msgstr "Przekroczony limit wielko¶ci pliku"
+#. TRANS File too big; the size of a file would be larger than allowed by the system.
+#: stdio-common/../sysdeps/gnu/errlist.c:190
msgid "File too large"
msgstr "Plik jest za du¿y"
+#: stdio-common/../sysdeps/unix/siglist.c:54
+msgid "Filesize limit exceeded"
+msgstr "Przekroczenie limitu wielko¶ci pliku"
+
+#: stdio-common/../sysdeps/unix/siglist.c:37
+#: sysdeps/unix/sysv/linux/siglist.h:28
msgid "Floating point exception"
msgstr "B³±d w obliczeniach zmiennoprzecinkowych"
+#. TRANS Function not implemented. Some functions have commands or options defined
+#. TRANS that might not be supported in all implementations, and this is the kind
+#. TRANS of error you get if you request them and they are not supported.
+#: stdio-common/../sysdeps/gnu/errlist.c:561
msgid "Function not implemented"
msgstr "Funkcja niezaimplementowana"
+#. TRANS This error code has no purpose.
+#: stdio-common/../sysdeps/gnu/errlist.c:606
msgid "Gratuitous error"
-msgstr "Nieuzasadniony b³±d"
+msgstr "Nieoczekiwany b³±d"
+#: stdio-common/../sysdeps/unix/siglist.c:30
+#: sysdeps/unix/sysv/linux/siglist.h:22
msgid "Hangup"
msgstr "Roz³±czenie"
+#. TRANS The remote host for a requested network connection is down.
+#: stdio-common/../sysdeps/gnu/errlist.c:457
msgid "Host is down"
msgstr "Host nie odpowiada"
-#: resolv/herror.c:74
+#: resolv/herror.c:75
msgid "Host name lookup failure"
-msgstr "Nazwa hosta nie odnaleziona"
+msgstr "Odnalezienie nazwy hosta jest niemo¿liwe"
+#: stdio-common/../sysdeps/unix/siglist.c:52
+#: sysdeps/unix/sysv/linux/siglist.h:42
msgid "I/O possible"
-msgstr "We/Wy mo¿liwe"
+msgstr "We/Wy dozwolone"
+#: stdio-common/../sysdeps/unix/siglist.c:35
msgid "IOT trap"
msgstr "pu³apka IOT"
+#: stdio-common/../sysdeps/gnu/errlist.c:614
+msgid "Identifier removed"
+msgstr "Identyfikator zosta³ usuniêty"
+
+#: sysdeps/unix/sysv/linux/siglist.h:25
msgid "Illegal Instruction"
msgstr "Nieznana Instrukcja"
+#: stdio-common/../sysdeps/unix/siglist.c:33
+msgid "Illegal instruction"
+msgstr "B³êdna instrukcja"
+
+#. TRANS Invalid seek operation (such as on a pipe).
+#: stdio-common/../sysdeps/gnu/errlist.c:201
msgid "Illegal seek"
msgstr "B³êdne przesuniêcie"
+#. TRANS Inappropriate file type or format. The file was the wrong type for the
+#. TRANS operation, or a data file had the wrong format.
+#. TRANS
+#. TRANS On some systems @code{chmod} returns this error if you try to set the
+#. TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}.
+#: stdio-common/../sysdeps/gnu/errlist.c:544
msgid "Inappropriate file type or format"
msgstr "Niew³a¶ciwy typ lub format pliku"
+#. TRANS Inappropriate I/O control operation, such as trying to set terminal
+#. TRANS modes on an ordinary file.
+#: stdio-common/../sysdeps/gnu/errlist.c:176
msgid "Inappropriate ioctl for device"
msgstr "Niew³a¶ciwy dostêp do urz±dzenia"
+#. TRANS In the GNU system, servers supporting the @code{term} protocol return
+#. TRANS this error for certain operations when the caller is not in the
+#. TRANS foreground process group of the terminal. Users do not usually see this
+#. TRANS error because functions such as @code{read} and @code{write} translate
+#. TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control},
+#. TRANS for information on process groups and these signals.
+#: stdio-common/../sysdeps/gnu/errlist.c:577
msgid "Inappropriate operation for background process"
msgstr "Dzia³anie niedopuszczalne dla procesu w tle"
+#: sysdeps/unix/sysv/linux/siglist.h:62
+msgid "Information request"
+msgstr "¯±danie informacji"
+
+#. TRANS Input/output error; usually used for physical read or write errors.
+#: stdio-common/../sysdeps/gnu/errlist.c:40
msgid "Input/output error"
msgstr "B³±d wej¶cia/wyj¶cia"
+#: nis/ypclnt.c:701
+msgid "Internal NIS error"
+msgstr "B³±d wewnêtrzny NIS"
+
+#: nis/ypclnt.c:765
+msgid "Internal ypbind error"
+msgstr "B³±d wewnêtrzny ypbind"
+
+#: stdio-common/../sysdeps/unix/siglist.c:31
+#: sysdeps/unix/sysv/linux/siglist.h:23
msgid "Interrupt"
msgstr "Przerwanie"
+#. TRANS Interrupted function call; an asynchronous signal occurred and prevented
+#. TRANS completion of the call. When this happens, you should try the call
+#. TRANS again.
+#. TRANS
+#. TRANS You can choose to have functions resume after a signal that is handled,
+#. TRANS rather than failing with @code{EINTR}; see @ref{Interrupted
+#. TRANS Primitives}.
+#: stdio-common/../sysdeps/gnu/errlist.c:35
msgid "Interrupted system call"
msgstr "Przerwane wywo³anie systemowe"
+#: stdio-common/../sysdeps/gnu/errlist.c:654
+msgid "Interrupted system call should be restarted"
+msgstr "Nale¿y wznowiæ przerwane wywo³anie systemowe"
+
+#. TRANS Invalid argument. This is used to indicate various kinds of problems
+#. TRANS with passing the wrong argument to a library function.
+#: stdio-common/../sysdeps/gnu/errlist.c:152
msgid "Invalid argument"
msgstr "Z³y argument"
-#: posix/regex.c:946
+#: posix/regex.c:960
msgid "Invalid back reference"
msgstr "B³êdny odno¶nik wstecz"
-#: posix/regex.c:944
+#: posix/regex.c:958
msgid "Invalid character class name"
msgstr "B³êdna nazwa klasy znaku"
@@ -497,76 +818,213 @@ msgstr "B³êdne uwierzytelnienie klienta"
msgid "Invalid client verifier"
msgstr "B³êdny weryfikator klienta"
-#: posix/regex.c:943
+#: posix/regex.c:957
msgid "Invalid collation character"
-msgstr "B³êdny znak porównania"
+msgstr "B³êdny znak sortowany"
-#: posix/regex.c:950
+#: posix/regex.c:964
msgid "Invalid content of \\{\\}"
msgstr "B³êdna zawarto¶æ \\{\\}"
+#. TRANS An attempt to make an improper link across file systems was detected.
+#. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but
+#. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}).
+#: stdio-common/../sysdeps/gnu/errlist.c:129
msgid "Invalid cross-device link"
msgstr "B³êdne dowi±zanie miêdzy urz±dzeniami"
-#: posix/regex.c:953
+#: stdio-common/../sysdeps/gnu/errlist.c:690
+msgid "Invalid exchange"
+msgstr "B³êdna wymiana"
+
+#. TRANS While decoding a multibyte character the function came along an invalid
+#. TRANS or an incomplete sequence of bytes or the given wide character is invalid.
+#: stdio-common/../sysdeps/gnu/errlist.c:567
+msgid "Invalid or incomplete multibyte or wide character"
+msgstr "B³êdny lub niepe³ny znak wielobajtowy"
+
+#: posix/regex.c:967
msgid "Invalid preceding regular expression"
msgstr "B³êdne poprzedzaj±ce wyra¿enie regularne"
-#: posix/regex.c:951
+#: posix/regex.c:965
msgid "Invalid range end"
msgstr "B³êdny koniec zakresu"
-#: posix/regex.c:942
+#: posix/regex.c:956
msgid "Invalid regular expression"
msgstr "B³êdne wyra¿enie regularne"
+#: stdio-common/../sysdeps/gnu/errlist.c:706
+msgid "Invalid request code"
+msgstr "Z³y kod ¿±dania"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:694
+msgid "Invalid request descriptor"
+msgstr "B³êdny deskryptor ¿±dania"
+
#: sunrpc/clnt_perr.c:288
msgid "Invalid server verifier"
msgstr "B³êdny weryfikator serwera"
+#: stdio-common/../sysdeps/gnu/errlist.c:710
+msgid "Invalid slot"
+msgstr "B³êdny kana³"
+
+#. TRANS File is a directory; you cannot open a directory for writing,
+#. TRANS or create or remove hard links to it.
+#: stdio-common/../sysdeps/gnu/errlist.c:146
msgid "Is a directory"
-msgstr "To jest katalog"
+msgstr "Jest katalogiem"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:794
+msgid "Is a named type file"
+msgstr "Jest plikiem nazwanym"
+#: stdio-common/../sysdeps/unix/siglist.c:38
+#: sysdeps/unix/sysv/linux/siglist.h:29
msgid "Killed"
-msgstr "Zabity"
+msgstr "Unicestwiony"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:686
+msgid "Level 2 halted"
+msgstr "Poziom 2 zatrzymany"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:662
+msgid "Level 2 not synchronized"
+msgstr "Poziom 2 brak synchronizacji"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:666
+msgid "Level 3 halted"
+msgstr "Poziom 3 zatrzymany"
-#: posix/regex.c:952
+#: stdio-common/../sysdeps/gnu/errlist.c:670
+msgid "Level 3 reset"
+msgstr "Poziom 3 wyzerowany"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:626
+msgid "Link has been severed"
+msgstr "Po³±czenie zosta³o przerwane"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:674
+msgid "Link number out of range"
+msgstr "Numer dowi±zania poza zakresem"
+
+#: nis/ypclnt.c:713
+msgid "Local domain name not set"
+msgstr "Lokalna domena nie jest ustawiona"
+
+#: nis/ypclnt.c:703
+msgid "Local resource allocation failure"
+msgstr "Wyst±pi³ b³±d podczas przydzielania lokalnych zasobów"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:722
+msgid "Machine is not on the network"
+msgstr "Maszyna nie znajduje siê w tej sieci"
+
+#: posix/regex.c:966
msgid "Memory exhausted"
msgstr "Pamiêæ wyczerpana"
+#. TRANS The size of a message sent on a socket was larger than the supported
+#. TRANS maximum size.
+#: stdio-common/../sysdeps/gnu/errlist.c:305
msgid "Message too long"
msgstr "Komunikat za d³ugi"
+# wydaje mi sie ze tu chodzi o wyczerpanie TTL i stad 'zbyt' -PK
+#: stdio-common/../sysdeps/gnu/errlist.c:618
+msgid "Multihop attempted"
+msgstr "Próba przej¶cia przez zbyt wiele ruterów"
+
+#: nis/ypclnt.c:717
+msgid "NIS client/server version mismatch - can't supply service"
+msgstr "Niezgodno¶æ wersji miêdzy klientem i serwerem NIS - us³uga niemo¿liwa"
+
+#: nis/ypclnt.c:715
+msgid "NIS map data base is bad"
+msgstr "Mapa NIS zawiera b³êdy"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:746
+msgid "Name not unique on network"
+msgstr "Istnieje ju¿ taka nazwa w sieci"
+
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:554
msgid "Need authenticator"
-msgstr "Wymagane uwierzytelnienie"
+msgstr "Wymagana autoryzacja"
+#. TRANS A network connection was reset because the remote host crashed.
+#: stdio-common/../sysdeps/gnu/errlist.c:377
msgid "Network dropped connection on reset"
msgstr "Sieæ przerwa³a po³±czenie po resecie"
+#. TRANS A socket operation failed because the network was down.
+#: stdio-common/../sysdeps/gnu/errlist.c:366
msgid "Network is down"
-msgstr "Sieæ le¿y"
+msgstr "Sieæ nie dzia³a"
+#. TRANS A socket operation failed because the subnet containing the remote host
+#. TRANS was unreachable.
+#: stdio-common/../sysdeps/gnu/errlist.c:372
msgid "Network is unreachable"
-msgstr "Sieæ niedostêpna"
+msgstr "Sieæ jest niedostêpna"
-#: resolv/herror.c:76
+#: stdio-common/../sysdeps/gnu/errlist.c:682
+msgid "No CSI structure available"
+msgstr "Struktura CSI niedostêpna"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:790
+msgid "No XENIX semaphores available"
+msgstr "Brak dostêpnych semaforów XENIXowych"
+
+#: resolv/herror.c:77
msgid "No address associated with name"
msgstr "Brak adresu zwi±zanego z nazw±"
+#: stdio-common/../sysdeps/gnu/errlist.c:702
+msgid "No anode"
+msgstr "Brak anody"
+
+#. TRANS The kernel's buffers for I/O operations are all in use. In GNU, this
+#. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the
+#. TRANS other from network operations.
+#: stdio-common/../sysdeps/gnu/errlist.c:396
msgid "No buffer space available"
msgstr "Brak miejsca w buforze"
+#. TRANS There are no child processes. This error happens on operations that are
+#. TRANS supposed to manipulate child processes, when there aren't any processes
+#. TRANS to manipulate.
+#: stdio-common/../sysdeps/gnu/errlist.c:77
msgid "No child processes"
msgstr "Brak procesów potomnych"
+#: stdio-common/../sysdeps/gnu/errlist.c:622
+msgid "No data available"
+msgstr "Brak danych"
+
+#. TRANS No locks available. This is used by the file locking facilities; see
+#. TRANS @ref{File Locks}. This error is never generated by the GNU system, but
+#. TRANS it can result from an operation to an NFS server running another
+#. TRANS operating system.
+#: stdio-common/../sysdeps/gnu/errlist.c:535
msgid "No locks available"
msgstr "Brak dostêpnych blokad"
-#: posix/regex.c:941
+#: posix/regex.c:955
msgid "No match"
msgstr "Nic nie pasuje"
-#: posix/regex.c:5200
+#: stdio-common/../sysdeps/gnu/errlist.c:630
+msgid "No message of desired type"
+msgstr "Brak komunikatu o po¿±danym typie"
+
+#: nis/ypclnt.c:705
+msgid "No more records in map database"
+msgstr "Nie ma wiêcej rekordów w mapie"
+
+#: posix/regex.c:5324
msgid "No previous regular expression"
msgstr "Brak wyra¿enia regularnego"
@@ -574,86 +1032,213 @@ msgstr "Brak wyra¿enia regularnego"
msgid "No remote programs registered.\n"
msgstr "Brak zarejestrowanych zdalnych programów.\n"
+#. TRANS The remote host for a requested network connection is not reachable.
+#: stdio-common/../sysdeps/gnu/errlist.c:462
msgid "No route to host"
-msgstr "Brak drogi do hosta"
+msgstr "Brak drogi do systemu"
+#. TRANS No space left on device; write operation on a file failed because the
+#. TRANS disk is full.
+#: stdio-common/../sysdeps/gnu/errlist.c:196
msgid "No space left on device"
msgstr "Brak miejsca na urz±dzeniu"
+#. TRANS No such file or directory. This is a ``file doesn't exist'' error
+#. TRANS for ordinary files that are referenced in contexts where they are
+#. TRANS expected to already exist.
+#: stdio-common/../sysdeps/gnu/errlist.c:19
msgid "No such file or directory"
-msgstr "Nie ma takiego pliku lub katalogu"
+msgstr "Nie ma takiego pliku ani katalogu"
+#: nis/ypclnt.c:699
+msgid "No such key in map"
+msgstr "Brak takiego klucza w mapie"
+
+#: nis/ypclnt.c:697
+msgid "No such map in server's domain"
+msgstr "Nie ma takiej mapy w domenie serwera"
+
+#. TRANS No process matches the specified process ID.
+#: stdio-common/../sysdeps/gnu/errlist.c:24
msgid "No such process"
msgstr "Nie ma takiego procesu"
+#: stdio-common/../sysdeps/gnu/errlist.c:786
+msgid "Not a XENIX named type file"
+msgstr "To nie jest nazwanego pliku w wersji XENIXa"
+
+#. TRANS A file that isn't a directory was specified when a directory is required.
+#: stdio-common/../sysdeps/gnu/errlist.c:140
msgid "Not a directory"
msgstr "To nie jest katalog"
+#. TRANS Domain error; used by mathematical functions when an argument value does
+#. TRANS not fall into the domain over which the function is defined.
+#: stdio-common/../sysdeps/gnu/errlist.c:228
msgid "Numerical argument out of domain"
msgstr "Argument numeryczny poza zakresem"
+#. TRANS Range error; used by mathematical functions when the result value is
+#. TRANS not representable because of overflow or underflow.
+#: stdio-common/../sysdeps/gnu/errlist.c:234
msgid "Numerical result out of range"
msgstr "Wynik numeryczny poza zakresem"
-#: time/zic.c:1835
+# to imho jest bardziej zrozumiale - zwlaszcza ze to sie czasem zdarza
+# jak sie uruchomi mountd bez -r -PK
+#. TRANS An attempt was made to NFS-mount a remote file system with a file name that
+#. TRANS already specifies an NFS-mounted file.
+#. TRANS (This is an error on some operating systems, but we expect it to work
+#. TRANS properly on the GNU system, making this error code impossible.)
+#: stdio-common/../sysdeps/gnu/errlist.c:502
+msgid "Object is remote"
+msgstr "Zdalny obiekt jest obiektem podmontowanym przez NFS"
+
+#: time/zic.c:1966
msgid "Odd number of quotation marks"
msgstr "Nieparzysta liczba cudzys³owów"
+#. TRANS An operation is already in progress on an object that has non-blocking
+#. TRANS mode selected.
+#: stdio-common/../sysdeps/gnu/errlist.c:294
msgid "Operation already in progress"
-msgstr "Czynno¶æ jest ju¿ wykonywana"
+msgstr "Operacja jest ju¿ wykonywana"
+#. TRANS Operation not permitted; only the owner of the file (or other resource)
+#. TRANS or processes with special privileges can perform the operation.
+#: stdio-common/../sysdeps/gnu/errlist.c:12
msgid "Operation not permitted"
-msgstr "Czynno¶æ niedozwolona"
-
+msgstr "Operacja niedozwolona"
+
+#. TRANS The operation you requested is not supported. Some socket functions
+#. TRANS don't make sense for all types of sockets, and others may not be
+#. TRANS implemented for all communications protocols. In the GNU system, this
+#. TRANS error can happen for many calls when the object does not support the
+#. TRANS particular operation; it is a generic indication that the server knows
+#. TRANS nothing to do for that call.
+#: stdio-common/../sysdeps/gnu/errlist.c:338
msgid "Operation not supported"
-msgstr "Czynno¶æ niemo¿liwa"
+msgstr "Operacja nie obs³ugiwana"
+#. TRANS The wrong type of device was given to a function that expects a
+#. TRANS particular sort of device.
+#: stdio-common/../sysdeps/gnu/errlist.c:135
msgid "Operation not supported by device"
-msgstr "Urz±dzenie nie umo¿liwia takiej operacji"
-
+msgstr "Operacja nie obs³ugiwana przez urz±dzenie"
+
+#. TRANS An operation that cannot complete immediately was initiated on an object
+#. TRANS that has non-blocking mode selected. Some functions that must always
+#. TRANS block (such as @code{connect}; @pxref{Connecting}) never return
+#. TRANS @code{EAGAIN}. Instead, they return @code{EINPROGRESS} to indicate that
+#. TRANS the operation has begun and will take some time. Attempts to manipulate
+#. TRANS the object before the call completes return @code{EALREADY}. You can
+#. TRANS use the @code{select} function to find out when the pending operation
+#. TRANS has completed; @pxref{Waiting for I/O}.
+#: stdio-common/../sysdeps/gnu/errlist.c:288
msgid "Operation now in progress"
-msgstr "Czynno¶æ jest w³a¶nie wykonywana"
-
+msgstr "Operacja jest w³a¶nie wykonywana"
+
+#. TRANS In the GNU C library, this is another name for @code{EAGAIN} (above).
+#. TRANS The values are always the same, on every operating system.
+#. TRANS
+#. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a
+#. TRANS separate error code.
+#: stdio-common/../sysdeps/gnu/errlist.c:276
+msgid "Operation would block"
+msgstr "Operacja spowoduje blokadê"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:634
+msgid "Out of streams resources"
+msgstr "Brak dodatkowych strumieni"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:726
+msgid "Package not installed"
+msgstr "Pakiet nie zosta³ zainstalowany"
+
+#. TRANS Permission denied; the file permissions do not allow the attempted operation.
+#: nis/ypclnt.c:719 stdio-common/../sysdeps/gnu/errlist.c:96
msgid "Permission denied"
msgstr "Odmowa dostêpu"
+#: sysdeps/unix/sysv/linux/siglist.h:64
msgid "Power failure"
msgstr "Awaria zasilania"
-#: posix/regex.c:954
+#: posix/regex.c:968
msgid "Premature end of regular expression"
msgstr "Niespodziewany koniec wyra¿enia regularnego"
+#: stdio-common/../sysdeps/unix/siglist.c:56
+#: sysdeps/unix/sysv/linux/siglist.h:46
msgid "Profiling timer expired"
msgstr "Koniec stopera profiluj±cego"
+#: stdio-common/../sysdeps/gnu/errlist.c:678
+msgid "Protocol driver not attached"
+msgstr "Sterownik protoko³u nie jest pod³±czony"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:646
+msgid "Protocol error"
+msgstr "B³±d protoko³u"
+
+#. TRANS The socket communications protocol family you requested is not supported.
+#: stdio-common/../sysdeps/gnu/errlist.c:343
msgid "Protocol family not supported"
-msgstr "Nie wspierana rodzina protoko³ów"
+msgstr "Nie obs³ugiwana rodzina protoko³ów"
+#. TRANS You specified a socket option that doesn't make sense for the
+#. TRANS particular protocol being used by the socket. @xref{Socket Options}.
+#: stdio-common/../sysdeps/gnu/errlist.c:316
msgid "Protocol not available"
msgstr "Protokó³ niedostêpny"
+#. TRANS The socket domain does not support the requested communications protocol
+#. TRANS (perhaps because the requested protocol is completely invalid.)
+#. TRANS @xref{Creating a Socket}.
+#: stdio-common/../sysdeps/gnu/errlist.c:323
msgid "Protocol not supported"
-msgstr "Protokó³ nie wspierany"
+msgstr "Protokó³ nie obs³ugiwany"
+#. TRANS The socket type does not support the requested communications protocol.
+#: stdio-common/../sysdeps/gnu/errlist.c:310
msgid "Protocol wrong type for socket"
msgstr "Typ protoko³u nie pasuje do gniazda"
+#: stdio-common/../sysdeps/unix/siglist.c:32
+#: sysdeps/unix/sysv/linux/siglist.h:24
msgid "Quit"
msgstr "Wyj¶cie"
+#: stdio-common/../sysdeps/gnu/errlist.c:742
+msgid "RFS specific error"
+msgstr "B³±d RFS"
+
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:527
msgid "RPC bad procedure for program"
msgstr "RPC z³a procedura dla programu"
+#: nis/ypclnt.c:693
+msgid "RPC failure on NIS operation"
+msgstr "B³±d RPC podczas operacji NIS"
+
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:517
msgid "RPC program not available"
msgstr "RPC program niedostêpny"
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:522
msgid "RPC program version wrong"
msgstr "RPC z³a wersja programu"
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:507
msgid "RPC struct is bad"
-msgstr "RPC z³a struktura"
+msgstr "RPC b³êdna struktura"
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:512
msgid "RPC version wrong"
msgstr "RPC z³a wersja"
@@ -683,7 +1268,7 @@ msgstr "RPC: Niekompatybilne wersje RPC"
#: sunrpc/clnt_perr.c:195
msgid "RPC: Port mapper failure"
-msgstr "RPC: Zawiód³ portmapper"
+msgstr "RPC: Awaria portmappera"
#: sunrpc/clnt_perr.c:185
msgid "RPC: Procedure unavailable"
@@ -715,7 +1300,7 @@ msgstr "RPC: Sukces"
#: sunrpc/clnt_perr.c:175
msgid "RPC: Timed out"
-msgstr "RPC: Czas oczekiwania wyczerpany"
+msgstr "RPC: Czas oczekiwania przekroczony"
#: sunrpc/clnt_perr.c:173
msgid "RPC: Unable to receive"
@@ -733,81 +1318,96 @@ msgstr "RPC: Nieznany host"
msgid "RPC: Unknown protocol"
msgstr "RCP: Nieznany protokó³"
+#: elf/dlsym.c:49
+msgid "RTLD_NEXT used in code not dynamically loaded"
+msgstr "RTLD_NEXT wyst±pi³o w kodzie nie ³adowanym dynamicznie"
+
+#. TRANS An attempt was made to modify something on a read-only file system.
+#: stdio-common/../sysdeps/gnu/errlist.c:206
msgid "Read-only file system"
msgstr "System plików wy³±cznie do odczytu"
-#: posix/regex.c:955
+#: posix/regex.c:969
msgid "Regular expression too big"
msgstr "Wyra¿enie regularne jest za du¿e"
-msgid "Reserved error 82"
-msgstr "Zarezerwowany b³±d 82"
-
-msgid "Reserved error 83"
-msgstr "Zarezerwowany b³±d 83"
-
-msgid "Reserved error 84"
-msgstr "Zarezerwowany b³±d 84"
-
-msgid "Reserved error 85"
-msgstr "Zarezerwowany b³±d 85"
-
-msgid "Reserved error 86"
-msgstr "Zarezerwowany b³±d 86"
-
-msgid "Reserved error 87"
-msgstr "Zarezerwowany b³±d 87"
-
-msgid "Reserved error 88"
-msgstr "Zarezerwowany b³±d 88"
-
-msgid "Reserved error 89"
-msgstr "Zarezerwowany b³±d 89"
-
-msgid "Reserved error 90"
-msgstr "Zarezerwowany b³±d 90"
-
-msgid "Reserved error 91"
-msgstr "Zarezerwowany b³±d 91"
-
-msgid "Reserved error 92"
-msgstr "Zarezerwowany b³±d 92"
-
-msgid "Reserved error 93"
-msgstr "Zarezerwowany b³±d 93"
-
-msgid "Reserved error 94"
-msgstr "Zarezerwowany b³±d 94"
+#: stdio-common/../sysdeps/gnu/errlist.c:798
+msgid "Remote I/O error"
+msgstr "B³±d we/wy w odleg³ym systemie"
-msgid "Reserved error 95"
-msgstr "Zarezerwowany b³±d 95"
+#: stdio-common/../sysdeps/gnu/errlist.c:754
+msgid "Remote address changed"
+msgstr "Zmieni³ siê odleg³y adres"
-msgid "Reserved error 96"
-msgstr "Zarezerwowany b³±d 96"
+#: inet/ruserpass.c:162
+msgid "Remove password or make file unreadable by others."
+msgstr "Usuñ has³o lub uczyñ plik niedostêpnym dla innych"
-msgid "Reserved error 97"
-msgstr "Zarezerwowany b³±d 97"
+#: catgets/gencat.c:224 db/makedb.c:227 locale/programs/locale.c:257
+#: locale/programs/localedef.c:412
+msgid "Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"
+msgstr ""
+"B³êdy zg³aszaj za pomoc± skryptu `glibcbug' na adres <bugs@gnu.ai.mit.edu>.\n"
-msgid "Reserved error 98"
-msgstr "Zarezerwowany b³±d 98"
+#: nis/ypclnt.c:691
+msgid "Request arguments bad"
+msgstr "Argumenty ¿±dania s± b³êdne"
-msgid "Reserved error 99"
-msgstr "Zarezerwowany b³±d 99"
-
-#: resolv/herror.c:72
+#: resolv/herror.c:73
msgid "Resolver Error 0 (no error)"
msgstr "B³±d 0 resolvera (bez b³êdów)"
-#: resolv/herror.c:114
+#: resolv/herror.c:117
msgid "Resolver internal error"
msgstr "B³±d wewnêtrzny resolvera"
+#. TRANS Deadlock avoided; allocating a system resource would have resulted in a
+#. TRANS deadlock situation. The system does not guarantee that it will notice
+#. TRANS all such situations. This error means you got lucky and the system
+#. TRANS noticed; it might just hang. @xref{File Locks}, for an example.
+#: stdio-common/../sysdeps/gnu/errlist.c:85
msgid "Resource deadlock avoided"
-msgstr "Unikniêto blokady zasobów"
-
+msgstr "Unikniêto zakleszczenia zasobów"
+
+#: stdio-common/../sysdeps/unix/siglist.c:58
+msgid "Resource lost"
+msgstr "Zasoby zosta³y stracone"
+
+#. TRANS Resource temporarily unavailable; the call might work if you try again
+#. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN};
+#. TRANS they are always the same in the GNU C library.
+#. TRANS
+#. TRANS This error can happen in a few different situations:
+#. TRANS
+#. TRANS @itemize @bullet
+#. TRANS @item
+#. TRANS An operation that would block was attempted on an object that has
+#. TRANS non-blocking mode selected. Trying the same operation again will block
+#. TRANS until some external condition makes it possible to read, write, or
+#. TRANS connect (whatever the operation). You can use @code{select} to find out
+#. TRANS when the operation will be possible; @pxref{Waiting for I/O}.
+#. TRANS
+#. TRANS @strong{Portability Note:} In older Unix many systems, this condition
+#. TRANS was indicated by @code{EWOULDBLOCK}, which was a distinct error code
+#. TRANS different from @code{EAGAIN}. To make your program portable, you should
+#. TRANS check for both codes and treat them the same.
+#. TRANS
+#. TRANS @item
+#. TRANS A temporary resource shortage made an operation impossible. @code{fork}
+#. TRANS can return this error. It indicates that the shortage is expected to
+#. TRANS pass, so your program can try the call again later and it may succeed.
+#. TRANS It is probably a good idea to delay for a few seconds before trying it
+#. TRANS again, to allow time for other processes to release scarce resources.
+#. TRANS Such shortages are usually fairly serious and affect the whole system,
+#. TRANS so usually an interactive program should report the error to the user
+#. TRANS and return to its command loop.
+#. TRANS @end itemize
+#: stdio-common/../sysdeps/gnu/errlist.c:267
msgid "Resource temporarily unavailable"
msgstr "Zasoby chwilowo niedostêpne"
+#: stdio-common/../sysdeps/unix/siglist.c:40
+#: sysdeps/unix/sysv/linux/siglist.h:31
msgid "Segmentation fault"
msgstr "Naruszenie ochrony pamiêci"
@@ -819,135 +1419,255 @@ msgstr "Serwer odmówi³ uwierzytelnienia"
msgid "Server rejected verifier"
msgstr "Serwer odmówi³ weryfikacji"
-msgid "Socket is already connected"
-msgstr "Gniazdo jest ju¿ po³±czone"
-
-msgid "Socket is not connected"
-msgstr "Gniazdo nie jest po³±czone"
+#: stdio-common/../sysdeps/unix/siglist.c:29
+msgid "Signal 0"
+msgstr "Sygna³ 0"
+#. TRANS A file that isn't a socket was specified when a socket is required.
+#: stdio-common/../sysdeps/gnu/errlist.c:299
msgid "Socket operation on non-socket"
msgstr "Operacja typu gniazda na obiekcie który nie jest gniazdem"
+#. TRANS The socket type is not supported.
+#: stdio-common/../sysdeps/gnu/errlist.c:328
msgid "Socket type not supported"
-msgstr "Nie wspierany typ gniazda"
+msgstr "Nie obs³ugiwany typ gniazda"
+#. TRANS A network connection was aborted locally.
+#: stdio-common/../sysdeps/gnu/errlist.c:382
msgid "Software caused connection abort"
msgstr "Oprogramowanie spowodowa³o przerwanie po³±czenia"
+#: stdio-common/../sysdeps/gnu/errlist.c:734
+msgid "Srmount error"
+msgstr "B³±d srmount"
+
+#: sysdeps/unix/sysv/linux/siglist.h:59
+msgid "Stack fault"
+msgstr "B³±d stosu"
+
+#. TRANS Stale NFS file handle. This indicates an internal confusion in the NFS
+#. TRANS system which is due to file system rearrangements on the server host.
+#. TRANS Repairing this condition usually requires unmounting and remounting
+#. TRANS the NFS file system on the local host.
+#: stdio-common/../sysdeps/gnu/errlist.c:494
msgid "Stale NFS file handle"
-msgstr "Nieaktualny NFSowy uchwyt pliku"
+msgstr "Nieaktualny uchwyt pliku NFS"
+#: stdio-common/../sysdeps/unix/siglist.c:47
+#: sysdeps/unix/sysv/linux/siglist.h:37
msgid "Stopped"
msgstr "Zatrzymany"
+#: stdio-common/../sysdeps/unix/siglist.c:46
+#: sysdeps/unix/sysv/linux/siglist.h:36
msgid "Stopped (signal)"
msgstr "Zatrzymany (sygna³)"
+#: stdio-common/../sysdeps/unix/siglist.c:50
+#: sysdeps/unix/sysv/linux/siglist.h:40
msgid "Stopped (tty input)"
msgstr "Zatrzymany (wej¶cie z tty)"
+#: stdio-common/../sysdeps/unix/siglist.c:51
+#: sysdeps/unix/sysv/linux/siglist.h:41
msgid "Stopped (tty output)"
msgstr "Zatrzymany (wyj¶cie na tty)"
-#: posix/regex.c:940
+#: stdio-common/../sysdeps/gnu/errlist.c:778
+msgid "Streams pipe error"
+msgstr "B³±d potoku biblioteki strumieni"
+
+#: stdio-common/../sysdeps/gnu/errlist.c:782
+msgid "Structure needs cleaning"
+msgstr "Struktura wymaga wyczyszczenia"
+
+#: nis/ypclnt.c:689 nis/ypclnt.c:763 posix/regex.c:954
+#: stdio-common/../sysdeps/gnu/errlist.c:7
msgid "Success"
msgstr "Sukces"
+#: nis/ypclnt.c:769
+msgid "System resource allocation failure"
+msgstr "Wyst±pi³ b³±d podczas przydzielania zasobów systemowych"
+
+#: stdio-common/../sysdeps/unix/siglist.c:44
+#: sysdeps/unix/sysv/linux/siglist.h:34
msgid "Terminated"
msgstr "Zakoñczony"
+#. TRANS An attempt to execute a file that is currently open for writing, or
+#. TRANS write to a file that is currently being executed. Often using a
+#. TRANS debugger to run a program is considered having it open for writing and
+#. TRANS will cause this error. (The name stands for ``text file busy''.) This
+#. TRANS is not an error in the GNU system; the text is copied as necessary.
+#: stdio-common/../sysdeps/gnu/errlist.c:185
msgid "Text file busy"
-msgstr "Plik zajêty"
+msgstr "Plik wykonywalny zajêty"
-msgid "Too many levels of remote in path"
-msgstr "Za du¿o poziomów w ¶cie¿ce"
+#: stdio-common/../sysdeps/gnu/errlist.c:650
+msgid "Timer expired"
+msgstr "Stoper wyczerpany"
+#. TRANS Too many levels of symbolic links were encountered in looking up a file name.
+#. TRANS This often indicates a cycle of symbolic links.
+#: stdio-common/../sysdeps/gnu/errlist.c:445
msgid "Too many levels of symbolic links"
-msgstr "Za du¿o poziomów symlinków"
+msgstr "Za du¿o poziomów dowi±zañ"
+#. TRANS Too many links; the link count of a single file would become too large.
+#. TRANS @code{rename} can cause this error if the file being renamed already has
+#. TRANS as many links as it can take (@pxref{Renaming Files}).
+#: stdio-common/../sysdeps/gnu/errlist.c:213
msgid "Too many links"
msgstr "Za du¿o dowi±zañ"
+#. TRANS The current process has too many files open and can't open any more.
+#. TRANS Duplicate descriptors do count toward this limit.
+#. TRANS
+#. TRANS In BSD and GNU, the number of open files is controlled by a resource
+#. TRANS limit that can usually be increased. If you get this error, you might
+#. TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited;
+#. TRANS @pxref{Limits on Resources}.
+#: stdio-common/../sysdeps/gnu/errlist.c:163
msgid "Too many open files"
msgstr "Za du¿o otwartych plików"
+#. TRANS There are too many distinct file openings in the entire system. Note
+#. TRANS that any number of linked channels count as just one file opening; see
+#. TRANS @ref{Linked Channels}. This error never occurs in the GNU system.
+#: stdio-common/../sysdeps/gnu/errlist.c:170
msgid "Too many open files in system"
msgstr "Za du¿o otwartych plików w systemie"
+#. TRANS This means that the per-user limit on new process would be exceeded by
+#. TRANS an attempted @code{fork}. @xref{Limits on Resources}, for details on
+#. TRANS the @code{RLIMIT_NPROC} limit.
+#: stdio-common/../sysdeps/gnu/errlist.c:475
msgid "Too many processes"
msgstr "Za du¿o procesów"
-msgid "Too many references: can't splice"
-msgstr "Za du¿o odniesieñ: nie mogê dowi±zaæ"
+#. TRANS ???
+#: stdio-common/../sysdeps/gnu/errlist.c:427
+msgid "Too many references: cannot splice"
+msgstr "Za du¿o odniesieñ: dowi±zanie niemo¿liwe"
+#. TRANS The file quota system is confused because there are too many users.
+#. TRANS @c This can probably happen in a GNU system when using NFS.
+#: stdio-common/../sysdeps/gnu/errlist.c:481
msgid "Too many users"
msgstr "Za du¿o u¿ytkowników"
+#: stdio-common/../sysdeps/unix/siglist.c:34
+msgid "Trace/BPT trap"
+msgstr "Pu³apka debuggera/BPT"
+
+#: sysdeps/unix/sysv/linux/siglist.h:26
msgid "Trace/breakpoint trap"
-msgstr "Pu³apka debuggera"
+msgstr "Pu³apka debuggera/breakpoint"
-#: posix/regex.c:945
+#: posix/regex.c:959
msgid "Trailing backslash"
-msgstr "Koñcz±cy backslash"
+msgstr "Koñcz±cy znak `\\'"
+#. TRANS In the GNU system, opening a file returns this error when the file is
+#. TRANS translated by a program and the translator program dies while starting
+#. TRANS up, before it has connected to the file.
+#: stdio-common/../sysdeps/gnu/errlist.c:584
msgid "Translator died"
msgstr "Translator przerwa³ pracê"
-#: catgets/gencat.c:201
+#. TRANS You tried to connect a socket that is already connected.
+#. TRANS @xref{Connecting}.
+#: stdio-common/../sysdeps/gnu/errlist.c:402
+msgid "Transport endpoint is already connected"
+msgstr "Drugi koniec ma ju¿ po³±czenie"
+
+#. TRANS The socket is not connected to anything. You get this error when you
+#. TRANS try to transmit data over a socket, without first specifying a
+#. TRANS destination for the data. For a connectionless socket (for datagram
+#. TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead.
+#: stdio-common/../sysdeps/gnu/errlist.c:410
+msgid "Transport endpoint is not connected"
+msgstr "Drugi koniec nie jest po³±czony"
+
+#: catgets/gencat.c:208 db/makedb.c:209 locale/programs/locale.c:241
+#: locale/programs/localedef.c:393
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Napisz `%s --help' by uzyskaæ pomoc.\n"
-#: inet/rcmd.c:118
+#: inet/rcmd.c:137
#, c-format
msgid "Trying %s...\n"
msgstr "Próbujê %s...\n"
-#: ../sysdeps/mach/_strerror.c:58 string/../sysdeps/generic/_strerror.c:36
+#: inet/ruserpass.c:246
+#, c-format
+msgid "Unknown .netrc keyword %s"
+msgstr "Nieznane s³owo kluczowe .netrc %s"
+
+#: nis/ypclnt.c:723
+msgid "Unknown NIS error code"
+msgstr "Nieznany kod b³êdu NIS"
+
+#: string/../sysdeps/generic/_strerror.c:44
+#: string/../sysdeps/mach/_strerror.c:67
msgid "Unknown error "
msgstr "Nieznany b³±d "
-#: resolv/herror.c:73
+#: resolv/herror.c:74
msgid "Unknown host"
msgstr "Nieznany host"
-#: resolv/herror.c:117
+#: resolv/herror.c:120
msgid "Unknown resolver error"
msgstr "Nieznany b³±d resolvera"
-#: resolv/herror.c:75
+#: resolv/herror.c:76
msgid "Unknown server error"
msgstr "Nieznany b³±d serwera"
-#: string/strsignal.c:40
+#: string/strsignal.c:41
#, c-format
msgid "Unknown signal %d"
msgstr "Nieznany sygna³ %d"
-#: misc/error.c:92
+#: misc/error.c:100
msgid "Unknown system error"
msgstr "Nieznany b³±d systemowy"
-#: posix/regex.c:948
+#: nis/ypclnt.c:771
+msgid "Unknown ypbind error"
+msgstr "Nieznany b³±d ypbind"
+
+#: posix/regex.c:962
msgid "Unmatched ( or \\("
msgstr "Niesparowane ( lub \\("
-#: posix/regex.c:956
+#: posix/regex.c:970
msgid "Unmatched ) or \\)"
msgstr "Niesparowane ) lub \\)"
-#: posix/regex.c:947
+#: posix/regex.c:961
msgid "Unmatched [ or [^"
msgstr "Niesparowane [ lub [^"
-#: posix/regex.c:949
+#: posix/regex.c:963
msgid "Unmatched \\{"
msgstr "Niesparowane \\{"
+#: posix/getconf.c:260
+#, c-format
+msgid "Unrecognized variable `%s'"
+msgstr "Nierozpoznana zmienna `%s'"
+
+#: stdio-common/../sysdeps/unix/siglist.c:45
+#: sysdeps/unix/sysv/linux/siglist.h:35
msgid "Urgent I/O condition"
msgstr "Nag³y wypadek I/O"
-#: catgets/gencat.c:204
+#: catgets/gencat.c:212
#, c-format
msgid ""
"Usage: %s [OPTION]... -o OUTPUT-FILE [INPUT-FILE]...\n"
@@ -963,16 +1683,109 @@ msgid ""
msgstr ""
"Sk³adnia: %s [OPCJA]... -o PLIK_WYJ¦CIOWY [PLIK_WEJ¦CIOWY]...\n"
" %s [OPCJA]... [PLIK_WYJ¦CIOWY [PLIK_WEJ¦CIOWY]...]\n"
-"Obowi±zkowe argumenty d³ugich form opcji s± wymagane tak¿e dla krótkich form.\n"
+"Obowi±zkowe argumenty d³ugich form opcji s± wymagane tak¿e dla krótkich "
+"form.\n"
" -H, --header stwórz nag³ówek C zawieraj±cy definicje symboli\n"
" -h, --help wy¶wietl ten tekst pomocy i zakoñcz pracê\n"
-" --new nie u¿ywaj istniej±cego katalogu, wymu¶ nowy plik wyj¶ciowy\n"
+" --new nie u¿ywaj istniej±cego katalogu, wymu¶ nowy plik "
+"wyj¶ciowy\n"
" -o, --output=PLIK zapisz wynik do PLIKu\n"
" -V, --version wy¶wietl wersjê programi i zakoñcz pracê.\n"
-"Je¶li PLIK_WEJ¦CIOWY to `-', dane s± czytane ze standardowego wej¶cia.\n"
-"Je¶li PLIK_WYJ¦CIOWY to `-', wyniki s± wypisywane na standardowe wyj¶cie.\n"
+"Je¶li PLIKIEM_WEJ¦CIOWYM jest `-', dane s± czytane ze standardowego "
+"wej¶cia.\n"
+"Je¶li PLIKIEM_WYJ¦CIOWYM jest `-', wyniki s± wypisywane na standardowe "
+"wyj¶cie.\n"
-#: posix/getconf.c:81
+#: db/makedb.c:213
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... INPUT-FILE OUTPUT-FILE\n"
+" %s [OPTION]... -o OUTPUT-FILE INPUT-FILE\n"
+" %s [OPTION]... -u INPUT-FILE\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -f, --fold-case convert key to lower case\n"
+" -h, --help display this help and exit\n"
+" -o, --output=NAME write output to file NAME\n"
+" --quiet don't print messages while building database\n"
+" -u, --undo print content of database file, one entry a line\n"
+" -V, --version output version information and exit\n"
+"If INPUT-FILE is -, input is read from standard input.\n"
+msgstr ""
+"Sk³adnia: %s PLIK_WEJ¦CIOWY PLIK_WYJ¦CIOWE\n"
+" %s [OPCJA]... -o PLIK_WYJ¦CIOWY PLIK_WEJ¦CIOWY\n"
+" %s [OPCJA]... -u PLIK_WEJ¦CIOWY\n"
+"Obowi±zkowe argumenty d³ugich form opcji s± wymagane tak¿e dla krótkich "
+"form.\n"
+" -f, --fold-case zamien litery w kluczu na ma³e\n"
+" -h, --help wy¶wietl ten tekst pomocy i zakoñcz pracê\n"
+" -o, --output=PLIK zapisz wynik do pliku PLIK\n"
+" --quiet nie wy¶wietlaj komunikatów podczas tworzenia bazy "
+"danych\n"
+" -u, --undo wy¶wietl zawarto¶æ bazy, po jednym rekordzie w linii\n"
+" -V, --version wy¶wietl wersjê programi i zakoñcz pracê.\n"
+"Je¶li PLIKIEM_WEJ¦CIOWYM jest `-', dane s± czytane ze standardowego "
+"wej¶cia.\n"
+
+#: locale/programs/localedef.c:397
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... name\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -c, --force create output even if warning messages were "
+"issued\n"
+" -h, --help display this help and exit\n"
+" -f, --charmap=FILE symbolic character names defined in FILE\n"
+" -i, --inputfile=FILE source definitions are found in FILE\n"
+" -u, --code-set-name=NAME specify code set for mapping ISO 10646 elements\n"
+" -v, --verbose print more messages\n"
+" -V, --version output version information and exit\n"
+" --posix be strictly POSIX conform\n"
+"\n"
+"System's directory for character maps: %s\n"
+" locale files : %s\n"
+msgstr ""
+"U¿ycie: %s [OPCJA]... nazwa\n"
+"Argumenty wymagane dla d³ugich opcji s± wymagane tak¿e dla krótkich form.\n"
+" -c, --force utwórz wynik nawet je¶li pojawi³y siê "
+"ostrze¿enia\n"
+" -h, --help wy¶wietl ten tekst pomocy i zakoñcz pracê\n"
+" -f, --charmap=PLIK symboliczne nazwy znaków zdefiniowane w PLIKu\n"
+" -i, --inputfile=PLIK definicje ¼ród³owe pobierz z PLIKu\n"
+" -u, --code-set-name=NAZWA nazwa zbioru kodów do mapowania elementów ISO "
+"10646\n"
+" -v, --verbose wy¶wietlaj wiêcej informacji\n"
+" -V, --version wy¶wietl wersjê programu i zakoñcz pracê\n"
+" --posix zachowaj ¶cis³± zgodno¶æ ze standardem POSIX\n"
+"\n"
+"Systemowy katalog tablic znakowych: %s\n"
+" pliki lokalizacyjne: %s\n"
+
+#: locale/programs/locale.c:245
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... name\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -h, --help display this help and exit\n"
+" -V, --version output version information and exit\n"
+"\n"
+" -a, --all-locales write names of available locales\n"
+" -m, --charmaps write names of available charmaps\n"
+"\n"
+" -c, --category-name write names of selected categories\n"
+" -k, --keyword-name write names of selected keywords\n"
+msgstr ""
+"U¿ycie: %s [OPCJA]... nazwa\n"
+"Argumenty wymagane dla d³ugich opcji s± wymagane tak¿e dla krótkich form.\n"
+" -h, --help wy¶wietl ten tekst pomocy i zakoñcz\n"
+" -V, --version wy¶wietl wersjê programu i zakoñcz\n"
+"\n"
+" -a, --all-locales wypisz nazwy dostêpnych lokalizacji\n"
+" -m, --charmaps wypisz nazwy dostêpnych map znakowych\n"
+"\n"
+" -c, --category-name wypisz nazwy wybranych kategorii\n"
+" -k, --keyword-name wypisz nazwy wybranych s³ów kluczowych\n"
+
+#: posix/getconf.c:200
#, c-format
msgid "Usage: %s variable_name [pathname]\n"
msgstr "Sk³adnie: %s nazwa_zmiennej [¶cie¿ka]\n"
@@ -981,263 +1794,634 @@ msgstr "Sk³adnie: %s nazwa_zmiennej [¶cie¿ka]\n"
msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
msgstr "Sk³adnia: rpcinfo [ -n nr_portu ] -u host nr_programu [ nr_wersji ]\n"
+#: stdio-common/../sysdeps/unix/siglist.c:59
+#: sysdeps/unix/sysv/linux/siglist.h:48
msgid "User defined signal 1"
msgstr "Sygna³ u¿ytkownika 1"
+#: stdio-common/../sysdeps/unix/siglist.c:60
+#: sysdeps/unix/sysv/linux/siglist.h:49
msgid "User defined signal 2"
msgstr "Sygna³ u¿ytkownika 2"
+#: stdio-common/../sysdeps/gnu/errlist.c:642
+msgid "Value too large for defined data type"
+msgstr "Warto¶æ za du¿a dla zdefiniowanego typu danych"
+
+#: stdio-common/../sysdeps/unix/siglist.c:55
+#: sysdeps/unix/sysv/linux/siglist.h:45
msgid "Virtual timer expired"
msgstr "Wirtualny stoper wyczerpany"
-#: time/zic.c:1740
+#: time/zic.c:1871
msgid "Wild result from command execution"
msgstr "Osobliwy wynik wykonania polecenia"
+#: stdio-common/../sysdeps/unix/siglist.c:57
+#: sysdeps/unix/sysv/linux/siglist.h:47
msgid "Window changed"
msgstr "Okno zmienione"
+# czy 'zapisany przez' (program, procedure) czy 'napisany przez' (kogos)? -PK
+#: catgets/gencat.c:174 db/makedb.c:125 locale/programs/locale.c:192
+#: locale/programs/localedef.c:185
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Autor: %s.\n"
+
+#: nis/ypclnt.c:142
+msgid "YPBINDPROC_DOMAIN: Internal error\n"
+msgstr "YPBINDPROC_DOMAIN: B³±d wewnêtrzny\n"
+
+#: nis/ypclnt.c:146
+#, c-format
+msgid "YPBINDPROC_DOMAIN: No server for domain %s\n"
+msgstr "YPBINDPROC_DOMAIN: Brak serwera dla domeny %s\n"
+
+#: nis/ypclnt.c:150
+msgid "YPBINDPROC_DOMAIN: Resource allocation failure\n"
+msgstr "YPBINDPROC_DOMAIN: Wyst±pi³ b³±d podczas przydzielania zasobów\n"
+
+#: nis/ypclnt.c:154
+msgid "YPBINDPROC_DOMAIN: Unknown error\n"
+msgstr "YPBINDPROC_DOMAIN: Nieznany b³±d\n"
+
+#. TRANS You did @strong{what}?
+#: stdio-common/../sysdeps/gnu/errlist.c:596
msgid "You really blew it this time"
-msgstr "Tym razem da³e¶ dupy"
+msgstr "Tym razem da³e¶ popaliæ"
-#: time/zic.c:1013
+#: time/zic.c:1048
msgid "Zone continuation line end time is not after end time of previous line"
msgstr "Koniec czasu nie znajduje siê po koñcu czasu poprzedniej linii"
-#: sunrpc/rpc_parse.c:326
-msgid "array declaration expected"
-msgstr "spodziewana deklaracja tablicy"
+#: locale/programs/charmap.c:397 locale/programs/locfile.c:363
+#, c-format
+msgid "`%1$s' definition does not end with `END %1$s'"
+msgstr "definicja `%1$s' musi koñczyæ siê wyra¿eniem `END %1$s'"
+
+#: locale/programs/ld-monetary.c:359 locale/programs/ld-numeric.c:190
+#, c-format
+msgid "`-1' must be last entry in `%s' field in `%s' category"
+msgstr "`-1' musi byæ ostatnim elementem w polu `%s' kategorii `%s'"
+
+#: locale/programs/ld-collate.c:1655
+msgid "`...' must only be used in `...' and `UNDEFINED' entries"
+msgstr "`...' mo¿e byæ u¿yte wy³±cznie dla `...' i `UNDEFINED'"
+
+#: locale/programs/locfile.c:560
+msgid "`from' expected after first argument to `collating-element'"
+msgstr "`from' spodziewane po pierwszym argumencie `collate-element'"
-#: sunrpc/auth_unix.c:314
+#: locale/programs/ld-collate.c:1112
+msgid ""
+"`from' string in collation element declaration contains unknown character"
+msgstr "³añcuch `from' w deklaracji elementu sortowania zawiera nieznany znak"
+
+#: locale/programs/charmap.c:267
+#, c-format
+msgid "argument to <%s> must be a single character"
+msgstr "argument <%s> musi byæ pojedynczym znakiem"
+
+#: locale/programs/locfile.c:237
+#, c-format
+msgid "argument to `%s' must be a single character"
+msgstr "argument `%s' musi byæ pojedynczym znakiem"
+
+#: sunrpc/auth_unix.c:323
msgid "auth_none.c - Fatal marshalling problem"
msgstr "auth_none.c - Problem z prze³±czaniem"
-#: inet/rcmd.c:327
+#: inet/rcmd.c:365
msgid "bad .rhosts owner"
msgstr "nieodpowiedni w³a¶ciciel .rhosts"
-#: time/zic.c:1136
+#: locale/programs/charmap.c:212 locale/programs/locfile.c:231
+msgid "bad argument"
+msgstr "b³êdny argument"
+
+#: time/zic.c:1170
msgid "blank FROM field on Link line"
msgstr "puste pole FROM w linii Link"
-#: time/zic.c:1140
+#: time/zic.c:1174
msgid "blank TO field on Link line"
msgstr "puste pole TO w linii Link"
-#: malloc/mcheck.c:174
+#: malloc/mcheck.c:191
msgid "block freed twice"
msgstr "blok zwalniany dwa razy"
-#: malloc/mcheck.c:177
+#: malloc/mcheck.c:194
msgid "bogus mcheck_status, library is buggy"
-msgstr "z³y mcheck_status, biblioteka jest zapluskwiona"
+msgstr "b³êdny mcheck_status, biblioteka zawiera b³êdy"
-#: sunrpc/pmap_rmt.c:177
+#: sunrpc/pmap_rmt.c:179
msgid "broadcast: ioctl (get interface configuration)"
msgstr "transmisja: ioctl (info o konfiguracji interfejsu)"
-#: sunrpc/pmap_rmt.c:184
+#: sunrpc/pmap_rmt.c:186
msgid "broadcast: ioctl (get interface flags)"
msgstr "transmisja: ioctl (info o flagach interjesu)"
-#: sunrpc/svc_udp.c:398
+#: sunrpc/svc_udp.c:402
msgid "cache_set: victim not found"
msgstr "cache_set: brak ofiary"
+# jak ladnie przetlumaczyc ten until time? -PK
+#: time/zic.c:1698
+msgid "can't determine time zone abbreviation to use just after until time"
+msgstr "okre¶lenie skrótu strefy czasowej po koñcu przedzia³u czasu jest niemo¿liwe"
+
#: sunrpc/svc_simple.c:64
#, c-format
msgid "can't reassign procedure number %d\n"
-msgstr "nie mogê przypisaæ procedury nr %d\n"
+msgstr "przypisanie procedury nr %d jest niemo¿liwe\n"
+
+#: locale/programs/localedef.c:291
+#, c-format
+msgid "cannot `stat' locale file `%s'"
+msgstr "otwarcie pliku lokalizacji `%s' jest niemo¿liwe"
-#: catgets/gencat.c:248
+# collation = sortowanie czy laczenie??? -PK
+#: locale/programs/ld-collate.c:1317
+#, c-format
+msgid "cannot insert collation element `%.*s'"
+msgstr "wstawienie elementu sortowania `%.*s' jest niemo¿liwe"
+
+#: locale/programs/ld-collate.c:1496 locale/programs/ld-collate.c:1501
+msgid "cannot insert into result table"
+msgstr "wstawienie do tablicy wyników jest niemo¿liwe"
+
+#: locale/programs/ld-collate.c:1169 locale/programs/ld-collate.c:1211
+#, c-format
+msgid "cannot insert new collating symbol definition: %s"
+msgstr "wstawienie definicji nowego symbolu sortowania niemo¿liwe: %s"
+
+#: db/makedb.c:161
+#, c-format
+msgid "cannot open database file `%s': %s"
+msgstr "otwarcie pliku bazy danych `%s' jest niemo¿liwe: %s"
+
+#: catgets/gencat.c:260 db/makedb.c:180
#, c-format
msgid "cannot open input file `%s'"
-msgstr "nie mogê otworzyæ wej¶ciowego pliku `%s'"
+msgstr "otwarcie wej¶ciowego pliku `%s' niemo¿liwe"
+
+#: locale/programs/localedef.c:224
+#, c-format
+msgid "cannot open locale definition file `%s'"
+msgstr "otwarcie pliku definicji lokalnych `%s' niemo¿liwe"
-#: catgets/gencat.c:753 gencat.c:794
+#: catgets/gencat.c:765 catgets/gencat.c:806 db/makedb.c:189
#, c-format
msgid "cannot open output file `%s'"
-msgstr "nie mogê otworzyæ wyj¶ciowego pliku `%s'"
+msgstr "otwarcie wyj¶ciowego pliku `%s' niemo¿liwe"
+
+#: locale/programs/locfile.c:1008
+#, c-format
+msgid "cannot open output file `%s' for category `%s'"
+msgstr "otwarcie wyj¶ciowego pliku `%s' dla kategorii `%s' niemo¿liwe"
+
+#: locale/programs/ld-collate.c:1363
+msgid "cannot process order specification"
+msgstr "przetwarzanie specyfikacji kolejno¶ci jest niemo¿liwe"
+
+#: locale/programs/locale.c:304
+#, c-format
+msgid "cannot read character map directory `%s'"
+msgstr "odczyt katalogu mapy znaków `%s' niemo¿liwy"
+
+#: locale/programs/locale.c:279
+#, c-format
+msgid "cannot read locale directory `%s'"
+msgstr "odczyt katalogu lokalizacji %s' jest niemo¿liwy"
+
+#: locale/programs/localedef.c:313
+#, c-format
+msgid "cannot read locale file `%s'"
+msgstr "odczyt pliku lokalizacji `%s' niemo¿liwy"
+
+#: locale/programs/localedef.c:338
+#, c-format
+msgid "cannot write output files to `%s'"
+msgstr "zapis plików wyj¶ciowych do `%s' niemo¿liwy"
+
+#: locale/programs/localedef.c:381
+msgid "category data requested more than once: should not happen"
+msgstr "wielokrotne ¿±danie kategorii danych: nie powinno wyst±piæ"
+
+#: locale/programs/ld-ctype.c:266
+#, c-format
+msgid "character %s'%s' in class `%s' must be in class `%s'"
+msgstr "znak %s'%s' z klasy`%s' musi byæ w klasie `%s'"
+
+#: locale/programs/ld-ctype.c:291
+#, c-format
+msgid "character %s'%s' in class `%s' must not be in class `%s'"
+msgstr "znak %s'%s' z klasy `%s' nie mo¿e byæ w klasie `%s'"
+
+#: locale/programs/ld-ctype.c:313
+msgid "character <SP> not defined in character map"
+msgstr "znak <SP> nie zdefiniowany w tablicy znaków"
+
+#: locale/programs/ld-ctype.c:944 locale/programs/ld-ctype.c:1007
+#: locale/programs/ld-ctype.c:1015 locale/programs/ld-ctype.c:1023
+#: locale/programs/ld-ctype.c:1031 locale/programs/ld-ctype.c:1039
+#: locale/programs/ld-ctype.c:1047 locale/programs/ld-ctype.c:1073
+#: locale/programs/ld-ctype.c:1081 locale/programs/ld-ctype.c:1119
+#: locale/programs/ld-ctype.c:1146 locale/programs/ld-ctype.c:1157
+#, c-format
+msgid "character `%s' not defined while needed as default value"
+msgstr "znak `%s', wymagany jako domy¶lny, nie zosta³ zdefiniowany"
+
+#: locale/programs/ld-ctype.c:806
+#, c-format
+msgid "character class `%s' already defined"
+msgstr "klasa znaków `%s' jest ju¿ zdefiniowana"
+
+#: locale/programs/ld-ctype.c:838
+#, c-format
+msgid "character map `%s' already defined"
+msgstr "tablica znaków `%s' jest ju¿ zdefiniowana"
+
+#: locale/programs/charmap.c:76
+#, c-format
+msgid "character map file `%s' not found"
+msgstr "nie znaleziono pliku tablicy znaków `%s'"
#: sunrpc/clnt_raw.c:106
msgid "clnt_raw.c - Fatal header serialization error."
-msgstr "clnt_raw.c - Fatalny b³±d serializacji nag³ówka."
+msgstr "clnt_raw.c - Krytyczny b³±d serializacji nag³ówka."
-#: inet/rcmd.c:112
+#: locale/programs/ld-collate.c:1332
+#, c-format
+msgid "collation element `%.*s' appears more than once: ignore line"
+msgstr "element sortowania `%.*s' wyst±pi³ wielokrotnie: linia pominiêta"
+
+#: locale/programs/ld-collate.c:1350
+#, c-format
+msgid "collation symbol `%.*s' appears more than once: ignore line"
+msgstr "element sortowania `%.*s' wyst±pi³ wielokrotnie: linia pominiêta"
+
+#: locale/programs/locfile.c:544
+#, c-format
+msgid "collation symbol expected after `%s'"
+msgstr "oczekiwano symbolu sortowania po `%s'"
+
+#: inet/rcmd.c:130
#, c-format
msgid "connect to address %s: "
msgstr "po³±czenie do adresu %s: "
-#: sunrpc/rpc_scan.c:109
-msgid "constant or identifier expected"
-msgstr "spodziewana sta³a lub identyfikator"
-
#: sunrpc/svc_simple.c:70
msgid "couldn't create an rpc server\n"
-msgstr "nie mogê stworzyæ serwera rpc\n"
-
-#: sunrpc/portmap.c:122
-msgid "couldn't do tcp_create\n"
-msgstr "nie mogê odpaliæ tcp_create\n"
-
-#: sunrpc/portmap.c:100
-msgid "couldn't do udp_create\n"
-msgstr "nie moge odpaliæ udp_create\n"
+msgstr "stworzenie serwera rpc niemo¿liwe\n"
#: sunrpc/svc_simple.c:77
#, c-format
msgid "couldn't register prog %d vers %d\n"
-msgstr "nie mogê zarejestrowaæ prog %d wer. %d\n"
+msgstr "rejestracja prog %d wer. %d niemo¿liwa\n"
-#: sunrpc/rpc_parse.c:77
-msgid "definition keyword expected"
-msgstr "spodziewane s³owo kluczowe definition"
+#: locale/programs/charmap.c:86
+#, c-format
+msgid "default character map file `%s' not found"
+msgstr "nie znaleziono domy¶lnej tablicy znaków `%s'"
+
+#: locale/programs/ld-time.c:154
+#, c-format
+msgid ""
+"direction flag in string %d in `era' field in category `%s' is not '+' nor "
+"'-'"
+msgstr ""
+"znacznik kierunku w ³añcuchu %d w polu `era' w kategorii `%s' nie jest '+'\n"
+"lub '-'"
+
+#: locale/programs/ld-time.c:164
+#, c-format
+msgid ""
+"direction flag in string %d in `era' field in category `%s' is not a single "
+"character"
+msgstr ""
+"znacznik kierunku w ³añcuchu %d w polu `era' w kategorii `%s' nie jest\n"
+"pojedynczym znakiem"
+
+#: locale/programs/charset.c:87 locale/programs/charset.c:132
+#, c-format
+msgid "duplicate character name `%s'"
+msgstr "dwukrotne wyst±pienie nazwy znaku `%s'"
+
+#: locale/programs/ld-collate.c:1144
+msgid "duplicate collating element definition"
+msgstr "podwójna definicja elementu sortowania"
+
+#: locale/programs/ld-collate.c:1290
+#, c-format
+msgid "duplicate definition for character `%.*s'"
+msgstr "wielokrotna definicja znaku `%.*s'"
+
+#: db/makedb.c:311
+msgid "duplicate key"
+msgstr "dwukrotne wyst±pienie klucza"
-#: catgets/gencat.c:367
+#: catgets/gencat.c:379
msgid "duplicate set definition"
-msgstr "podwójne definicje"
+msgstr "podwójna definicja zbioru"
-#: time/zic.c:928
+#: time/zic.c:963
#, c-format
msgid "duplicate zone name %s (file \"%s\", line %d)"
msgstr "podwójna nazwa strefy %s (plik \"%s\", linia %d)"
-#: catgets/gencat.c:530
+#: catgets/gencat.c:542
msgid "duplicated message identifier"
msgstr "podwójny identyfikator komunikatu"
-#: catgets/gencat.c:503
+#: catgets/gencat.c:515
msgid "duplicated message number"
msgstr "podwójny numer komunikatu"
-#: sunrpc/svc_udp.c:344
+#: locale/programs/ld-collate.c:1699
+msgid "empty weight name: line ignored"
+msgstr "pusta nazwa wagi: linia zignorowana"
+
+#: sunrpc/svc_udp.c:348
msgid "enablecache: cache already enabled"
msgstr "enablecache: bufor jest ju¿ aktywny"
-#: sunrpc/svc_udp.c:349
+#: sunrpc/svc_udp.c:353
msgid "enablecache: could not allocate cache"
msgstr "enablecache: niemo¿liwa alokacja bufora"
-#: sunrpc/svc_udp.c:356
+#: sunrpc/svc_udp.c:360
msgid "enablecache: could not allocate cache data"
msgstr "enablecache: niemo¿liwa alokacja danych bufora"
-#: sunrpc/svc_udp.c:362
+#: sunrpc/svc_udp.c:366
msgid "enablecache: could not allocate cache fifo"
msgstr "enablecache: niemo¿liwa alokacja kolejki dla bufora"
-#: sunrpc/rpc_util.c:300
+# ellipsis = wyrzutnia jezykowa - sprawdzilem. nawet pamietam ze cos takiego
+# istnieje ze szkoly, ale za cholere nie pamietam co to jest ;) -PK
+#: locale/programs/ld-collate.c:1422
+msgid "end point of ellipsis range is bigger then start"
+msgstr "koniec zakresu wyrzutni wiêkszy niz pocz±tek"
+
+#: locale/programs/ld-collate.c:1152
+msgid "error while inserting collation element into hash table"
+msgstr "b³±d podczas wstawiania elementu sortowanego do tablicy mieszaj±cej"
+
+#: locale/programs/ld-collate.c:1164
+msgid "error while inserting to hash table"
+msgstr "b³±d podczas wstawiania do tablicy mieszaj±cej"
+
+#: locale/programs/locfile.c:487
+msgid "expect string argument for `copy'"
+msgstr "spodziewanym argumentem dla `copy' jest ³añcuch"
+
+#: time/zic.c:854
+msgid "expected continuation line not found"
+msgstr "brak spodziewanej linii kontynuacji"
+
+#: locale/programs/locfile.c:1032
#, c-format
-msgid "expected '%s'"
-msgstr "spodziewane '%s'"
+msgid "failure while writing data for category `%s'"
+msgstr "niepowodzenie przy zapisie danych kategorii `%s'"
-#: sunrpc/rpc_util.c:312
+#: nis/ypclnt.c:187
+msgid "fcntl: F_SETFD"
+msgstr "fcntl: F_SETFD"
+
+#: locale/programs/ld-monetary.c:155 locale/programs/ld-numeric.c:95
#, c-format
-msgid "expected '%s' or '%s'"
-msgstr "spodziewane '%s' lub '%s'"
+msgid "field `%s' in category `%s' not defined"
+msgstr "pole `%s' w kategorii `%s' nie jest zdefiniowane"
-#: sunrpc/rpc_util.c:325
+#: locale/programs/ld-messages.c:81 locale/programs/ld-messages.c:102
#, c-format
-msgid "expected '%s', '%s' or '%s'"
-msgstr "spodziewane '%s', '%s' lub '%s'"
+msgid "field `%s' in category `%s' undefined"
+msgstr "pole `%s' w kategorii `%s' nie jest zdefiniowane"
-#: time/zic.c:819
-msgid "expected continuation line not found"
-msgstr "brak spodziewanej linii kontynuacji"
+#: locale/programs/locfile.c:569
+msgid "from-value of `collating-element' must be a string"
+msgstr "argument from-value definicji `collating-element' musi byæ ³añcuchem"
-#: sunrpc/rpc_parse.c:384
-msgid "expected type specifier"
-msgstr "spodziewany specyfikator typu"
+#: locale/programs/linereader.c:328
+msgid "garbage at end of character code specification"
+msgstr "¶mieci na koñcu specyfikacji kodu znaku"
+
+#: locale/programs/linereader.c:214
+msgid "garbage at end of number"
+msgstr "¶mieci na koñcu liczby"
+
+#: locale/programs/ld-time.c:183
+#, c-format
+msgid ""
+"garbage at end of offset value in string %d in `era' field in category `%s'"
+msgstr ""
+"¶mieci na koñcu warto¶ci offset w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: locale/programs/ld-time.c:238
+#, c-format
+msgid ""
+"garbage at end of starting date in string %d in `era' field in category `%s'"
+msgstr ""
+"¶mieci na koñcu pierwszej daty w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: locale/programs/ld-time.c:311
+#, c-format
+msgid ""
+"garbage at end of stopping date in string %d in `era' field in category `%s'"
+msgstr ""
+"¶mieci na koñcu drugiej daty w ³añcuchu %d w polu `era' w kategorii `%s'"
#: sunrpc/get_myaddr.c:73
msgid "get_myaddress: ioctl (get interface configuration)"
-msgstr "get_myaddress: ioctl (info o konfiguracji interfejsu)"
+msgstr "get_myaddress: ioctl (informacja o konfiguracji interfejsu)"
-#: time/zic.c:1113
+#: time/zic.c:1147
msgid "illegal CORRECTION field on Leap line"
msgstr "b³êdne pole CORRECTION w linii Leap"
-#: time/zic.c:1117
+#: time/zic.c:1151
msgid "illegal Rolling/Stationary field on Leap line"
msgstr "b³êdne ple Rolling/Stationary w linii Leap"
-#: sunrpc/rpc_scan.c:281
-msgid "illegal character in file: "
-msgstr "b³êdny znak w pliku: "
+#: locale/programs/ld-collate.c:1770
+msgid "illegal character constant in string"
+msgstr "b³êdna sta³a znakowa w ³añcuchu"
-#: sunrpc/rpc_parse.c:146
-msgid "illegal result type"
-msgstr "b³êdny typ wyniku"
+#: locale/programs/ld-collate.c:1119
+msgid "illegal collation element"
+msgstr "b³êdny element sortowania"
+
+#: locale/programs/charmap.c:196
+msgid "illegal definition"
+msgstr "niepoprawna definicja"
+
+#: locale/programs/charmap.c:349
+msgid "illegal encoding given"
+msgstr "niepoprawne kodowanie"
-#: catgets/gencat.c:340 gencat.c:417
+#: locale/programs/linereader.c:546
+msgid "illegal escape sequence at end of string"
+msgstr "niepoprawna sekwencja escape na koñcu ³añcucha"
+
+#: locale/programs/charset.c:101
+msgid "illegal names for character range"
+msgstr "niepoprawne nazwy dla zakresu znaków"
+
+#: locale/programs/ld-time.c:176
+#, c-format
+msgid "illegal number for offset in string %d in `era' field in category `%s'"
+msgstr ""
+"nieprawid³owa warto¶æ offset w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: catgets/gencat.c:352 catgets/gencat.c:429
msgid "illegal set number"
msgstr "b³êdny numer zbioru"
-#: time/zic.c:777
+#: locale/programs/ld-time.c:230
+#, c-format
+msgid "illegal starting date in string %d in `era' field in category `%s'"
+msgstr ""
+"nieprawid³owa pierwsza data w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: locale/programs/ld-time.c:303
+#, c-format
+msgid "illegal stopping date in string %d in `era' field in category `%s'"
+msgstr "nieprawid³owa druga data w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: locale/programs/ld-ctype.c:812
+#, c-format
+msgid "implementation limit: no more than %d character classes allowed"
+msgstr "ograniczenie implementacji: dozwolone maksymalnie %d klas znaków"
+
+#: locale/programs/ld-ctype.c:844
+#, c-format
+msgid "implementation limit: no more than %d character maps allowed"
+msgstr "ograniczenie implementacji: dozwolone maksymalnie %d map znaków"
+
+#: db/makedb.c:163
+msgid "incorrectly formatted file"
+msgstr "nieprawid³owy format pliku"
+
+#: time/zic.c:811
msgid "input line of unknown type"
msgstr "nieznany typ linii wej¶ciowej"
-#: time/zic.c:984
+#: time/zic.c:1760
+msgid "internal error - addtype called with bad isdst"
+msgstr "b³±d wewnêtrzny - addtype wywo³ane ze b³êdnym isdst"
+
+#: time/zic.c:1768
+msgid "internal error - addtype called with bad ttisgmt"
+msgstr "b³±d wewnêtrzny - addtype wywo³ane ze b³êdnym ttisgmt"
+
+#: time/zic.c:1764
+msgid "internal error - addtype called with bad ttisstd"
+msgstr "b³±d wewnêtrzny - addtype wywo³ane ze b³êdnym ttisstd"
+
+#: locale/programs/ld-ctype.c:304
+#, c-format
+msgid "internal error in %s, line %u"
+msgstr "b³±d wewnêtrzny w %s, linia %u"
+
+#: time/zic.c:1019
msgid "invalid GMT offset"
-msgstr "b³êdne przesuniêcie GMT"
+msgstr "nieprawid³owe przesuniêcie GMT"
-#: time/zic.c:987
+#: time/zic.c:1022
msgid "invalid abbreviation format"
-msgstr "b³êdny format skrótu"
+msgstr "nieprawid³owy format skrótu"
-#: time/zic.c:1078 zic.c:1277 zic.c:1291
+#: time/zic.c:1112 time/zic.c:1313 time/zic.c:1327
msgid "invalid day of month"
-msgstr "z³y dzieñ miesi±ca"
+msgstr "nieprawid³owy dzieñ miesi±ca"
-#: time/zic.c:1236
+#: time/zic.c:1270
msgid "invalid ending year"
-msgstr "z³y rok koñcowy"
+msgstr "nieprawid³owy rok koñcowy"
-#: time/zic.c:1050
+#: time/zic.c:1084
msgid "invalid leaping year"
-msgstr "z³y rok przestêpny"
+msgstr "nieprawid³owy rok przestêpny"
-#: time/zic.c:1065 zic.c:1168
+#: time/zic.c:1099 time/zic.c:1202
msgid "invalid month name"
-msgstr "z³y miesi±c"
+msgstr "nieprawid³owy miesi±c"
-#: time/zic.c:883
+#: time/zic.c:918
msgid "invalid saved time"
-msgstr "z³y czas oszczêdno¶ci"
+msgstr "b³êdny czas oszczêdno¶ci"
-#: time/zic.c:1216
+#: time/zic.c:1250
msgid "invalid starting year"
-msgstr "z³y rok pocz±tkowy"
+msgstr "nieprawid³owy rok pocz±tkowy"
-#: time/zic.c:1094 zic.c:1196
+#: time/zic.c:1128 time/zic.c:1230
msgid "invalid time of day"
-msgstr "z³a pora dnia"
+msgstr "nieprawid³owa pora dnia"
-#: time/zic.c:1282
+#: time/zic.c:1318
msgid "invalid weekday name"
-msgstr "z³y dzieñ tygonia"
+msgstr "nieprawid³owy dzieñ tygodnia"
+
+#: locale/programs/ld-collate.c:1415
+msgid "line after ellipsis must contain character definition"
+msgstr "linia za wyrzutni± musi zawieraæ definicjê znaku"
+
+#: locale/programs/ld-collate.c:1394
+msgid "line before ellipsis does not contain definition for character constant"
+msgstr "linia przed wyrzutni± nie mo¿e zawieraæ definicji sta³ej znakowej"
-#: time/zic.c:757
+#: time/zic.c:791
msgid "line too long"
msgstr "za d³uga linia"
-#: catgets/gencat.c:598
+#: locale/programs/localedef.c:285
+#, c-format
+msgid "locale file `%s', used in `copy' statement, not found"
+msgstr "brak pliku lokalizacji `%s' u¿ytego w wyra¿eniu `copy'"
+
+#: catgets/gencat.c:610
msgid "malformed line ignored"
-msgstr "ignorujê niepoprawn± liniê"
+msgstr "b³êdna linia zosta³a pominiêta"
-#: malloc/mcheck.c:168
+#: malloc/mcheck.c:185
msgid "memory clobbered before allocated block"
-msgstr "pamiêæ zniknê³a zanim zaalokowa³em blok"
+msgstr "zniknê³a pamiêæ przed przydzielonym blokiem"
-#: malloc/mcheck.c:171
+#: malloc/mcheck.c:188
msgid "memory clobbered past end of allocated block"
-msgstr "pamiêæ zniknê³a po alokacji bloku"
+msgstr "zniknê³a pamiêæ za koñcem przydzielonego bloku"
-#: malloc/mcheck.c:165
+#: locale/programs/ld-collate.c:167 locale/programs/ld-collate.c:173
+#: locale/programs/ld-collate.c:177 locale/programs/ld-collate.c:1442
+#: locale/programs/ld-collate.c:1471 locale/programs/locfile.c:962
+#: locale/programs/xmalloc.c:68 posix/getconf.c:250
+msgid "memory exhausted"
+msgstr "pamiêæ zosta³a wyczerpana"
+
+#: malloc/obstack.c:462
+msgid "memory exhausted\n"
+msgstr "pamiêæ zosta³a wyczerpana\n"
+
+#: malloc/mcheck.c:182
msgid "memory is consistent, library is buggy"
-msgstr "pamiêæ jest zwarta, biblioteka ma pluskwy"
+msgstr "pamiêæ jest zwarta, biblioteka zawiera b³êdy"
+
+#: locale/programs/ld-time.c:350
+#, c-format
+msgid "missing era format in string %d in `era' field in category `%s'"
+msgstr "brak formatu ery w ³añcuchu %d w polu `era' w kategorii `%s'"
-#: time/zic.c:878
+#: locale/programs/ld-time.c:339
+#, c-format
+msgid "missing era name in string %d in `era' field in category `%s'"
+msgstr "brak nazwy ery w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: time/zic.c:913
msgid "nameless rule"
msgstr "bezimienna regu³a"
@@ -1246,37 +2430,59 @@ msgstr "bezimienna regu³a"
msgid "never registered prog %d\n"
msgstr "program %d nie by³ nigdy zarejestrowany\n"
-#: rpc_parse.c:313 sunrpc/rpc_parse.c:305
-msgid "no array-of-pointer declarations -- use typedef"
-msgstr "brak deklaracji tablicy wska¼ników - u¿yj typedef"
+#: locale/programs/ld-messages.c:95 locale/programs/ld-messages.c:116
+#, c-format
+msgid "no correct regular expression for field `%s' in category `%s': %s"
+msgstr ""
+"brak poprawnego wyra¿enia regularnego dla pola `%s' w kategorii `%s': %s"
-#: time/zic.c:1955
+#: time/zic.c:2086
msgid "no day in month matches rule"
msgstr "¿aden z dni miesi±ca nie pasuje do regu³y"
-#: sunrpc/portmap.c:452
-msgid "portmap CALLIT: cannot fork.\n"
-msgstr "portmap CALLIT: nie mogê rozwidliæ procesu\n"
+#: locale/programs/ld-collate.c:260
+msgid "no definition of `UNDEFINED'"
+msgstr "brak definicji `UNDEFINED'"
-#: portmap.c:117 sunrpc/portmap.c:95
-msgid "portmap cannot bind"
-msgstr "portmap nie mo¿e zwi±zaæ"
+#: locale/programs/locfile.c:501
+msgid "no other keyword shall be specified when `copy' is used"
+msgstr "¿adne s³owo kluczowe nie powinno wystêpowaæ razem z `copy'"
-#: portmap.c:113 sunrpc/portmap.c:87
-msgid "portmap cannot create socket"
-msgstr "portmap nie mo¿e stworzyæ gniazda"
+#: locale/programs/localedef.c:344
+msgid "no output file produced because warning were issued"
+msgstr "brak pliku wyj¶ciowego - wyst±pi³y ostrze¿enia"
+
+#: locale/programs/charmap.c:315 locale/programs/charmap.c:466
+#: locale/programs/charmap.c:545
+msgid "no symbolic name given"
+msgstr "brak nazwy symbolicznej"
+
+#: locale/programs/charmap.c:380 locale/programs/charmap.c:512
+#: locale/programs/charmap.c:578
+msgid "no symbolic name given for end of range"
+msgstr "brak nazwy symbolicznej dla koñca zakresu"
+
+#: locale/programs/ld-collate.c:244
+#, c-format
+msgid "no weight defined for symbol `%s'"
+msgstr "brak definicji wagi dla symbolu `%s'"
-#: rpc_scan.c:464 sunrpc/rpc_scan.c:456
-msgid "preprocessor error"
-msgstr "b³±d preprocesora"
+#: locale/programs/charmap.c:430
+msgid "only WIDTH definitions are allowed to follow the CHARMAP definition"
+msgstr "po definicji CHARMAP mog± wystêpowaæ tylko definicje WIDTH"
-#: rpcinfo.c:350 sunrpc/rpcinfo.c:222
+#: db/makedb.c:327
+#, c-format
+msgid "problems while reading `%s'"
+msgstr "wyst±pi³y problemy podczas czytania `%s'"
+
+#: sunrpc/rpcinfo.c:222 sunrpc/rpcinfo.c:350
#, c-format
msgid "program %lu is not available\n"
msgstr "program %lu jest niedostêpny\n"
-#: rpcinfo.c:282 rpcinfo.c:371 rpcinfo.c:408 rpcinfo.c:429
-#: sunrpc/rpcinfo.c:245 sunrpc/rpcinfo.c:462
+#: sunrpc/rpcinfo.c:245 sunrpc/rpcinfo.c:282 sunrpc/rpcinfo.c:371
+#: sunrpc/rpcinfo.c:408 sunrpc/rpcinfo.c:429 sunrpc/rpcinfo.c:462
#, c-format
msgid "program %lu version %lu is not available\n"
msgstr "program %lu wersja %lu jest niedostêpny\n"
@@ -1286,25 +2492,25 @@ msgstr "program %lu wersja %lu jest niedostêpny\n"
msgid "program %lu version %lu ready and waiting\n"
msgstr "program %lu wersja %lu gotowy i oczekuje\n"
-#: inet/rcmd.c:154
+#: inet/rcmd.c:172
#, c-format
-msgid "rcmd: select (setting up stderr): %s\n"
-msgstr "rcmd: select (ustawienie stderr): %s\n"
+msgid "rcmd: select (setting up stderr): %m\n"
+msgstr "rcmd: select (podczas ustawiania stderr): %m\n"
-#: inet/rcmd.c:86
+#: inet/rcmd.c:104
msgid "rcmd: socket: All ports in use\n"
msgstr "rcmd: socket: Wszystkie porty zajête\n"
-#: inet/rcmd.c:141
+#: inet/rcmd.c:160
#, c-format
-msgid "rcmd: write (setting up stderr): %s\n"
-msgstr "rcmd: write (ustawianie stderr): %s\n"
+msgid "rcmd: write (setting up stderr): %m\n"
+msgstr "rcmd: write (podczas ustawiania stderr): %m\n"
#: sunrpc/svc_simple.c:83
msgid "registerrpc: out of memory\n"
msgstr "registerrpc: brak pamiêci\n"
-#: time/zic.c:1690
+#: time/zic.c:1821
msgid "repeated leap second moment"
msgstr "powtórzone sekundy przestêpne"
@@ -1316,7 +2522,7 @@ msgstr "rpcinfo: nieznany host %s\n"
#: sunrpc/rpcinfo.c:626
#, c-format
msgid "rpcinfo: %s is unknown service\n"
-msgstr "rpcinfo: nieznana us³ug %s\n"
+msgstr "rpcinfo: nieznana us³uga %s\n"
#: sunrpc/rpcinfo.c:600
#, c-format
@@ -1326,171 +2532,536 @@ msgstr "rpcinfo: Nie mogê usun±æ rejestracji prog %s wer. %s\n"
#: sunrpc/rpcinfo.c:576
#, c-format
msgid "rpcinfo: broadcast failed: %s\n"
-msgstr "rpcinfo: nieudana transmisja: %s\n"
+msgstr "rpcinfo: rozg³aszanie nieudane: %s\n"
#: sunrpc/rpcinfo.c:505
msgid "rpcinfo: can't contact portmapper"
-msgstr "rpcinfo: nie mogê skontaktowaæ siê z portmapperem"
+msgstr "rpcinfo: kontakt z portmapperem niemo¿liwy"
#: sunrpc/rpcinfo.c:510
msgid "rpcinfo: can't contact portmapper: "
-msgstr "rpcinfo: nie mogê skontaktowaæ siê z portmapperem: "
+msgstr "rpcinfo: kontakt z portmapperem niemo¿liwy: "
-#: sunrpc/portmap.c:138
-msgid "run_svc returned unexpectedly\n"
-msgstr "run_svc powróci³ niespodziewanie\n"
+#: time/zic.c:704 time/zic.c:706
+msgid "same rule name in multiple files"
+msgstr "ta sama nazwa nazwa regu³y w ró¿nych plikach"
-#: inet/rcmd.c:158
+#: inet/rcmd.c:175
msgid "select: protocol failure in circuit setup\n"
msgstr "select: b³±d protoko³u podczas ustawiania\n"
-#: inet/rcmd.c:176
-msgid "socket: protocol failure in circuit setup.\n"
-msgstr "socket: b³±d protoko³u podczas ustawiania.\n"
+#: inet/rcmd.c:193
+msgid "socket: protocol failure in circuit setup\n"
+msgstr "socket: protokó³ zawiód³ podczas konfiguracji po³±czenia\n"
+
+#: locale/programs/locfile.c:622
+msgid "sorting order `forward' and `backward' are mutually exclusive"
+msgstr "porz±dki sortowania `forward' i `backward' wykluczaj± siê wzajemnie"
-#: time/zic.c:742
+#: locale/programs/ld-collate.c:1571 locale/programs/ld-collate.c:1617
+msgid ""
+"specification of sorting weight for collation symbol does not make sense"
+msgstr "specyfikacja wagi dla elementu sortowania nie ma sensu"
+
+#: time/zic.c:775
msgid "standard input"
msgstr "standardowe wej¶cie"
-#: time/zdump.c:259
+#: time/zdump.c:268
msgid "standard output"
msgstr "standardowe wyj¶cie"
-#: time/zic.c:1240
+#: locale/programs/ld-time.c:257
+#, c-format
+msgid "starting date is illegal in string %d in `era' field in category `%s'"
+msgstr ""
+"nieprawid³owa pierwsza data w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: time/zic.c:1274
msgid "starting year greater than ending year"
-msgstr "rok pocz±tkowy pó¼niejszy od koñcowego"
+msgstr "pierwszy rok jest pó¼niejszy ni¿ drugi"
-#: sunrpc/svc_tcp.c:199 svc_tcp.c:204
+#: locale/programs/ld-time.c:330
+#, c-format
+msgid "stopping date is illegal in string %d in `era' field in category `%s'"
+msgstr "nieprawid³owa druga data w ³añcuchu %d w polu `era' w kategorii `%s'"
+
+#: sunrpc/svc_tcp.c:201 sunrpc/svc_tcp.c:206
msgid "svc_tcp: makefd_xprt: out of memory\n"
msgstr "svc_tcp: makefd_xprt: brak pamiêci\n"
-#: sunrpc/svc_tcp.c:147
+#: sunrpc/svc_tcp.c:149
msgid "svctcp_.c - cannot getsockname or listen"
-msgstr "svctcp_.c - nie mogê odpaliæ getsockname lub listen"
+msgstr "svctcp_.c - wykonanie getsockname lub listen niemo¿liwe"
-#: sunrpc/svc_tcp.c:134
+#: sunrpc/svc_tcp.c:136
msgid "svctcp_.c - udp socket creation problem"
msgstr "svctcp_.c - problemy przy tworzeniu gniazda udp"
-#: sunrpc/svc_tcp.c:154 svc_tcp.c:161
+#: sunrpc/svc_tcp.c:156 sunrpc/svc_tcp.c:163
msgid "svctcp_create: out of memory\n"
msgstr "svctcp_create: brak pamiêci\n"
-#: sunrpc/svc_udp.c:119
+#: sunrpc/svc_udp.c:123
msgid "svcudp_create - cannot getsockname"
-msgstr "svcudp_create - nie mogê odpaliæ getsockname"
+msgstr "svcudp_create - wykonanie getsockname niemo¿liwe"
-#: sunrpc/svc_udp.c:107
+#: sunrpc/svc_udp.c:111
msgid "svcudp_create: socket creation problem"
msgstr "svcudp_create: problemy przy tworzeniu gniazda"
-#: catgets/gencat.c:369 gencat.c:505 gencat.c:532
+#: locale/programs/ld-collate.c:1194
+#, c-format
+msgid ""
+"symbol for multicharacter collating element `%.*s' duplicates element "
+"definition"
+msgstr ""
+"symbol zarezerwowany dla wieloznakowego elementu sortowania `%.*s' powiela "
+"definicjê tego elementu"
+
+#: locale/programs/ld-collate.c:1067
+#, c-format
+msgid ""
+"symbol for multicharacter collating element `%.*s' duplicates other element "
+"definition"
+msgstr ""
+"symbol zarezerwowany dla wieloznakowego elementu sortowania `%.*s' powiela "
+"definicjê innego elementu"
+
+#: locale/programs/ld-collate.c:1203
+#, c-format
+msgid ""
+"symbol for multicharacter collating element `%.*s' duplicates other symbol "
+"definition"
+msgstr ""
+"symbol zarezerwowany dla wieloznakowego elementu sortowania `%.*s' powiela "
+"definicjê innego symbolu"
+
+#: locale/programs/ld-collate.c:1076
+#, c-format
+msgid ""
+"symbol for multicharacter collating element `%.*s' duplicates symbol "
+"definition"
+msgstr ""
+"symbol zarezerwowany dla wieloznakowego elementu sortowania `%.*s' powiela "
+"definicjê tego symbolu"
+
+#: locale/programs/ld-collate.c:1058 locale/programs/ld-collate.c:1185
+#, c-format
+msgid ""
+"symbol for multicharacter collating element `%.*s' duplicates symbolic name "
+"in charset"
+msgstr ""
+"symbol zarezerwowany dla wieloznakowego elementu sortowania `%.*s' powiela "
+"nazwê symboliczn± z zestawu znaków"
+
+#: locale/programs/charmap.c:314 locale/programs/charmap.c:348
+#: locale/programs/charmap.c:378 locale/programs/charmap.c:465
+#: locale/programs/charmap.c:511 locale/programs/charmap.c:544
+#: locale/programs/charmap.c:576
+#, c-format
+msgid "syntax error in %s definition: %s"
+msgstr "b³±d sk³adniowy w definicji %s: %s"
+
+#: locale/programs/locfile.c:642
+msgid "syntax error in `order_start' directive"
+msgstr "b³±d sk³adniowy w dyrektywie `order_start'"
+
+#: locale/programs/locfile.c:384
+msgid "syntax error in character class definition"
+msgstr "b³±d sk³adniowy definicji klasy znaków"
+
+#: locale/programs/locfile.c:442
+msgid "syntax error in character conversion definition"
+msgstr "b³±d sk³adniowy w definicji konwersji znaku"
+
+#: locale/programs/locfile.c:684
+msgid "syntax error in collating order definition"
+msgstr "b³±d sk³adniowy w definicji kolejno¶ci sortowania"
+
+#: locale/programs/locfile.c:534
+msgid "syntax error in collation definition"
+msgstr "b³±d sk³adniowy w definicji sortowania"
+
+#: locale/programs/locfile.c:357
+msgid "syntax error in definition of LC_CTYPE category"
+msgstr "b³±d sk³adniowy w definicji kategorii LC_CTYPE"
+
+#: locale/programs/locfile.c:300
+msgid "syntax error in definition of new character class"
+msgstr "b³±d sk³adniowy w definicji nowej klasy znaków"
+
+#: locale/programs/locfile.c:310
+msgid "syntax error in definition of new character map"
+msgstr "b³±d sk³adniowy w definicji nowej mapy znaków"
+
+#: locale/programs/locfile.c:895
+msgid "syntax error in message locale definition"
+msgstr "b³±d sk³adniowy w definicji lokalnych komunikatów"
+
+#: locale/programs/locfile.c:806
+msgid "syntax error in monetary locale definition"
+msgstr "b³±d sk³adniowy w definicji lokalnej waluty"
+
+#: locale/programs/locfile.c:833
+msgid "syntax error in numeric locale definition"
+msgstr "b³±d sk³adniowy w lokalnej definicji numerycznej"
+
+#: locale/programs/locfile.c:744
+msgid "syntax error in order specification"
+msgstr "b³±d sk³adniowy w specyfikacji kolejno¶ci"
+
+#: locale/programs/charmap.c:195 locale/programs/charmap.c:211
+#, c-format
+msgid "syntax error in prolog: %s"
+msgstr "b³±d sk³adniowy w prologu: %s"
+
+#: locale/programs/locfile.c:871
+msgid "syntax error in time locale definition"
+msgstr "b³±d sk³adniowy w lokalnej definicji czasu"
+
+#: locale/programs/locfile.c:277
+msgid "syntax error: not inside a locale definition section"
+msgstr "b³±d sk³adniowy: nie wewn±trz sekcji definicji lokalnych"
+
+#: catgets/gencat.c:381 catgets/gencat.c:517 catgets/gencat.c:544
msgid "this is the first definition"
msgstr "to pierwsza definicja"
-#: time/zic.c:1083
+#: time/zic.c:1117
msgid "time before zero"
-msgstr "czas przez zerem"
+msgstr "czas przed zerem"
-#: time/zic.c:1091 zic.c:1855 zic.c:1874
+#: time/zic.c:1125 time/zic.c:1986 time/zic.c:2005
msgid "time overflow"
msgstr "przepe³nienie czasu"
-#: sunrpc/rpc_util.c:285
-msgid "too many files!\n"
-msgstr "za du¿o plików!\n"
+#: locale/programs/charset.c:44
+msgid "too few bytes in character encoding"
+msgstr "za ma³o bajtów w kodzie znaku"
-#: time/zic.c:1684
+#: locale/programs/charset.c:46
+msgid "too many bytes in character encoding"
+msgstr "za du¿o bajtów w kodzie znaku"
+
+#: locale/programs/locales.h:72
+msgid "too many character classes defined"
+msgstr "zdefiniowane zbyt wiele klas znaków"
+
+#: time/zic.c:1815
msgid "too many leap seconds"
msgstr "za du¿o sekund przestêpnych"
-#: time/zic.c:1656
+#: time/zic.c:1787
msgid "too many local time types"
msgstr "za du¿o lokalnych typów czasu"
-#: time/zic.c:1622
+#: time/zic.c:1741
msgid "too many transitions?!"
msgstr "za duzo konwersji?!"
-#: time/zic.c:1978
+#: locale/programs/ld-collate.c:1626
+msgid "too many weights"
+msgstr "za du¿o wag"
+
+#: time/zic.c:2109
msgid "too many, or too long, time zone abbreviations"
-msgstr "za du¿o, lub za d³ugie, skróty stref czasowych"
+msgstr "za d³ugie lub za du¿o skrótów stref czasowych"
+
+#: locale/programs/linereader.h:146
+msgid "trailing garbage at end of line"
+msgstr "¶miecie na koñcu linii"
#: sunrpc/svc_simple.c:132
#, c-format
msgid "trouble replying to prog %d\n"
msgstr "problem przy odpowiadaniu programowi %d\n"
-#: time/zic.c:1247
+#: locale/programs/ld-collate.c:1386
+msgid "two lines in a row containing `...' are not allowed"
+msgstr "dwie kolejne linie zawieraj±ce `...' nie s± dozwolone"
+
+#: time/zic.c:1281
msgid "typed single year"
msgstr "podany pojedyñczy rok"
-#: catgets/gencat.c:466
+#: posix/getconf.c:239
+msgid "undefined"
+msgstr "nieokre¶lone"
+
+#: locale/programs/charmap.c:617 locale/programs/charmap.c:628
+#, c-format
+msgid "unknown character `%s'"
+msgstr "nieznany znak `%s'"
+
+#: locale/programs/ld-messages.c:193 locale/programs/ld-messages.c:204
+#: locale/programs/ld-messages.c:215 locale/programs/ld-messages.c:226
+#: locale/programs/ld-time.c:698
+#, c-format
+msgid "unknown character in field `%s' of category `%s'"
+msgstr "nieznany znak w polu `%s' kategorii `%s'"
+
+#: locale/programs/locfile.c:607
+msgid "unknown collation directive"
+msgstr "nieznana dyrektywa sortuj±ca"
+
+#: catgets/gencat.c:478
#, c-format
msgid "unknown directive `%s': line ignored"
msgstr "nieznana dyrektywa `%s': linia zignorowana"
-#: catgets/gencat.c:445
+#: catgets/gencat.c:457
#, c-format
msgid "unknown set `%s'"
msgstr "nieznany zestaw `%s'"
-msgid "unknown signal"
-msgstr "nieznany sygna³"
+#: locale/programs/ld-collate.c:1370 locale/programs/ld-collate.c:1561
+#: locale/programs/ld-collate.c:1735
+#, c-format
+msgid "unknown symbol `%.*s': line ignored"
+msgstr "nieznany symbol `%.*s': linia zignorowana"
-#: time/zic.c:714
+#: time/zic.c:747
msgid "unruly zone"
msgstr "strefa bez regu³"
-#: catgets/gencat.c:950
+#: catgets/gencat.c:962
msgid "unterminated message"
msgstr "niezakoñczony komunikat"
-#: sunrpc/rpc_scan.c:319
-msgid "unterminated string constant"
-msgstr "niezakoñczona sta³a tekstowa"
+#: locale/programs/linereader.c:515 locale/programs/linereader.c:550
+msgid "unterminated string"
+msgstr "niezakoñczony ³añcuch"
-#: sunrpc/rpc_main.c:78
-#, c-format
-msgid "usage: %s infile\n"
-msgstr "sk³adnia: %s plik_we\n"
+#: locale/programs/linereader.c:385
+msgid "unterminated symbolic name"
+msgstr "niezakoñczona nazwa symboliczna"
-#: time/zic.c:1921
+#: locale/programs/ld-collate.c:1688
+msgid "unterminated weight name"
+msgstr "niezakoñczona nazwa wagi"
+
+#: locale/programs/charset.c:119
+msgid "upper limit in range is not smaller then lower limit"
+msgstr "górna granica zakresu nie jest mniejsza ni¿ dolna"
+
+#: time/zic.c:2052
msgid "use of 2/29 in non leap-year"
msgstr "u¿ycie 2/29 w roku nieprzestêpnym"
-#: sunrpc/rpc_parse.c:330
-msgid "variable-length array declaration expected"
-msgstr "spodziewana tablica o zmiennej d³ugo¶ci"
+#: locale/programs/charmap.c:438 locale/programs/charmap.c:492
+#, c-format
+msgid "value for %s must be an integer"
+msgstr "warto¶æ %s musi byæ liczb± ca³kowit±"
-#: sunrpc/rpc_parse.c:370
-msgid "voids allowed only inside union and program definitions"
-msgstr "typ void dozwolony tylko w unii i definicjach programów"
+#: locale/programs/charmap.c:233
+#, c-format
+msgid "value for <%s> must lie between 1 and 4"
+msgstr "warto¶æ <%s> musi byæ z zakresu 1 do 4"
+
+#: locale/programs/ld-monetary.c:149 locale/programs/ld-numeric.c:89
+#, c-format
+msgid "value for field `%s' in category `%s' must not be the empty string"
+msgstr "warto¶æ pola `%s' w kategorii `%s' nie mo¿e byæ pustym ³añcuchem"
+
+#: locale/programs/charmap.c:245
+msgid "value of <mb_cur_max> must be greater than the value of <mb_cur_min>"
+msgstr "warto¶æ <mb_cur_max> musi byæ wiêksza ni¿ warto¶æ <mb_cur_min>"
+
+#: locale/programs/ld-monetary.c:139
+msgid ""
+"value of field `int_curr_symbol' in category `LC_MONETARY' does not "
+"correspond to a valid name in ISO 4217"
+msgstr ""
+"zawarto¶æ pola `int_curr_symbol' w kategorii `LC_MONETARY' nie jest zgodna z "
+"nazwami ISO 4217"
+
+#: locale/programs/ld-monetary.c:133
+msgid ""
+"value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length"
+msgstr ""
+"zawarto¶æ pola `int_curr_symbol' w kategorii `LC_MONETARY' ma z³± d³ugo¶æ"
+
+#: locale/programs/ld-monetary.c:371 locale/programs/ld-numeric.c:199
+#, c-format
+msgid "values for field `%s' in category `%s' must be smaller than 127"
+msgstr "warto¶ci pola `%s' w kategorii `%s' musz± byæ mniejsze ni¿ 127"
-#: login/setutent_r.c:47
+#: locale/programs/ld-monetary.c:367
+#, c-format
+msgid "values for field `%s' in category `%s' must not be zero"
+msgstr "warto¶ci pola `%s' w kategorii `%s' nie mog± byæ zerowe"
+
+#: login/utmp_file.c:84
msgid "while opening UTMP file"
msgstr "podczas otwierania pliku UTMP"
-#: catgets/gencat.c:977
+#: catgets/gencat.c:989
msgid "while opening old catalog file"
msgstr "podczas otwierania starego katalogu"
-#: time/zic.c:1041
+#: db/makedb.c:354
+msgid "while reading database"
+msgstr "podczas czytania bazy"
+
+#: db/makedb.c:316
+msgid "while writing data base file"
+msgstr "podczas zapisywania pliku bazy"
+
+#: db/makedb.c:142
+msgid "wrong number of arguments"
+msgstr "z³a liczba argumentów"
+
+#: time/zic.c:1075
msgid "wrong number of fields on Leap line"
msgstr "z³a liczba pól w linii Leap"
-#: time/zic.c:1132
+#: time/zic.c:1166
msgid "wrong number of fields on Link line"
msgstr "z³a liczba pól w linii Link"
-#: time/zic.c:874
+#: time/zic.c:909
msgid "wrong number of fields on Rule line"
msgstr "z³a liczba pól w linii Rule"
-#: time/zic.c:944
+#: time/zic.c:979
msgid "wrong number of fields on Zone continuation line"
msgstr "z³a liczba pól w linii kontynuacji Zone"
-#: time/zic.c:902
+#: time/zic.c:937
msgid "wrong number of fields on Zone line"
msgstr "z³a liczba pól w linii Zone"
+
+#: nis/ypclnt.c:811
+msgid "yp_update: cannot convert host to netname\n"
+msgstr "yp_update: konwersja nazwy hosta na nazwê sieci jest niemo¿liwa\n"
+
+#: nis/ypclnt.c:823
+msgid "yp_update: cannot get server address\n"
+msgstr "yp_update: uzyskanie adresu serwera jest niemo¿liwe\n"
+
+msgid " %s [-c | -h | -l | -m] [-o outfile] [infile]\n"
+msgstr " %s [-c | -h | -l | -m] [-o plik_wy] [plik_we]\n"
+
+msgid " %s [-s udp|tcp]* [-o outfile] [infile]\n"
+msgstr " %s [-s udp|tcp]* [-o plik_wy] [plik_we]\n"
+
+msgid "%s, line %d: "
+msgstr "%s, linia %d: "
+
+msgid "%s: output would overwrite %s\n"
+msgstr "%s: wyj¶cie nadpisze %s\n"
+
+msgid "%s: unable to open "
+msgstr "%s: otwarcie jest niemo¿liwe "
+
+msgid "Reserved error 82"
+msgstr "Zarezerwowany b³±d 82"
+
+msgid "Reserved error 83"
+msgstr "Zarezerwowany b³±d 83"
+
+msgid "Reserved error 84"
+msgstr "Zarezerwowany b³±d 84"
+
+msgid "Reserved error 85"
+msgstr "Zarezerwowany b³±d 85"
+
+msgid "Reserved error 86"
+msgstr "Zarezerwowany b³±d 86"
+
+msgid "Reserved error 87"
+msgstr "Zarezerwowany b³±d 87"
+
+msgid "Reserved error 88"
+msgstr "Zarezerwowany b³±d 88"
+
+msgid "Reserved error 89"
+msgstr "Zarezerwowany b³±d 89"
+
+msgid "Reserved error 90"
+msgstr "Zarezerwowany b³±d 90"
+
+msgid "Reserved error 91"
+msgstr "Zarezerwowany b³±d 91"
+
+msgid "Reserved error 92"
+msgstr "Zarezerwowany b³±d 92"
+
+msgid "Reserved error 93"
+msgstr "Zarezerwowany b³±d 93"
+
+msgid "Reserved error 94"
+msgstr "Zarezerwowany b³±d 94"
+
+msgid "Reserved error 95"
+msgstr "Zarezerwowany b³±d 95"
+
+msgid "Reserved error 96"
+msgstr "Zarezerwowany b³±d 96"
+
+msgid "Reserved error 97"
+msgstr "Zarezerwowany b³±d 97"
+
+msgid "Reserved error 98"
+msgstr "Zarezerwowany b³±d 98"
+
+msgid "Reserved error 99"
+msgstr "Zarezerwowany b³±d 99"
+
+msgid "Too many levels of remote in path"
+msgstr "Za du¿o poziomów zagnie¿d¿enia w ¶cie¿ce"
+
+msgid "array declaration expected"
+msgstr "spodziewana deklaracja tablicy"
+
+msgid "constant or identifier expected"
+msgstr "spodziewana sta³a lub identyfikator"
+
+msgid "couldn't do tcp_create\n"
+msgstr "wykonanie tcp_create jest niemo¿liwe\n"
+
+msgid "couldn't do udp_create\n"
+msgstr "wykonanie udp_create jest niemo¿liwe\n"
+
+msgid "definition keyword expected"
+msgstr "spodziewane s³owo kluczowe definition"
+
+msgid "expected '%s'"
+msgstr "spodziewane '%s'"
+
+msgid "expected '%s' or '%s'"
+msgstr "spodziewane '%s' lub '%s'"
+
+msgid "expected '%s', '%s' or '%s'"
+msgstr "spodziewane '%s', '%s' lub '%s'"
+
+msgid "expected type specifier"
+msgstr "spodziewany specyfikator typu"
+
+msgid "illegal result type"
+msgstr "b³êdny typ wyniku"
+
+msgid "no array-of-pointer declarations -- use typedef"
+msgstr "brak deklaracji tablicy wska¼ników - u¿yj typedef"
+
+msgid "portmap CALLIT: cannot fork.\n"
+msgstr "portmap CALLIT: nie mogê rozwidliæ procesu\n"
+
+msgid "portmap cannot create socket"
+msgstr "portmap nie mo¿e stworzyæ gniazda"
+
+msgid "run_svc returned unexpectedly\n"
+msgstr "run_svc powróci³ niespodziewanie\n"
+
+msgid "unknown signal"
+msgstr "nieznany sygna³"
+
+msgid "usage: %s infile\n"
+msgstr "sk³adnia: %s plik_we\n"
+
+msgid "variable-length array declaration expected"
+msgstr "spodziewana tablica o zmiennej d³ugo¶ci"
+
+msgid "voids allowed only inside union and program definitions"
+msgstr "typ void dozwolony tylko w unii i definicjach programów"
diff --git a/rellns-sh b/rellns-sh
index 4c4b431a52..e66010d513 100755
--- a/rellns-sh
+++ b/rellns-sh
@@ -22,30 +22,12 @@ if test $# -ne 2; then
exit 1
fi
-# A problem with this script is that we must be able to handle symbolic
-# links somewhere in the paths of either path. To resolve symlinks we use
-# the `pwd' program. But some `pwd' programs are no real programs but
-# instead aliases (defined by the user) or builtins (as in bash-2). Both
-# kinds have in common that they might not give the correct result. E.g.,
-# the builtin in bash-2 returns the path which was used to change to the
-# directory and not the real path.
-#
-# To prevent this problem we make sure the real `pwd' somewhere in the
-# path is used. Currently there is only support for bash-2 available.
-# If other shells also have problems we have to add more code here.
-
-if test "$BASH_VERSINFO" = "2"; then
- unalias pwd
- unset pwd
- enable -n pwd
-fi
-
# Make both paths absolute.
if test -d $1; then
- to=`cd $1 && pwd`
+ to=`cd $1 && /bin/pwd`
else
temp=`echo $1 | sed 's%/*[^/]*$%%'`
- to=`cd $temp && pwd`
+ to=`cd $temp && /bin/pwd`
to="$to/`echo $1 | sed 's%.*/\([^/][^/]*\)$%\1%'`"
fi
to=`echo $to | sed 's%^/%%'`
@@ -57,9 +39,10 @@ else
fi
if test -z "$from"; then
- from=`pwd`;
+ from=`/bin/pwd | sed 's%^/%%'`
+else
+ from=`cd $from && /bin/pwd | sed 's%^/%%'`
fi
-from=`cd $from && pwd | sed 's%^/%%'`
while test -n "$to" && test -n "$from"; do
preto=`echo $to | sed 's%^\([^/]*\)/.*%\1%'`
diff --git a/resolv/mapv4v6addr.h b/resolv/mapv4v6addr.h
index 4295398f45..a638393255 100644
--- a/resolv/mapv4v6addr.h
+++ b/resolv/mapv4v6addr.h
@@ -64,12 +64,12 @@ map_v4v6_address (const char *src, char *dst)
int i;
/* Stash a temporary copy so our caller can update in place. */
- bcopy (src, tmp, INADDRSZ);
+ memcpy (tmp, src, INADDRSZ);
/* Mark this ipv6 addr as a mapped ipv4. */
for (i = 0; i < 10; i++)
*p++ = 0x00;
*p++ = 0xff;
*p++ = 0xff;
/* Retrieve the saved copy and we're done. */
- bcopy (tmp, (void *) p, INADDRSZ);
+ memcpy ((void *) p, tmp, INADDRSZ);
}
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index 959aa2f21d..754f99548f 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -197,8 +197,8 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
int size, n, status;
if (af == AF_INET6 && len == IN6ADDRSZ &&
- (bcmp (uaddr, mapped, sizeof mapped) == 0
- || bcmp (uaddr, tunnelled, sizeof tunnelled) == 0))
+ (memcmp (uaddr, mapped, sizeof mapped) == 0
+ || memcmp (uaddr, tunnelled, sizeof tunnelled) == 0))
{
/* Unmap. */
addr += sizeof mapped;
@@ -260,7 +260,7 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
result->h_addrtype = af;
result->h_length = len;
- bcopy (addr, host_data->host_addr, len);
+ memcpy (host_data->host_addr, addr, len);
host_data->h_addr_ptrs[0] = (char *) host_data->host_addr;
host_data->h_addr_ptrs[1] = NULL;
if (af == AF_INET && (_res.options & RES_USE_INET6))
@@ -520,7 +520,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
cp += n;
continue;
}
- bcopy (cp, *hap++ = bp, n);
+ memcpy (*hap++ = bp, cp, n);
bp += n;
cp += n;
linebuflen -= n;
diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c
index 277d4e1cbf..eb2f30d0f9 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -160,6 +160,12 @@ main (int argc, char **argv)
if (res != 2 || a != 123 || b != 456 || n != 6)
return 1;
+
+ res = sscanf ("0", "%lg", &a);
+ printf ("res = %d, a = %g\n", res, a);
+
+ if (res != 1 || a != 0)
+ exit (EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 4780f51021..3738e44f0a 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -925,24 +925,24 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
else
negative = 0;
- if (c == '0' && tolower (c == inchar ()) == 'x')
+ is_hexa = 0;
+ exp_char = 'e';
+ if (c == '0')
{
- /* It is a number in hexadecimal format. */
- ADDW ('0');
- ADDW ('x');
+ ADDW (c);
+ c = inchar ();
+ if (tolower (c) == 'x')
+ {
+ /* It is a number in hexadecimal format. */
+ ADDW (c);
- is_hexa = 1;
- exp_char = 'p';
+ is_hexa = 1;
+ exp_char = 'p';
- /* Grouping is not allowed. */
- flags &= ~GROUP;
- c = inchar ();
- }
- else
- {
- /* It not a hexadecimal prefix. */
- is_hexa = 0;
- exp_char = 'e';
+ /* Grouping is not allowed. */
+ flags &= ~GROUP;
+ c = inchar ();
+ }
}
got_dot = got_e = 0;
diff --git a/string/swab.c b/string/swab.c
index 9d7858cf96..c9cf7004ea 100644
--- a/string/swab.c
+++ b/string/swab.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 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
@@ -21,6 +21,7 @@
void
swab (const char *from, char *to, ssize_t n)
{
+ n &= ~((ssize_t) 1);
while (n > 1)
{
const char b0 = from[--n], b1 = from[--n];
diff --git a/sysdeps/generic/mathbits.h b/sysdeps/generic/mathbits.h
new file mode 100644
index 0000000000..e4db3dcf19
--- /dev/null
+++ b/sysdeps/generic/mathbits.h
@@ -0,0 +1,35 @@
+/* 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.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATHBITS_H
+#define _MATHBITS_H 1
+
+/* Normally, there is no long double type and the `float' and `double'
+ expressions are evaluated as `double'. */
+typedef double float_t; /* `float' expressions are evaluated as
+ `double'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+/* Signal that both types are `double'. */
+#define FLT_EVAL_METHOD 1
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VAL
+
+#endif /* mathbits.h */
diff --git a/sysdeps/generic/memmem.c b/sysdeps/generic/memmem.c
index 099897ab80..e891e26b4e 100644
--- a/sysdeps/generic/memmem.c
+++ b/sysdeps/generic/memmem.c
@@ -1,48 +1,48 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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,
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <string.h>
/* Return the first occurrence of NEEDLE in HAYSTACK. */
-PTR
-DEFUN(memmem, (haystack, haystack_len,
- needle, needle_len),
- CONST PTRCONST haystack AND CONST size_t haystack_len AND
- CONST PTRCONST needle AND CONST size_t needle_len)
+void *
+memmem (haystack, haystack_len, needle, needle_len)
+ const void *haystack;
+ size_t haystack_len;
+ const void *needle;
+ size_t needle_len;
{
- register CONST char *begin;
- register CONST char *CONST last_possible
- = (CONST char *) haystack + haystack_len - needle_len;
+ const char *begin;
+ const char *const last_possible
+ = (const char *) haystack + haystack_len - needle_len;
if (needle_len == 0)
/* The first occurrence of the empty string is deemed to occur at
the end of the string. */
- return (PTR) &((CONST char *) haystack)[haystack_len - 1];
+ return (void *) &((const char *) haystack)[haystack_len - 1];
- for (begin = (CONST char *) haystack; begin <= last_possible; ++begin)
- if (begin[0] == ((CONST char *) needle)[0] &&
- !memcmp ((CONST PTR) &begin[1],
- (CONST PTR) ((CONST char *) needle + 1),
+ for (begin = (const char *) haystack; begin <= last_possible; ++begin)
+ if (begin[0] == ((const char *) needle)[0] &&
+ !memcmp ((const void *) &begin[1],
+ (const void *) ((const char *) needle + 1),
needle_len - 1))
- return (PTR) begin;
+ return (void *) begin;
return NULL;
}
diff --git a/sysdeps/i386/fpu/fclrexcpt.c b/sysdeps/i386/fpu/fclrexcpt.c
new file mode 100644
index 0000000000..0b43776f54
--- /dev/null
+++ b/sysdeps/i386/fpu/fclrexcpt.c
@@ -0,0 +1,40 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feclearexcept (int excepts)
+{
+ fenv_t temp;
+
+ /* Mask out unsupported bits/exceptions. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Bah, we have to clear selected exceptions. Since there is no
+ `fldsw' instruction we have to do it the hard way. */
+ __asm__ ("fnstenv %0" : "=m" (*&temp));
+
+ /* Clear the relevant bits. */
+ temp.status_word &= excepts ^ FE_ALL_EXCEPT;
+
+ /* Put the new data in effect. */
+ __asm__ ("fldenv %0" : : "m" (*&temp));
+}
diff --git a/sysdeps/i386/fpu/fegetenv.c b/sysdeps/i386/fpu/fegetenv.c
new file mode 100644
index 0000000000..452449d044
--- /dev/null
+++ b/sysdeps/i386/fpu/fegetenv.c
@@ -0,0 +1,27 @@
+/* Store current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetenv (fenv_t *envp)
+{
+ __asm__ ("fnstenv %0" : "=m" (*envp));
+}
diff --git a/sysdeps/i386/fpu/fegetround.c b/sysdeps/i386/fpu/fegetround.c
new file mode 100644
index 0000000000..4dfa32d0b5
--- /dev/null
+++ b/sysdeps/i386/fpu/fegetround.c
@@ -0,0 +1,31 @@
+/* Return current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetround (void)
+{
+ int cw;
+
+ __asm__ ("fnstcw %0" : "=m" (*&cw));
+
+ return cw & 0xc00;
+}
diff --git a/sysdeps/i386/fpu/feholdexcpt.c b/sysdeps/i386/fpu/feholdexcpt.c
new file mode 100644
index 0000000000..c9a0f73489
--- /dev/null
+++ b/sysdeps/i386/fpu/feholdexcpt.c
@@ -0,0 +1,36 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ unsigned short int work;
+
+ /* Store the environment. */
+ __asm__ ("fnstenv %0" : "=m" (*envp));
+
+ /* Now set all exceptions to non-stop. */
+ work = envp->control_word | 0x3f;
+ __asm__ ("fldcw %0" : : "m" (*&work));
+
+ return 1;
+}
diff --git a/sysdeps/i386/fpu/fenvbits.h b/sysdeps/i386/fpu/fenvbits.h
new file mode 100644
index 0000000000..bea89a15b1
--- /dev/null
+++ b/sysdeps/i386/fpu/fenvbits.h
@@ -0,0 +1,91 @@
+/* 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.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file should never be included directly. */
+
+#ifndef _FENVBITS_H
+#define _FENVBITS_H 1
+
+/* Define bits representing the exception. We use the bit positions
+ of the appropriate bits in the FPU control word. */
+enum
+ {
+ FE_INVALID = 0x01,
+#define FE_INVALID FE_INVALID
+ __FE_DENORM = 0x02,
+ FE_DIVBYZERO = 0x04,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_OVERFLOW = 0x08,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 0x10,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_INEXACT = 0x20
+#define FE_INEXACT FE_INEXACT
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The ix87 FPU supports all of the four defined rounding modes. We
+ use again the bit positions in the FPU control word as the values
+ for the appropriate macros. */
+enum
+ {
+ FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_DOWNWARD = 0x400,
+#define FE_DOWNWARD FE_DOWNWARD
+ FE_UPWARD = 0x800,
+#define FE_UPWARD FE_UPWARD
+ FE_TOWARDSZERO = 0xc00
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned short int fexcept_t;
+
+
+/* Type representing floating-point environment. This function corresponds to the layout of the block written by the `fstenv'. */
+typedef struct
+ {
+ unsigned short int control_word;
+ unsigned short int __unused1;
+ unsigned short int status_word;
+ unsigned short int __unused2;
+ unsigned short int tags;
+ unsigned short int __unused3;
+ unsigned int eip;
+ unsigned short int cs_selector;
+ unsigned int opcode:11;
+ unsigned int __unused4:5;
+ unsigned int data_offset;
+ unsigned short int data_selector;
+ unsigned short int __unused5;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exception is masked. */
+# define FE_NOMASK_ENV ((fenv_t *) -2)
+#endif
+
+#endif /* fenvbits.h */
diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c
new file mode 100644
index 0000000000..e7300ea1e6
--- /dev/null
+++ b/sysdeps/i386/fpu/fesetenv.c
@@ -0,0 +1,76 @@
+/* Install given floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+#include <assert.h>
+
+
+void
+fesetenv (const fenv_t *envp)
+{
+ fenv_t temp;
+
+ /* The memory block used by fstenv/fldenv has a size of 28 bytes. */
+ assert (sizeof (fenv_t) == 28);
+
+ /* Install the environment specified by ENVP. But there are a few
+ values which we do not want to come from the saved environment.
+ Therefore, we get the current environment and replace the values
+ we want to use from the environment specified by the parameter. */
+ __asm__ ("fnstenv %0" : "=m" (*&temp));
+
+ if (envp == FE_DFL_ENV)
+ {
+ temp.control_word |= FE_ALL_EXCEPT;
+ temp.control_word &= ~FE_TOWARDSZERO;
+ temp.status_word &= ~FE_ALL_EXCEPT;
+ temp.eip = 0;
+ temp.cs_selector = 0;
+ temp.opcode = 0;
+ temp.data_offset = 0;
+ temp.data_selector = 0;
+ }
+ else if (envp == FE_NOMASK_ENV)
+ {
+ temp.control_word &= ~(FE_ALL_EXCEPT | FE_TOWARDSZERO);
+ temp.status_word &= ~FE_ALL_EXCEPT;
+ temp.eip = 0;
+ temp.cs_selector = 0;
+ temp.opcode = 0;
+ temp.data_offset = 0;
+ temp.data_selector = 0;
+ }
+ else
+ {
+ temp.control_word &= ~(FE_ALL_EXCEPT | FE_TOWARDSZERO);
+ temp.control_word |= (envp->control_word
+ & (FE_ALL_EXCEPT | FE_TOWARDSZERO));
+ temp.status_word &= ~FE_ALL_EXCEPT;
+ temp.status_word |= envp->status_word & FE_ALL_EXCEPT;
+ temp.eip = envp->eip;
+ temp.cs_selector = envp->cs_selector;
+ temp.opcode = envp->opcode;
+ temp.data_offset = envp->data_offset;
+ temp.data_selector = envp->data_selector;
+ }
+
+ __asm__ ("fldenv %0" : : "m" (temp));
+}
diff --git a/sysdeps/i386/fpu/fesetround.c b/sysdeps/i386/fpu/fesetround.c
new file mode 100644
index 0000000000..844c58663e
--- /dev/null
+++ b/sysdeps/i386/fpu/fesetround.c
@@ -0,0 +1,38 @@
+/* Set current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ unsigned short int cw;
+
+ if ((round & ~0xc00) != 0)
+ /* ROUND is no valid rounding mode. */
+ return 0;
+
+ __asm__ ("fnstcw %0" : "=m" (*&cw));
+ cw &= ~0xc00;
+ cw |= round;
+ __asm__ ("fldcw %0" : : "m" (*&cw));
+
+ return 1;
+}
diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c
new file mode 100644
index 0000000000..0f7abc2344
--- /dev/null
+++ b/sysdeps/i386/fpu/feupdateenv.c
@@ -0,0 +1,39 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feupdateenv (const fenv_t *envp)
+{
+ fexcept_t temp;
+
+ /* Save current exceptions. */
+ __asm__ ("fnstsw %0" : "=m" (*&temp));
+ temp &= FE_ALL_EXCEPT;
+
+ /* Install new environment. */
+ fesetenv (envp);
+
+ /* Raise the safed exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ feraiseexcept ((int) temp);
+}
diff --git a/sysdeps/i386/fpu/fgetexcptflg.c b/sysdeps/i386/fpu/fgetexcptflg.c
new file mode 100644
index 0000000000..1db3953eae
--- /dev/null
+++ b/sysdeps/i386/fpu/fgetexcptflg.c
@@ -0,0 +1,32 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ fexcept_t temp;
+
+ /* Get the current exceptions. */
+ __asm__ ("fnstsw %0" : "=m" (*&temp));
+
+ *flagp = temp & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/i386/fpu/fraiseexcpt.c b/sysdeps/i386/fpu/fraiseexcpt.c
new file mode 100644
index 0000000000..90e992aaec
--- /dev/null
+++ b/sysdeps/i386/fpu/fraiseexcpt.c
@@ -0,0 +1,75 @@
+/* Raise given exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+void
+feraiseexcept (int excepts)
+{
+ /* Raise exceptions represented by EXPECTS. But we must raise only
+ one signal at a time. It is important the if the overflow/underflow
+ exception and the inexact exception are given at the same time,
+ the overflow/underflow exception follows the inexact exception. */
+
+ /* First: invalid exception. */
+ if ((FE_INVALID & excepts) != 0)
+ {
+ /* One example of a invalid operation is 0 * Infinity. */
+ double d = 0.0 * HUGE_VAL;
+ (void) &d;
+ /* Now force the exception. */
+ __asm__ ("fwait");
+ }
+
+ /* Next: division by zero. */
+ if ((FE_DIVBYZERO & excepts) != 0)
+ {
+ double d;
+ __asm__ ("fld1; fldz; fdivp %%st, %%st(1); fwait" : "=t" (d));
+ (void) &d;
+ }
+
+ /* Next: overflow. */
+ if ((FE_OVERFLOW & excepts) != 0)
+ {
+ long double d = LDBL_MAX * LDBL_MAX;
+ (void) &d;
+ /* Now force the exception. */
+ __asm__ ("fwait");
+ }
+
+ /* Next: underflow. */
+ if ((FE_UNDERFLOW & excepts) != 0)
+ {
+ long double d = LDBL_MIN / 16.0;
+ (void) &d;
+ /* Now force the exception. */
+ __asm__ ("fwait");
+ }
+
+ /* Last: inexact. */
+ if ((FE_INEXACT & excepts) != 0)
+ {
+ long double d;
+ __asm__ ("fld1; fldpi; fdivp %%st, %%st(1); fwait" : "=t" (d));
+ (void) &d;
+ }
+}
diff --git a/sysdeps/i386/fpu/fsetexcptflg.c b/sysdeps/i386/fpu/fsetexcptflg.c
new file mode 100644
index 0000000000..598b8d2233
--- /dev/null
+++ b/sysdeps/i386/fpu/fsetexcptflg.c
@@ -0,0 +1,40 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+void
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ fenv_t temp;
+
+ /* Get the current environment. We have to do this since we cannot
+ separately set the status word. */
+ __asm__ ("fnstenv %0" : "=m" (*&temp));
+
+ temp.status_word &= ~(excepts & FE_ALL_EXCEPT);
+ temp.status_word |= *flagp & excepts & FE_ALL_EXCEPT;
+
+ /* Store the new status word (along with the rest of the environment.
+ Possibly new exceptions are set but they won't get executed unless
+ the next floating-point instruction. */
+ __asm__ ("fldenv %0" : : "m" (*&temp));
+}
diff --git a/sysdeps/i386/fpu/ftestexcept.c b/sysdeps/i386/fpu/ftestexcept.c
new file mode 100644
index 0000000000..c69170fb2c
--- /dev/null
+++ b/sysdeps/i386/fpu/ftestexcept.c
@@ -0,0 +1,32 @@
+/* Test exception in current environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fetestexcept (int excepts)
+{
+ int temp;
+
+ /* Get current exceptions. */
+ __asm__ ("fnstsw %0" : "=a" (temp));
+
+ return temp & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/i386/fpu/mathbits.h b/sysdeps/i386/fpu/mathbits.h
new file mode 100644
index 0000000000..7885afeec0
--- /dev/null
+++ b/sysdeps/i386/fpu/mathbits.h
@@ -0,0 +1,36 @@
+/* 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.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATHBITS_H
+#define _MATHBITS_H 1
+
+/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
+ which is also available for the user as `long double'. Therefore
+ we define: */
+typedef long double float_t; /* `float' expressions are evaluated as
+ `long double'. */
+typedef long double double_t; /* `double' expressions are evaluated as
+ `long double'. */
+
+/* Signal that both types are `long double'. */
+#define FLT_EVAL_METHOD 2
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VALL
+
+#endif /* mathbits.h */
diff --git a/sysdeps/i386/huge_val.h b/sysdeps/i386/huge_val.h
index 0aad84902c..fa071452fb 100644
--- a/sysdeps/i386/huge_val.h
+++ b/sysdeps/i386/huge_val.h
@@ -65,12 +65,6 @@ static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
#define HUGE_VALL (__huge_vall.__ld)
#endif /* GCC. */
-
-/* Expression representing positive infinity. Here it is the same as
- HUGE_VALF. */
-#define INFINITY HUGE_VALF
-
#endif /* __USE_ISOC9X. */
-
#endif /* huge_val.h */
diff --git a/sysdeps/ieee754/huge_val.h b/sysdeps/ieee754/huge_val.h
index ef9fa65902..9d1785b75f 100644
--- a/sysdeps/ieee754/huge_val.h
+++ b/sysdeps/ieee754/huge_val.h
@@ -69,12 +69,6 @@ static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
same as `double'. */
#define HUGE_VALL HUGE_VAL
-
-/* Expression representing positive infinity. Here it is the same as
- HUGE_VALF. */
-#define INFINITY HUGE_VALF
-
#endif /* __USE_ISOC9X. */
-
#endif /* huge_val.h */
diff --git a/sysdeps/libm-i387/s_finite.S b/sysdeps/libm-i387/s_finite.S
index 7c67e1906f..384fc1c79e 100644
--- a/sysdeps/libm-i387/s_finite.S
+++ b/sysdeps/libm-i387/s_finite.S
@@ -1,18 +1,14 @@
/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
+ * Written by Joe Keane <jgk@jgk.org>.
*/
#include <machine/asm.h>
-RCSID("$NetBSD: s_finite.S,v 1.4 1995/05/08 23:57:41 jtc Exp $")
-
ENTRY(__finite)
movl 8(%esp),%eax
- andl $0x7ff00000, %eax
- cmpl $0x7ff00000, %eax
- setne %al
- andl $0x000000ff, %eax
+ orl $0x800fffff, %eax
+ incl %eax
+ shrl $31, %eax
ret
END (__finite)
weak_alias (__finite, finite)
diff --git a/sysdeps/libm-i387/s_finitef.S b/sysdeps/libm-i387/s_finitef.S
index ee26c875a5..51b4d0d536 100644
--- a/sysdeps/libm-i387/s_finitef.S
+++ b/sysdeps/libm-i387/s_finitef.S
@@ -1,18 +1,14 @@
/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
+ * Written by Joe Keane <jgk@jgk.org>.
*/
#include <machine/asm.h>
-RCSID("$NetBSD: s_finitef.S,v 1.3 1995/05/09 00:00:02 jtc Exp $")
-
ENTRY(__finitef)
movl 4(%esp),%eax
- andl $0x7f800000, %eax
- cmpl $0x7f800000, %eax
- setne %al
- andl $0x000000ff, %eax
+ orl $0x807fffff, %eax
+ incl %eax
+ shrl $31, %eax
ret
END (__finitef)
weak_alias (__finitef, finitef)
diff --git a/sysdeps/libm-i387/s_finitel.S b/sysdeps/libm-i387/s_finitel.S
index 944b2497e2..acc5ad4cd0 100644
--- a/sysdeps/libm-i387/s_finitel.S
+++ b/sysdeps/libm-i387/s_finitel.S
@@ -1,20 +1,14 @@
/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
+ * Written by Joe Keane <jgk@jgk.org>.
*/
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
ENTRY(__finitel)
movl 12(%esp),%eax
- andl $0x7fff, %eax
- cmpl $0x7fff, %eax
- setne %al
- andl $0x000000ff, %eax
+ orl $0xffff8000, %eax
+ incl %eax
+ shrl $31, %eax
ret
END (__finitel)
weak_alias (__finitel, finitel)
diff --git a/sysdeps/libm-i387/s_nearbyint.S b/sysdeps/libm-i387/s_nearbyint.S
new file mode 100644
index 0000000000..566c075c37
--- /dev/null
+++ b/sysdeps/libm-i387/s_nearbyint.S
@@ -0,0 +1,23 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
+
+#include <machine/asm.h>
+
+ENTRY(__nearbyint)
+ fldl 4(%esp)
+ pushl %eax
+ pushl %ecx
+ fnstcw (%esp)
+ movl (%esp), %eax
+ andl $~0x20, %eax
+ movl %eax, 4(%esp)
+ fldcw 4(%esp)
+ frndint
+ fclex
+ fldcw (%esp)
+ ret
+END (__nearbyint)
+weak_alias (__nearbyint, nearbyint)
diff --git a/sysdeps/libm-i387/s_nearbyintf.S b/sysdeps/libm-i387/s_nearbyintf.S
new file mode 100644
index 0000000000..715434031c
--- /dev/null
+++ b/sysdeps/libm-i387/s_nearbyintf.S
@@ -0,0 +1,23 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
+
+#include <machine/asm.h>
+
+ENTRY(__nearbyintf)
+ flds 4(%esp)
+ pushl %eax
+ pushl %ecx
+ fnstcw (%esp)
+ movl (%esp), %eax
+ andl $~0x20, %eax
+ movl %eax, 4(%esp)
+ fldcw 4(%esp)
+ frndint
+ fclex
+ fldcw (%esp)
+ ret
+END (__nearbyintf)
+weak_alias (__nearbyintf, nearbyintf)
diff --git a/sysdeps/libm-i387/s_nearbyintl.S b/sysdeps/libm-i387/s_nearbyintl.S
new file mode 100644
index 0000000000..c50b42d961
--- /dev/null
+++ b/sysdeps/libm-i387/s_nearbyintl.S
@@ -0,0 +1,23 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
+
+#include <machine/asm.h>
+
+ENTRY(__nearbyintl)
+ fldt 4(%esp)
+ pushl %eax
+ pushl %ecx
+ fnstcw (%esp)
+ movl (%esp), %eax
+ andl $~0x20, %eax
+ movl %eax, 4(%esp)
+ fldcw 4(%esp)
+ frndint
+ fclex
+ fldcw (%esp)
+ ret
+END (__nearbyintl)
+weak_alias (__nearbyintl, nearbyintl)
diff --git a/sysdeps/libm-i387/s_trunc.S b/sysdeps/libm-i387/s_trunc.S
new file mode 100644
index 0000000000..3100d716a9
--- /dev/null
+++ b/sysdeps/libm-i387/s_trunc.S
@@ -0,0 +1,36 @@
+/* Truncate double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <machine/asm.h>
+
+ENTRY(__trunc)
+ fldl 4(%esp)
+ subl $8, %esp
+ fstcw 4(%esp)
+ movl $0xc00, %edx
+ orl 4(%esp), %edx
+ movl %edx, (%esp)
+ fldcw (%esp)
+ frndint
+ fldcw 4(%esp)
+ addl $8, %esp
+ ret
+END(__trunc)
+weak_alias (__trunc, trunc)
diff --git a/sysdeps/libm-i387/s_truncf.S b/sysdeps/libm-i387/s_truncf.S
new file mode 100644
index 0000000000..275e5f714c
--- /dev/null
+++ b/sysdeps/libm-i387/s_truncf.S
@@ -0,0 +1,36 @@
+/* Truncate float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <machine/asm.h>
+
+ENTRY(__truncf)
+ flds 4(%esp)
+ subl $8, %esp
+ fstcw 4(%esp)
+ movl $0xc00, %edx
+ orl 4(%esp), %edx
+ movl %edx, (%esp)
+ fldcw (%esp)
+ frndint
+ fldcw 4(%esp)
+ addl $8, %esp
+ ret
+END(__truncf)
+weak_alias (__truncf, truncf)
diff --git a/sysdeps/libm-i387/s_truncl.S b/sysdeps/libm-i387/s_truncl.S
new file mode 100644
index 0000000000..4c0bb0ce53
--- /dev/null
+++ b/sysdeps/libm-i387/s_truncl.S
@@ -0,0 +1,36 @@
+/* Truncate long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <machine/asm.h>
+
+ENTRY(__truncl)
+ fldt 4(%esp)
+ subl $8, %esp
+ fstcw 4(%esp)
+ movl $0xc00, %edx
+ orl 4(%esp), %edx
+ movl %edx, (%esp)
+ fldcw (%esp)
+ frndint
+ fldcw 4(%esp)
+ addl $8, %esp
+ ret
+END(__truncl)
+weak_alias (__truncl, truncl)
diff --git a/sysdeps/libm-ieee754/s_cacos.c b/sysdeps/libm-ieee754/s_cacos.c
new file mode 100644
index 0000000000..9b007598f0
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cacos.c
@@ -0,0 +1,41 @@
+/* Return cosine of complex double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+__complex__ double
+__cacos (__complex__ double x)
+{
+ __complex__ double y;
+ __complex__ double res;
+
+ y = __casin (x);
+
+ __real__ res = (double) M_PI_2 - __real__ y;
+ __imag__ res = -__imag__ y;
+
+ return res;
+}
+weak_alias (__cacos, cacos)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__cacos, __cacosl)
+weak_alias (__cacos, cacosl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_cacosf.c b/sysdeps/libm-ieee754/s_cacosf.c
new file mode 100644
index 0000000000..6fb132dc23
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cacosf.c
@@ -0,0 +1,37 @@
+/* Return cosine of complex float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+__complex__ float
+__cacosf (__complex__ float x)
+{
+ __complex__ float y;
+ __complex__ float res;
+
+ y = __casinf (x);
+
+ __real__ res = (float) M_PI_2 - __real__ y;
+ __imag__ res = -__imag__ y;
+
+ return res;
+}
+weak_alias (__cacosf, cacosf)
diff --git a/sysdeps/libm-ieee754/s_cacosh.c b/sysdeps/libm-ieee754/s_cacosh.c
new file mode 100644
index 0000000000..d938c64473
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cacosh.c
@@ -0,0 +1,88 @@
+/* Return arc hyperbole cosine for double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ double
+__cacosh (__complex__ double x)
+{
+ __complex__ double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VAL;
+
+ if (rcls == FP_NAN)
+ __imag__ res = __nan ("");
+ else
+ __imag__ res = __copysign ((rcls == FP_INFINITE
+ ? (__real__ x < 0.0
+ ? M_PI - M_PI_4 : M_PI_4)
+ : M_PI_2), __imag__ x);
+ }
+ else if (rcls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VAL;
+
+ if (icls >= FP_ZERO)
+ __imag__ res = __copysign (signbit (__real__ x) ? M_PI : 0.0,
+ __imag__ x);
+ else
+ __imag__ res = __nan ("");
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ __real__ res = 0.0;
+ __imag__ res = __copysign (M_PI_2, __imag__ x);
+ }
+ else
+ {
+ __complex__ double y;
+
+ __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
+ __imag__ y = 2.0 * __real__ x * __imag__ x;
+
+ y = __csqrt (y);
+
+ __real__ y += __real__ x;
+ __imag__ y += __imag__ x;
+
+ res = __clog (y);
+ }
+
+ return res;
+}
+weak_alias (__cacosh, cacosh)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__cacosh, __cacoshl)
+weak_alias (__cacosh, cacoshl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_cacoshf.c b/sysdeps/libm-ieee754/s_cacoshf.c
new file mode 100644
index 0000000000..bcfebea123
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cacoshf.c
@@ -0,0 +1,84 @@
+/* Return arc hyperbole cosine for float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ float
+__cacoshf (__complex__ float x)
+{
+ __complex__ float res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VALF;
+
+ if (rcls == FP_NAN)
+ __imag__ res = __nanf ("");
+ else
+ __imag__ res = __copysignf ((rcls == FP_INFINITE
+ ? (__real__ x < 0.0
+ ? M_PI - M_PI_4 : M_PI_4)
+ : M_PI_2), __imag__ x);
+ }
+ else if (rcls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VALF;
+
+ if (icls >= FP_ZERO)
+ __imag__ res = __copysignf (signbit (__real__ x) ? M_PI : 0.0,
+ __imag__ x);
+ else
+ __imag__ res = __nanf ("");
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ __real__ res = 0.0;
+ __imag__ res = __copysignf (M_PI_2, __imag__ x);
+ }
+ else
+ {
+ __complex__ float y;
+
+ __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
+ __imag__ y = 2.0 * __real__ x * __imag__ x;
+
+ y = __csqrtf (y);
+
+ __real__ y += __real__ x;
+ __imag__ y += __imag__ x;
+
+ res = __clogf (y);
+ }
+
+ return res;
+}
+weak_alias (__cacoshf, cacoshf)
diff --git a/sysdeps/libm-ieee754/s_cacoshl.c b/sysdeps/libm-ieee754/s_cacoshl.c
new file mode 100644
index 0000000000..ed5980c551
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cacoshl.c
@@ -0,0 +1,84 @@
+/* Return arc hyperbole cosine for long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ long double
+__cacoshl (__complex__ long double x)
+{
+ __complex__ long double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VALL;
+
+ if (rcls == FP_NAN)
+ __imag__ res = __nanl ("");
+ else
+ __imag__ res = __copysignl ((rcls == FP_INFINITE
+ ? (__real__ x < 0.0
+ ? M_PI - M_PI_4 : M_PI_4)
+ : M_PI_2), __imag__ x);
+ }
+ else if (rcls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VALL;
+
+ if (icls >= FP_ZERO)
+ __imag__ res = __copysignl (signbit (__real__ x) ? M_PI : 0.0,
+ __imag__ x);
+ else
+ __imag__ res = __nanl ("");
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ __real__ res = 0.0;
+ __imag__ res = __copysignl (M_PI_2, __imag__ x);
+ }
+ else
+ {
+ __complex__ long double y;
+
+ __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
+ __imag__ y = 2.0 * __real__ x * __imag__ x;
+
+ y = __csqrtl (y);
+
+ __real__ y += __real__ x;
+ __imag__ y += __imag__ x;
+
+ res = __clogl (y);
+ }
+
+ return res;
+}
+weak_alias (__cacoshl, cacoshl)
diff --git a/sysdeps/libm-ieee754/s_cacosl.c b/sysdeps/libm-ieee754/s_cacosl.c
new file mode 100644
index 0000000000..7a60de5a50
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cacosl.c
@@ -0,0 +1,37 @@
+/* Return cosine of complex long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+__complex__ long double
+__cacosl (__complex__ long double x)
+{
+ __complex__ long double y;
+ __complex__ long double res;
+
+ y = __casinl (x);
+
+ __real__ res = M_PI_2 - __real__ y;
+ __imag__ res = -__imag__ y;
+
+ return res;
+}
+weak_alias (__cacosl, cacosl)
diff --git a/sysdeps/libm-ieee754/s_casin.c b/sysdeps/libm-ieee754/s_casin.c
new file mode 100644
index 0000000000..516aea0464
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_casin.c
@@ -0,0 +1,66 @@
+/* Return arc sine of complex double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ double
+__casin (__complex__ double x)
+{
+ __complex__ double res;
+
+ if (isnan (__real__ x) || isnan (__imag__ x))
+ {
+ if (__real__ x == 0.0)
+ {
+ res = x;
+ }
+ else if (__isinf (__real__ x) || __isinf (__imag__ x))
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __copysign (HUGE_VAL, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else
+ {
+ __complex__ double y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = __casinh (y);
+
+ __real__ res = __imag__ y;
+ __imag__ res = -__real__ y;
+ }
+
+ return res;
+}
+weak_alias (__casin, casin)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__casin, __casinl)
+weak_alias (__casin, casinl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_casinf.c b/sysdeps/libm-ieee754/s_casinf.c
new file mode 100644
index 0000000000..aaf0d66c28
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_casinf.c
@@ -0,0 +1,62 @@
+/* Return arc sine of complex float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ float
+__casinf (__complex__ float x)
+{
+ __complex__ float res;
+
+ if (isnan (__real__ x) || isnan (__imag__ x))
+ {
+ if (__real__ x == 0.0)
+ {
+ res = x;
+ }
+ else if (__isinff (__real__ x) || __isinff (__imag__ x))
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __copysignf (HUGE_VALF, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else
+ {
+ __complex__ float y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = __casinhf (y);
+
+ __real__ res = __imag__ y;
+ __imag__ res = -__real__ y;
+ }
+
+ return res;
+}
+weak_alias (__casinf, casinf)
diff --git a/sysdeps/libm-ieee754/s_casinh.c b/sysdeps/libm-ieee754/s_casinh.c
new file mode 100644
index 0000000000..da7d1ed429
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_casinh.c
@@ -0,0 +1,84 @@
+/* Return arc hyperbole sine for double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ double
+__casinh (__complex__ double x)
+{
+ __complex__ double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = __copysign (HUGE_VAL, __real__ x);
+
+ if (rcls == FP_NAN)
+ __imag__ res = __nan ("");
+ else
+ __imag__ res = __copysign (rcls >= FP_ZERO ? M_PI_2 : M_PI_4,
+ __imag__ x);
+ }
+ else if (rcls <= FP_INFINITE)
+ {
+ __real__ res = __real__ x;
+ if ((rcls == FP_INFINITE && icls >= FP_ZERO)
+ || (rcls == FP_NAN && icls == FP_ZERO))
+ __imag__ res = __copysign (0.0, __imag__ x);
+ else
+ __imag__ res = __nan ("");
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ __complex__ double y;
+
+ __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
+ __imag__ y = 2.0 * __real__ x * __imag__ x;
+
+ y = __csqrt (y);
+
+ __real__ y += __real__ x;
+ __imag__ y += __imag__ x;
+
+ res = __clog (y);
+ }
+
+ return res;
+}
+weak_alias (__casinh, casinh)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__casinh, __casinhl)
+weak_alias (__casinh, casinhl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_casinhf.c b/sysdeps/libm-ieee754/s_casinhf.c
new file mode 100644
index 0000000000..e8441f4fa0
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_casinhf.c
@@ -0,0 +1,80 @@
+/* Return arc hyperbole sine for float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ float
+__casinhf (__complex__ float x)
+{
+ __complex__ float res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = __copysignf (HUGE_VALF, __real__ x);
+
+ if (rcls == FP_NAN)
+ __imag__ res = __nanf ("");
+ else
+ __imag__ res = __copysignf (rcls >= FP_ZERO ? M_PI_2 : M_PI_4,
+ __imag__ x);
+ }
+ else if (rcls <= FP_INFINITE)
+ {
+ __real__ res = __real__ x;
+ if ((rcls == FP_INFINITE && icls >= FP_ZERO)
+ || (rcls == FP_NAN && icls == FP_ZERO))
+ __imag__ res = __copysignf (0.0, __imag__ x);
+ else
+ __imag__ res = __nanf ("");
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ __complex__ float y;
+
+ __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
+ __imag__ y = 2.0 * __real__ x * __imag__ x;
+
+ y = __csqrtf (y);
+
+ __real__ y += __real__ x;
+ __imag__ y += __imag__ x;
+
+ res = __clogf (y);
+ }
+
+ return res;
+}
+weak_alias (__casinhf, casinhf)
diff --git a/sysdeps/libm-ieee754/s_casinhl.c b/sysdeps/libm-ieee754/s_casinhl.c
new file mode 100644
index 0000000000..cc6757b189
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_casinhl.c
@@ -0,0 +1,80 @@
+/* Return arc hyperbole sine for long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ long double
+__casinhl (__complex__ long double x)
+{
+ __complex__ long double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = __copysignl (HUGE_VALL, __real__ x);
+
+ if (rcls == FP_NAN)
+ __imag__ res = __nanl ("");
+ else
+ __imag__ res = __copysignl (rcls >= FP_ZERO ? M_PI_2 : M_PI_4,
+ __imag__ x);
+ }
+ else if (rcls <= FP_INFINITE)
+ {
+ __real__ res = __real__ x;
+ if ((rcls == FP_INFINITE && icls >= FP_ZERO)
+ || (rcls == FP_NAN && icls == FP_ZERO))
+ __imag__ res = __copysignl (0.0, __imag__ x);
+ else
+ __imag__ res = __nanl ("");
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ __complex__ long double y;
+
+ __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
+ __imag__ y = 2.0 * __real__ x * __imag__ x;
+
+ y = __csqrtl (y);
+
+ __real__ y += __real__ x;
+ __imag__ y += __imag__ x;
+
+ res = __clogl (y);
+ }
+
+ return res;
+}
+weak_alias (__casinhl, casinhl)
diff --git a/sysdeps/libm-ieee754/s_casinl.c b/sysdeps/libm-ieee754/s_casinl.c
new file mode 100644
index 0000000000..cc750d4a11
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_casinl.c
@@ -0,0 +1,62 @@
+/* Return arc sine of complex long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ long double
+__casinl (__complex__ long double x)
+{
+ __complex__ long double res;
+
+ if (isnan (__real__ x) || isnan (__imag__ x))
+ {
+ if (__real__ x == 0.0)
+ {
+ res = x;
+ }
+ else if (__isinfl (__real__ x) || __isinfl (__imag__ x))
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __copysignl (HUGE_VALL, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else
+ {
+ __complex__ long double y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = __casinhl (y);
+
+ __real__ res = __imag__ y;
+ __imag__ res = -__real__ y;
+ }
+
+ return res;
+}
+weak_alias (__casinl, casinl)
diff --git a/sysdeps/libm-ieee754/s_catan.c b/sysdeps/libm-ieee754/s_catan.c
new file mode 100644
index 0000000000..bab87e95a8
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_catan.c
@@ -0,0 +1,89 @@
+/* Return arc tangent of complex double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ double
+__catan (__complex__ double x)
+{
+ __complex__ double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (rcls == FP_INFINITE)
+ {
+ __real__ res = __copysign (M_PI_2, __real__ x);
+ __imag__ res = __copysign (0.0, __imag__ x);
+ }
+ else if (icls == FP_INFINITE)
+ {
+ if (rcls >= FP_ZERO)
+ __real__ res = __copysign (M_PI_2, __real__ x);
+ else
+ __real__ res = __nan ("");
+ __imag__ res = __copysign (0.0, __imag__ x);
+ }
+ else if (icls == FP_ZERO || icls == FP_INFINITE)
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __copysign (0.0, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ double r2, num, den;
+
+ r2 = __real__ x * __real__ x;
+
+ den = 1 - r2 - __imag__ x * __imag__ x;
+
+ __real__ res = 0.5 * __atan ((2.0 * __real__ x) / den);
+
+ num = __imag__ x + 1.0;
+ num = r2 + num * num;
+
+ den = __imag__ x - 1.0;
+ den = r2 + den * den;
+
+ __imag__ res = 0.25 * __ieee754_log (num / den);
+ }
+
+ return res;
+}
+weak_alias (__catan, catan)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__catan, __catanl)
+weak_alias (__catan, catanl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_catanf.c b/sysdeps/libm-ieee754/s_catanf.c
new file mode 100644
index 0000000000..92bdac9ec8
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_catanf.c
@@ -0,0 +1,85 @@
+/* Return arc tangent of complex float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ float
+__catanf (__complex__ float x)
+{
+ __complex__ float res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (rcls == FP_INFINITE)
+ {
+ __real__ res = __copysignf (M_PI_2, __real__ x);
+ __imag__ res = __copysignf (0.0, __imag__ x);
+ }
+ else if (icls == FP_INFINITE)
+ {
+ if (rcls >= FP_ZERO)
+ __real__ res = __copysignf (M_PI_2, __real__ x);
+ else
+ __real__ res = __nanf ("");
+ __imag__ res = __copysignf (0.0, __imag__ x);
+ }
+ else if (icls == FP_ZERO || icls == FP_INFINITE)
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __copysignf (0.0, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ float r2, num, den;
+
+ r2 = __real__ x * __real__ x;
+
+ den = 1 - r2 - __imag__ x * __imag__ x;
+
+ __real__ res = 0.5 * __atanf ((2.0 * __real__ x) / den);
+
+ num = __imag__ x + 1.0;
+ num = r2 + num * num;
+
+ den = __imag__ x - 1.0;
+ den = r2 + den * den;
+
+ __imag__ res = 0.25 * __ieee754_logf (num / den);
+ }
+
+ return res;
+}
+weak_alias (__catanf, catanf)
diff --git a/sysdeps/libm-ieee754/s_catanh.c b/sysdeps/libm-ieee754/s_catanh.c
new file mode 100644
index 0000000000..6c4b10e3db
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_catanh.c
@@ -0,0 +1,84 @@
+/* Return arc hyperbole tangent for double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ double
+__catanh (__complex__ double x)
+{
+ __complex__ double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = __copysign (0.0, __real__ x);
+ __imag__ res = __copysign (M_PI_2, __imag__ x);
+ }
+ else if (rcls == FP_INFINITE || rcls == FP_ZERO)
+ {
+ __real__ res = __copysign (0.0, __real__ x);
+ if (icls >= FP_ZERO)
+ __imag__ res = __copysign (M_PI_2, __imag__ x);
+ else
+ __imag__ res = __nan ("");
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ double i2, num, den;
+
+ i2 = __imag__ x * __imag__ x;
+
+ num = 1.0 - __real__ x;
+ num = i2 + num * num;
+
+ den = 1.0 + __real__ x;
+ den = i2 + den * den;
+
+ __real__ res = 0.25 * __ieee754_log (num / den);
+
+ den = 1 - __real__ x * __real__ x - i2;
+
+ __imag__ res = 0.5 * __atan ((2.0 * __imag__ x) / den);
+ }
+
+ return res;
+}
+weak_alias (__catanh, catanh)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__catanh, __catanhl)
+weak_alias (__catanh, catanhl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_catanhf.c b/sysdeps/libm-ieee754/s_catanhf.c
new file mode 100644
index 0000000000..5d195be905
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_catanhf.c
@@ -0,0 +1,80 @@
+/* Return arc hyperbole tangent for float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ float
+__catanhf (__complex__ float x)
+{
+ __complex__ float res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = __copysignf (0.0, __real__ x);
+ __imag__ res = __copysignf (M_PI_2, __imag__ x);
+ }
+ else if (rcls == FP_INFINITE || rcls == FP_ZERO)
+ {
+ __real__ res = __copysignf (0.0, __real__ x);
+ if (icls >= FP_ZERO)
+ __imag__ res = __copysignf (M_PI_2, __imag__ x);
+ else
+ __imag__ res = __nanf ("");
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ float i2, num, den;
+
+ i2 = __imag__ x * __imag__ x;
+
+ num = 1.0 - __real__ x;
+ num = i2 + num * num;
+
+ den = 1.0 + __real__ x;
+ den = i2 + den * den;
+
+ __real__ res = 0.25 * __ieee754_logf (num / den);
+
+ den = 1 - __real__ x * __real__ x - i2;
+
+ __imag__ res = 0.5 * __atanf ((2.0 * __imag__ x) / den);
+ }
+
+ return res;
+}
+weak_alias (__catanhf, catanhf)
diff --git a/sysdeps/libm-ieee754/s_catanhl.c b/sysdeps/libm-ieee754/s_catanhl.c
new file mode 100644
index 0000000000..d8396a7961
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_catanhl.c
@@ -0,0 +1,80 @@
+/* Return arc hyperbole tangent for long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ long double
+__catanhl (__complex__ long double x)
+{
+ __complex__ long double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = __copysignl (0.0, __real__ x);
+ __imag__ res = __copysignl (M_PI_2, __imag__ x);
+ }
+ else if (rcls == FP_INFINITE || rcls == FP_ZERO)
+ {
+ __real__ res = __copysignl (0.0, __real__ x);
+ if (icls >= FP_ZERO)
+ __imag__ res = __copysignl (M_PI_2, __imag__ x);
+ else
+ __imag__ res = __nanl ("");
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ long double i2, num, den;
+
+ i2 = __imag__ x * __imag__ x;
+
+ num = 1.0 - __real__ x;
+ num = i2 + num * num;
+
+ den = 1.0 + __real__ x;
+ den = i2 + den * den;
+
+ __real__ res = 0.25 * __ieee754_logl (num / den);
+
+ den = 1 - __real__ x * __real__ x - i2;
+
+ __imag__ res = 0.5 * __atanl ((2.0 * __imag__ x) / den);
+ }
+
+ return res;
+}
+weak_alias (__catanhl, catanhl)
diff --git a/sysdeps/libm-ieee754/s_catanl.c b/sysdeps/libm-ieee754/s_catanl.c
new file mode 100644
index 0000000000..2fd8a4fa08
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_catanl.c
@@ -0,0 +1,85 @@
+/* Return arc tangent of complex long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ long double
+__catanl (__complex__ long double x)
+{
+ __complex__ long double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (rcls == FP_INFINITE)
+ {
+ __real__ res = __copysignl (M_PI_2, __real__ x);
+ __imag__ res = __copysignl (0.0, __imag__ x);
+ }
+ else if (icls == FP_INFINITE)
+ {
+ if (rcls >= FP_ZERO)
+ __real__ res = __copysignl (M_PI_2, __real__ x);
+ else
+ __real__ res = __nanl ("");
+ __imag__ res = __copysignl (0.0, __imag__ x);
+ }
+ else if (icls == FP_ZERO || icls == FP_INFINITE)
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __copysignl (0.0, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ res = x;
+ }
+ else
+ {
+ long double r2, num, den;
+
+ r2 = __real__ x * __real__ x;
+
+ den = 1 - r2 - __imag__ x * __imag__ x;
+
+ __real__ res = 0.5 * __atanl ((2.0 * __real__ x) / den);
+
+ num = __imag__ x + 1.0;
+ num = r2 + num * num;
+
+ den = __imag__ x - 1.0;
+ den = r2 + den * den;
+
+ __imag__ res = 0.25 * __ieee754_logl (num / den);
+ }
+
+ return res;
+}
+weak_alias (__catanl, catanl)
diff --git a/sysdeps/libm-ieee754/s_ccos.c b/sysdeps/libm-ieee754/s_ccos.c
new file mode 100644
index 0000000000..8a4b55dd99
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ccos.c
@@ -0,0 +1,64 @@
+/* Return cosine of complex double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ double
+__ccos (__complex__ double x)
+{
+ __complex__ double res;
+
+ if (!isfinite (__real__ x) || __isnan (__imag__ x))
+ {
+ if (__real__ x == 0.0 || __imag__ x == 0.0)
+ {
+ __real__ res = __nan ("");
+ __imag__ res = 0.0;
+ }
+ else if (__isinf (__imag__ x))
+ {
+ __real__ res = HUGE_VAL;
+ __imag__ res = __nan ("");
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else
+ {
+ __complex__ double y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ res = __ccosh (y);
+ }
+
+ return res;
+}
+weak_alias (__ccos, ccos)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__ccos, __ccosl)
+weak_alias (__ccos, ccosl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_ccosf.c b/sysdeps/libm-ieee754/s_ccosf.c
new file mode 100644
index 0000000000..9d1a97239c
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ccosf.c
@@ -0,0 +1,60 @@
+/* Return cosine of complex float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ float
+__ccosf (__complex__ float x)
+{
+ __complex__ float res;
+
+ if (!isfinite (__real__ x) || __isnanf (__imag__ x))
+ {
+ if (__real__ x == 0.0 || __imag__ x == 0.0)
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = 0.0;
+ }
+ else if (__isinff (__imag__ x))
+ {
+ __real__ res = HUGE_VALF;
+ __imag__ res = __nanf ("");
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else
+ {
+ __complex__ float y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ res = __ccoshf (y);
+ }
+
+ return res;
+}
+weak_alias (__ccosf, ccosf)
diff --git a/sysdeps/libm-ieee754/s_ccosh.c b/sysdeps/libm-ieee754/s_ccosh.c
index f01b245e77..b9d7b82f5e 100644
--- a/sysdeps/libm-ieee754/s_ccosh.c
+++ b/sysdeps/libm-ieee754/s_ccosh.c
@@ -21,47 +21,47 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ double
__ccosh (__complex__ double x)
{
__complex__ double retval;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
__real__ x = fabs (__real__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- double exp_val = __exp (__real__ x);
- double rec_exp_val = 1.0 / exp_val;
+ /* Imaginary part is finite. */
+ double cosh_val = __ieee754_cosh (__real__ x);
- __real__ retval = 0.5 * (exp_val + rec_exp_val) * __cos (__imag__ x);
- __imag__ retval = 0.5 * (exp_val + rec_exp_val) * __sin (__imag__ x);
+ __real__ retval = cosh_val * __cos (__imag__ x);
+ __imag__ retval = cosh_val * __sin (__imag__ x);
}
else
{
- if (__real__ x == 0)
- {
- __imag__ retval = 0.0;
- __real__ retval = __nan ("") + __nan ("");
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("") + __nan ("");
- }
+ __imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
+ __real__ retval = __nan ("") + __nan ("");
}
}
- else if (__isinf (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (__imag__ x == 0.0)
+ /* Real part is infinite. */
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = HUGE_VAL;
__imag__ retval = __imag__ x;
}
- else if (isfinite (__imag__ x))
+ else if (icls > FP_ZERO)
{
+ /* Imaginary part is finite. */
__real__ retval = __copysign (HUGE_VAL, __cos (__imag__ x));
__imag__ retval = __copysign (HUGE_VAL, __sin (__imag__ x));
}
@@ -74,16 +74,8 @@ __ccosh (__complex__ double x)
}
else
{
- if (__imag__ x == 0.0)
- {
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
- }
+ __real__ retval = __nan ("");
+ __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nan ("");
}
return retval;
diff --git a/sysdeps/libm-ieee754/s_ccoshf.c b/sysdeps/libm-ieee754/s_ccoshf.c
index 9f2774b6c7..758ec5b579 100644
--- a/sysdeps/libm-ieee754/s_ccoshf.c
+++ b/sysdeps/libm-ieee754/s_ccoshf.c
@@ -21,49 +21,47 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ float
__ccoshf (__complex__ float x)
{
__complex__ float retval;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
__real__ x = fabsf (__real__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- float exp_val = __expf (__real__ x);
- float rec_exp_val = 1.0 / exp_val;
+ /* Imaginary part is finite. */
+ float cosh_val = __ieee754_coshf (__real__ x);
- __real__ retval = (0.5 * (exp_val + rec_exp_val)
- * __cosf (__imag__ x));
- __imag__ retval = (0.5 * (exp_val + rec_exp_val)
- * __sinf (__imag__ x));
+ __real__ retval = cosh_val * __cosf (__imag__ x);
+ __imag__ retval = cosh_val * __sinf (__imag__ x);
}
else
{
- if (__real__ x == 0)
- {
- __imag__ retval = 0.0;
- __real__ retval = __nanf ("") + __nanf ("");
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("") + __nanf ("");
- }
+ __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
+ __real__ retval = __nanf ("") + __nanf ("");
}
}
- else if (__isinff (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (__imag__ x == 0.0)
+ /* Real part is infinite. */
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = HUGE_VALF;
__imag__ retval = __imag__ x;
}
- else if (isfinite (__imag__ x))
+ else if (icls > FP_ZERO)
{
+ /* Imaginary part is finite. */
__real__ retval = __copysignf (HUGE_VALF, __cosf (__imag__ x));
__imag__ retval = __copysignf (HUGE_VALF, __sinf (__imag__ x));
}
@@ -76,16 +74,8 @@ __ccoshf (__complex__ float x)
}
else
{
- if (__imag__ x == 0.0)
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
- }
+ __real__ retval = __nanf ("");
+ __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanf ("");
}
return retval;
diff --git a/sysdeps/libm-ieee754/s_ccoshl.c b/sysdeps/libm-ieee754/s_ccoshl.c
index fd553418b4..5e8c399fb2 100644
--- a/sysdeps/libm-ieee754/s_ccoshl.c
+++ b/sysdeps/libm-ieee754/s_ccoshl.c
@@ -21,49 +21,47 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ long double
__ccoshl (__complex__ long double x)
{
__complex__ long double retval;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
__real__ x = fabsl (__real__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- long double exp_val = __expl (__real__ x);
- long double rec_exp_val = 1.0 / exp_val;
+ /* Imaginary part is finite. */
+ long double cosh_val = __ieee754_coshl (__real__ x);
- __real__ retval = (0.5 * (exp_val + rec_exp_val)
- * __cosl (__imag__ x));
- __imag__ retval = (0.5 * (exp_val + rec_exp_val)
- * __sinl (__imag__ x));
+ __real__ retval = cosh_val * __cosl (__imag__ x);
+ __imag__ retval = cosh_val * __sinl (__imag__ x);
}
else
{
- if (__real__ x == 0)
- {
- __imag__ retval = 0.0;
- __real__ retval = __nanl ("") + __nanl ("");
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("") + __nanl ("");
- }
+ __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
+ __real__ retval = __nanl ("") + __nanl ("");
}
}
- else if (__isinfl (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (__imag__ x == 0.0)
+ /* Real part is infinite. */
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = HUGE_VALL;
__imag__ retval = __imag__ x;
}
- else if (isfinite (__imag__ x))
+ else if (icls > FP_ZERO)
{
+ /* Imaginary part is finite. */
__real__ retval = __copysignl (HUGE_VALL, __cosl (__imag__ x));
__imag__ retval = __copysignl (HUGE_VALL, __sinl (__imag__ x));
}
@@ -76,16 +74,8 @@ __ccoshl (__complex__ long double x)
}
else
{
- if (__imag__ x == 0.0)
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
- }
+ __real__ retval = __nanl ("");
+ __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanl ("");
}
return retval;
diff --git a/sysdeps/libm-ieee754/s_ccosl.c b/sysdeps/libm-ieee754/s_ccosl.c
new file mode 100644
index 0000000000..a41d48b970
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ccosl.c
@@ -0,0 +1,60 @@
+/* Return cosine of complex long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ long double
+__ccosl (__complex__ long double x)
+{
+ __complex__ long double res;
+
+ if (!isfinite (__real__ x) || __isnanl (__imag__ x))
+ {
+ if (__real__ x == 0.0 || __imag__ x == 0.0)
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = 0.0;
+ }
+ else if (__isinfl (__imag__ x))
+ {
+ __real__ res = HUGE_VALL;
+ __imag__ res = __nanl ("");
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else
+ {
+ __complex__ long double y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ res = __ccoshl (y);
+ }
+
+ return res;
+}
+weak_alias (__ccosl, ccosl)
diff --git a/sysdeps/libm-ieee754/s_ceill.c b/sysdeps/libm-ieee754/s_ceill.c
index c5c86487ea..773be32995 100644
--- a/sysdeps/libm-ieee754/s_ceill.c
+++ b/sysdeps/libm-ieee754/s_ceill.c
@@ -48,34 +48,34 @@ static long double huge = 1.0e4930;
GET_LDOUBLE_WORDS(se,i0,i1,x);
sx = (se>>15)&1;
j0 = (se&0x7fff)-0x3fff;
- if(j0<32) {
+ if(j0<31) {
if(j0<0) { /* raise inexact if x != 0 */
if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
if(sx) {es=0x8000;i0=0;i1=0;}
else if((i0|i1)!=0) { es=0x3fff;i0=0;i1=0;}
}
} else {
- i = (0xffffffff)>>j0;
+ i = (0x7fffffff)>>j0;
if(((i0&i)|i1)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(sx==0) {
- if (j0>0) i0 += (0x80000000)>>(j0-1);
+ if (j0>0) i0 += (0x80000000)>>j0;
else ++se;
}
i0 &= (~i); i1=0;
}
}
- } else if (j0>63) {
+ } else if (j0>62) {
if(j0==0x4000) return x+x; /* inf or NaN */
else return x; /* x is integral */
} else {
- i = ((u_int32_t)(0xffffffff))>>(j0-32);
+ i = ((u_int32_t)(0xffffffff))>>(j0-31);
if((i1&i)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(sx==0) {
- if(j0==32) i0+=1;
+ if(j0==31) i0+=1;
else {
- j = i1 + (1<<(64-j0));
+ j = i1 + (1<<(63-j0));
if(j<i1) i0+=1; /* got a carry */
i1 = j;
}
diff --git a/sysdeps/libm-ieee754/s_cexpf.c b/sysdeps/libm-ieee754/s_cexpf.c
index c5d8f0cc07..0d4372103b 100644
--- a/sysdeps/libm-ieee754/s_cexpf.c
+++ b/sysdeps/libm-ieee754/s_cexpf.c
@@ -21,17 +21,23 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ float
__cexpf (__complex__ float x)
{
__complex__ float retval;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- float exp_val = __expf (__real__ x);
+ /* Imaginary part is finite. */
+ float exp_val = __ieee754_expf (__real__ x);
if (isfinite (exp_val))
{
@@ -52,14 +58,17 @@ __cexpf (__complex__ float x)
__imag__ retval = __nanf ("");
}
}
- else if (__isinff (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (isfinite (__imag__ x))
+ /* Real part is infinite. */
+ if (icls >= FP_ZERO)
{
+ /* Imaginary part is finite. */
float value = signbit (__real__ x) ? 0.0 : HUGE_VALF;
- if (__imag__ x == 0.0)
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = value;
__imag__ retval = __imag__ x;
}
@@ -82,7 +91,7 @@ __cexpf (__complex__ float x)
}
else
{
- /* 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 ("");
__imag__ retval = __nanf ("");
}
diff --git a/sysdeps/libm-ieee754/s_cexpl.c b/sysdeps/libm-ieee754/s_cexpl.c
index f1cdf43ec8..ac27e1eeb8 100644
--- a/sysdeps/libm-ieee754/s_cexpl.c
+++ b/sysdeps/libm-ieee754/s_cexpl.c
@@ -1,4 +1,4 @@
-/* Return value of complex exponential function for float complex value.
+/* Return value of complex exponential function for long double complex value.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,17 +21,23 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ long double
__cexpl (__complex__ long double x)
{
__complex__ long double retval;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- long double exp_val = __expl (__real__ x);
+ /* Imaginary part is finite. */
+ long double exp_val = __ieee754_expl (__real__ x);
if (isfinite (exp_val))
{
@@ -52,14 +58,17 @@ __cexpl (__complex__ long double x)
__imag__ retval = __nanl ("");
}
}
- else if (__isinfl (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (isfinite (__imag__ x))
+ /* Real part is infinite. */
+ if (icls >= FP_ZERO)
{
+ /* Imaginary part is finite. */
long double value = signbit (__real__ x) ? 0.0 : HUGE_VALL;
- if (__imag__ x == 0.0)
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = value;
__imag__ retval = __imag__ x;
}
@@ -89,4 +98,4 @@ __cexpl (__complex__ long double x)
return retval;
}
-weak_alias (__cexp, cexp)
+weak_alias (__cexpl, cexpl)
diff --git a/sysdeps/libm-ieee754/s_clog.c b/sysdeps/libm-ieee754/s_clog.c
index f00753b3bb..c14a734759 100644
--- a/sysdeps/libm-ieee754/s_clog.c
+++ b/sysdeps/libm-ieee754/s_clog.c
@@ -28,17 +28,20 @@ __complex__ double
__clog (__complex__ double x)
{
__complex__ double result;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
- if (__real__ x == 0.0 && __imag__ x == 0.0)
+ if (rcls == FP_ZERO && icls == FP_ZERO)
{
+ /* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- if (signbit (__imag__ x))
- __imag__ result = __copysign (__imag__ result, -1.0);
+ __imag__ result = __copysign (__imag__ result, __imag__ x);
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabs (__real__ x);
}
- else if (!__isnan (__real__ x) && !__isnan (__imag__ x))
+ else if (rcls != FP_NAN && icls != FP_NAN)
{
+ /* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_log (__ieee754_hypot (__real__ x,
__imag__ x));
__imag__ result = __ieee754_atan2 (__imag__ x, __real__ x);
@@ -46,7 +49,8 @@ __clog (__complex__ double x)
else
{
__imag__ result = __nan ("");
- if (__isinf (__real__ x) || __isinf (__imag__ x))
+ if (rcls == FP_INFINITE || icls == FP_INFINITE)
+ /* Real or imaginary part is infinite. */
__real__ result = HUGE_VAL;
else
__real__ result = __nan ("");
diff --git a/sysdeps/libm-ieee754/s_clogf.c b/sysdeps/libm-ieee754/s_clogf.c
index 4eafc82bf0..9c9aa83e33 100644
--- a/sysdeps/libm-ieee754/s_clogf.c
+++ b/sysdeps/libm-ieee754/s_clogf.c
@@ -28,17 +28,20 @@ __complex__ float
__clogf (__complex__ float x)
{
__complex__ float result;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
- if (__real__ x == 0.0 && __imag__ x == 0.0)
+ if (rcls == FP_ZERO && icls == FP_ZERO)
{
+ /* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- if (signbit (__imag__ x))
- __imag__ result = __copysignf (__imag__ result, -1.0);
+ __imag__ result = __copysignf (__imag__ result, __imag__ x);
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabsf (__real__ x);
}
- else if (!__isnanf (__real__ x) && !__isnanf (__imag__ x))
+ else if (rcls != FP_NAN && icls != FP_NAN)
{
+ /* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_logf (__ieee754_hypotf (__real__ x,
__imag__ x));
__imag__ result = __ieee754_atan2f (__imag__ x, __real__ x);
@@ -46,7 +49,8 @@ __clogf (__complex__ float x)
else
{
__imag__ result = __nanf ("");
- if (__isinff (__real__ x) || __isinff (__imag__ x))
+ if (rcls == FP_INFINITE || icls == FP_INFINITE)
+ /* Real or imaginary part is infinite. */
__real__ result = HUGE_VALF;
else
__real__ result = __nanf ("");
diff --git a/sysdeps/libm-ieee754/s_clogl.c b/sysdeps/libm-ieee754/s_clogl.c
index a299a95c03..51bee372a6 100644
--- a/sysdeps/libm-ieee754/s_clogl.c
+++ b/sysdeps/libm-ieee754/s_clogl.c
@@ -28,17 +28,20 @@ __complex__ long double
__clogl (__complex__ long double x)
{
__complex__ long double result;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
- if (__real__ x == 0.0 && __imag__ x == 0.0)
+ if (rcls == FP_ZERO && icls == FP_ZERO)
{
+ /* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- if (signbit (__imag__ x))
- __imag__ result = __copysignl (__imag__ result, -1.0);
+ __imag__ result = __copysignl (__imag__ result, __imag__ x);
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabsl (__real__ x);
}
- else if (!__isnanl (__real__ x) && !__isnanl (__imag__ x))
+ else if (rcls != FP_NAN && icls != FP_NAN)
{
+ /* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_logl (__ieee754_hypotl (__real__ x,
__imag__ x));
__imag__ result = __ieee754_atan2l (__imag__ x, __real__ x);
@@ -46,7 +49,8 @@ __clogl (__complex__ long double x)
else
{
__imag__ result = __nanl ("");
- if (__isinfl (__real__ x) || __isinfl (__imag__ x))
+ if (rcls == FP_INFINITE || icls == FP_INFINITE)
+ /* Real or imaginary part is infinite. */
__real__ result = HUGE_VALL;
else
__real__ result = __nanl ("");
diff --git a/sysdeps/libm-ieee754/s_cpow.c b/sysdeps/libm-ieee754/s_cpow.c
new file mode 100644
index 0000000000..074b38bd2d
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cpow.c
@@ -0,0 +1,34 @@
+/* Complex power of double values.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ double
+__cpow (__complex__ double x, __complex__ double c)
+{
+ return __cexp (c * __clog (x));
+}
+weak_alias (__cpow, cpow)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__cpow, __cpowl)
+weak_alias (__cpow, cpowl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_cpowf.c b/sysdeps/libm-ieee754/s_cpowf.c
new file mode 100644
index 0000000000..fa4541ca2b
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cpowf.c
@@ -0,0 +1,30 @@
+/* Complex power of float values.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ float
+__cpowf (__complex__ float x, __complex__ float c)
+{
+ return __cexpf (c * __clogf (x));
+}
+weak_alias (__cpowf, cpowf)
diff --git a/sysdeps/libm-ieee754/s_cpowl.c b/sysdeps/libm-ieee754/s_cpowl.c
new file mode 100644
index 0000000000..69097d5dcc
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_cpowl.c
@@ -0,0 +1,30 @@
+/* Complex power of long double values.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ long double
+__cpowl (__complex__ long double x, __complex__ long double c)
+{
+ return __cexpl (c * __clogl (x));
+}
+weak_alias (__cpowl, cpowl)
diff --git a/sysdeps/libm-ieee754/s_csin.c b/sysdeps/libm-ieee754/s_csin.c
new file mode 100644
index 0000000000..4639bcaaa6
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_csin.c
@@ -0,0 +1,67 @@
+/* Complex sine function for double.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ double
+__csin (__complex__ double x)
+{
+ __complex__ double res;
+
+ if (!isfinite (__real__ x) || isnan (__imag__ x))
+ {
+ if (__real__ x == 0.0 || __imag__ x == 0.0)
+ {
+ __real__ res = __nan ("");
+ __imag__ res = 0.0;
+ }
+ else if (__isinf (__imag__ x))
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __imag__ x;
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else
+ {
+ __complex__ double y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = __csinh (y);
+
+ __real__ res = __imag__ y;
+ __imag__ res = -__real__ y;
+ }
+
+ return res;
+}
+weak_alias (__csin, csin)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__csin, __csinl)
+weak_alias (__csin, csinl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_csinf.c b/sysdeps/libm-ieee754/s_csinf.c
new file mode 100644
index 0000000000..f7f10e6b6f
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_csinf.c
@@ -0,0 +1,63 @@
+/* Complex sine function for float.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ float
+__csinf (__complex__ float x)
+{
+ __complex__ float res;
+
+ if (!isfinite (__real__ x) || isnan (__imag__ x))
+ {
+ if (__real__ x == 0.0 || __imag__ x == 0.0)
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = 0.0;
+ }
+ else if (__isinff (__imag__ x))
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __imag__ x;
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else
+ {
+ __complex__ float y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = __csinhf (y);
+
+ __real__ res = __imag__ y;
+ __imag__ res = -__real__ y;
+ }
+
+ return res;
+}
+weak_alias (__csinf, csinf)
diff --git a/sysdeps/libm-ieee754/s_csinh.c b/sysdeps/libm-ieee754/s_csinh.c
index aab041bdf9..05cec85e7c 100644
--- a/sysdeps/libm-ieee754/s_csinh.c
+++ b/sysdeps/libm-ieee754/s_csinh.c
@@ -21,32 +21,38 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ double
__csinh (__complex__ double x)
{
__complex__ double retval;
int negate = signbit (__real__ x);
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
__real__ x = fabs (__real__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- double exp_val = __exp (__real__ x);
- double rec_exp_val = 1.0 / exp_val;
+ /* Imaginary part is finite. */
+ double sinh_val = __ieee754_sinh (__real__ x);
- __real__ retval = 0.5 * (exp_val - rec_exp_val) * __cos (__imag__ x);
- __imag__ retval = 0.5 * (exp_val - rec_exp_val) * __sin (__imag__ x);
+ __real__ retval = sinh_val * __cos (__imag__ x);
+ __imag__ retval = sinh_val * __sin (__imag__ x);
if (negate)
__real__ retval = -__real__ retval;
}
else
{
- if (__real__ x == 0)
+ if (rcls == FP_ZERO)
{
+ /* Real part is 0.0. */
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nan ("") + __nan ("");
}
@@ -57,15 +63,18 @@ __csinh (__complex__ double x)
}
}
}
- else if (__isinf (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (__imag__ x == 0.0)
+ /* Real part is infinite. */
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
__imag__ retval = __imag__ x;
}
- else if (isfinite (__imag__ x))
+ else if (icls > FP_ZERO)
{
+ /* Imaginary part is finite. */
__real__ retval = __copysign (HUGE_VAL, __cos (__imag__ x));
__imag__ retval = __copysign (HUGE_VAL, __sin (__imag__ x));
@@ -81,16 +90,8 @@ __csinh (__complex__ double x)
}
else
{
- if (__imag__ x == 0.0)
- {
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
- }
+ __real__ retval = __nan ("");
+ __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nan ("");
}
return retval;
diff --git a/sysdeps/libm-ieee754/s_csinhf.c b/sysdeps/libm-ieee754/s_csinhf.c
index 204bbfebb9..93f83cf7b6 100644
--- a/sysdeps/libm-ieee754/s_csinhf.c
+++ b/sysdeps/libm-ieee754/s_csinhf.c
@@ -21,34 +21,38 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ float
__csinhf (__complex__ float x)
{
__complex__ float retval;
int negate = signbit (__real__ x);
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
__real__ x = fabsf (__real__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- float exp_val = __expf (__real__ x);
- float rec_exp_val = 1.0 / exp_val;
+ /* Imaginary part is finite. */
+ float sinh_val = __ieee754_sinhf (__real__ x);
- __real__ retval = (0.5 * (exp_val - rec_exp_val)
- * __cosf (__imag__ x));
- __imag__ retval = (0.5 * (exp_val - rec_exp_val)
- * __sinf (__imag__ x));
+ __real__ retval = sinh_val * __cosf (__imag__ x);
+ __imag__ retval = sinh_val * __sinf (__imag__ x);
if (negate)
__real__ retval = -__real__ retval;
}
else
{
- if (__real__ x == 0)
+ if (rcls == FP_ZERO)
{
+ /* Real part is 0.0. */
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanf ("") + __nanf ("");
}
@@ -59,15 +63,18 @@ __csinhf (__complex__ float x)
}
}
}
- else if (__isinff (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (__imag__ x == 0.0)
+ /* Real part is infinite. */
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
__imag__ retval = __imag__ x;
}
- else if (isfinite (__imag__ x))
+ else if (icls > FP_ZERO)
{
+ /* Imaginary part is finite. */
__real__ retval = __copysignf (HUGE_VALF, __cosf (__imag__ x));
__imag__ retval = __copysignf (HUGE_VALF, __sinf (__imag__ x));
@@ -83,16 +90,8 @@ __csinhf (__complex__ float x)
}
else
{
- if (__imag__ x == 0.0)
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
- }
+ __real__ retval = __nanf ("");
+ __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanf ("");
}
return retval;
diff --git a/sysdeps/libm-ieee754/s_csinhl.c b/sysdeps/libm-ieee754/s_csinhl.c
index e403dd4796..8388a40b46 100644
--- a/sysdeps/libm-ieee754/s_csinhl.c
+++ b/sysdeps/libm-ieee754/s_csinhl.c
@@ -21,34 +21,38 @@
#include <complex.h>
#include <math.h>
+#include "math_private.h"
+
__complex__ long double
__csinhl (__complex__ long double x)
{
__complex__ long double retval;
int negate = signbit (__real__ x);
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
- __real__ x = fabs (__real__ x);
+ __real__ x = fabsl (__real__ x);
- if (isfinite (__real__ x))
+ if (rcls >= FP_ZERO)
{
- if (isfinite (__imag__ x))
+ /* Real part is finite. */
+ if (icls >= FP_ZERO)
{
- long double exp_val = __expl (__real__ x);
- long double rec_exp_val = 1.0 / exp_val;
+ /* Imaginary part is finite. */
+ long double sinh_val = __ieee754_sinhl (__real__ x);
- __real__ retval = (0.5 * (exp_val - rec_exp_val)
- * __cosl (__imag__ x));
- __imag__ retval = (0.5 * (exp_val - rec_exp_val)
- * __sinl (__imag__ x));
+ __real__ retval = sinh_val * __cosl (__imag__ x);
+ __imag__ retval = sinh_val * __sinl (__imag__ x);
if (negate)
__real__ retval = -__real__ retval;
}
else
{
- if (__real__ x == 0)
+ if (rcls == FP_ZERO)
{
+ /* Real part is 0.0. */
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanl ("") + __nanl ("");
}
@@ -59,15 +63,18 @@ __csinhl (__complex__ long double x)
}
}
}
- else if (__isinfl (__real__ x))
+ else if (rcls == FP_INFINITE)
{
- if (__imag__ x == 0.0)
+ /* Real part is infinite. */
+ if (icls == FP_ZERO)
{
+ /* Imaginary part is 0.0. */
__real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
__imag__ retval = __imag__ x;
}
- else if (isfinite (__imag__ x))
+ else if (icls > FP_ZERO)
{
+ /* Imaginary part is finite. */
__real__ retval = __copysignl (HUGE_VALL, __cosl (__imag__ x));
__imag__ retval = __copysignl (HUGE_VALL, __sinl (__imag__ x));
@@ -83,16 +90,8 @@ __csinhl (__complex__ long double x)
}
else
{
- if (__imag__ x == 0.0)
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
- }
+ __real__ retval = __nanl ("");
+ __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanl ("");
}
return retval;
diff --git a/sysdeps/libm-ieee754/s_csinl.c b/sysdeps/libm-ieee754/s_csinl.c
new file mode 100644
index 0000000000..513c144198
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_csinl.c
@@ -0,0 +1,63 @@
+/* Complex sine function for long double.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+
+__complex__ long double
+__csinl (__complex__ long double x)
+{
+ __complex__ long double res;
+
+ if (!isfinite (__real__ x) || isnan (__imag__ x))
+ {
+ if (__real__ x == 0.0 || __imag__ x == 0.0)
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = 0.0;
+ }
+ else if (__isinfl (__imag__ x))
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __imag__ x;
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else
+ {
+ __complex__ long double y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = __csinhl (y);
+
+ __real__ res = __imag__ y;
+ __imag__ res = -__real__ y;
+ }
+
+ return res;
+}
+weak_alias (__csinl, csinl)
diff --git a/sysdeps/libm-ieee754/s_csqrt.c b/sysdeps/libm-ieee754/s_csqrt.c
new file mode 100644
index 0000000000..c5c609bd8c
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_csqrt.c
@@ -0,0 +1,111 @@
+/* Complex square root of double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ double
+__csqrt (__complex__ double x)
+{
+ __complex__ double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VAL;
+ __imag__ res = __imag__ x;
+ }
+ else if (rcls == FP_INFINITE)
+ {
+ if (__real__ x < 0.0)
+ {
+ __real__ res = icls == FP_NAN ? __nan ("") : 0;
+ __imag__ res = __copysign (HUGE_VAL, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __real__ x;
+ __imag__ res = (icls == FP_NAN
+ ? __nan ("") : __copysign (0.0, __imag__ x));
+ }
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else
+ {
+ if (icls == FP_ZERO)
+ {
+ if (__real__ x < 0.0)
+ {
+ __real__ res = 0.0;
+ __imag__ res = __copysign (__ieee754_sqrt (-__real__ x),
+ __imag__ x);
+ }
+ else
+ {
+ __real__ res = fabs (__ieee754_sqrt (__real__ x));
+ __imag__ res = __copysign (0.0, __imag__ x);
+ }
+ }
+ else if (rcls == FP_ZERO)
+ {
+ double r = __ieee754_sqrt (0.5 * fabs (__imag__ x));
+
+ __real__ res = __copysign (r, __imag__ x);
+ __imag__ res = r;
+ }
+ else
+ {
+ __complex__ double q;
+ double t, r;
+
+ if (fabs (__imag__ x) < 2.0e-4 * fabs (__real__ x))
+ t = 0.25 * __imag__ x * (__imag__ x / __real__ x);
+ else
+ t = 0.5 * (__ieee754_hypot (__real__ x, __imag__ x) - __real__ x);
+
+ r = __ieee754_sqrt (t);
+
+ __real__ q = __imag__ x / (2.0 * r);
+ __imag__ q = r;
+
+ /* Heron iteration in complex arithmetic. */
+ res = 0.5 * (q + q / x);
+ }
+ }
+
+ return res;
+}
+weak_alias (__csqrt, csqrt)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__csqrt, __csqrtl)
+weak_alias (__csqrt, csqrtl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_csqrtf.c b/sysdeps/libm-ieee754/s_csqrtf.c
new file mode 100644
index 0000000000..2289045cfd
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_csqrtf.c
@@ -0,0 +1,107 @@
+/* Complex square root of float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ float
+__csqrtf (__complex__ float x)
+{
+ __complex__ float res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VALF;
+ __imag__ res = __imag__ x;
+ }
+ else if (rcls == FP_INFINITE)
+ {
+ if (__real__ x < 0.0)
+ {
+ __real__ res = icls == FP_NAN ? __nanf ("") : 0;
+ __imag__ res = __copysignf (HUGE_VALF, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __real__ x;
+ __imag__ res = (icls == FP_NAN
+ ? __nanf ("") : __copysignf (0.0, __imag__ x));
+ }
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else
+ {
+ if (icls == FP_ZERO)
+ {
+ if (__real__ x < 0.0)
+ {
+ __real__ res = 0.0;
+ __imag__ res = __copysignf (__ieee754_sqrtf (-__real__ x),
+ __imag__ x);
+ }
+ else
+ {
+ __real__ res = fabsf (__ieee754_sqrtf (__real__ x));
+ __imag__ res = __copysignf (0.0, __imag__ x);
+ }
+ }
+ else if (rcls == FP_ZERO)
+ {
+ float r = __ieee754_sqrtf (0.5 * fabsf (__imag__ x));
+
+ __real__ res = __copysignf (r, __imag__ x);
+ __imag__ res = r;
+ }
+ else
+ {
+ __complex__ float q;
+ float t, r;
+
+ if (fabsf (__imag__ x) < 2.0e-4 * fabsf (__real__ x))
+ t = 0.25 * __imag__ x * (__imag__ x / __real__ x);
+ else
+ t = 0.5 * (__ieee754_hypotf (__real__ x, __imag__ x) - __real__ x);
+
+ r = __ieee754_sqrtf (t);
+
+ __real__ q = __imag__ x / (2.0 * r);
+ __imag__ q = r;
+
+ /* Heron iteration in complex arithmetic. */
+ res = 0.5 * (q + q / x);
+ }
+ }
+
+ return res;
+}
+weak_alias (__csqrtf, csqrtf)
diff --git a/sysdeps/libm-ieee754/s_csqrtl.c b/sysdeps/libm-ieee754/s_csqrtl.c
new file mode 100644
index 0000000000..3de7310c73
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_csqrtl.c
@@ -0,0 +1,107 @@
+/* Complex square root of long double value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ long double
+__csqrtl (__complex__ long double x)
+{
+ __complex__ long double res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = HUGE_VALL;
+ __imag__ res = __imag__ x;
+ }
+ else if (rcls == FP_INFINITE)
+ {
+ if (__real__ x < 0.0)
+ {
+ __real__ res = icls == FP_NAN ? __nanl ("") : 0;
+ __imag__ res = __copysignl (HUGE_VALL, __imag__ x);
+ }
+ else
+ {
+ __real__ res = __real__ x;
+ __imag__ res = (icls == FP_NAN
+ ? __nanl ("") : __copysignl (0.0, __imag__ x));
+ }
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else
+ {
+ if (icls == FP_ZERO)
+ {
+ if (__real__ x < 0.0)
+ {
+ __real__ res = 0.0;
+ __imag__ res = __copysignl (__ieee754_sqrtl (-__real__ x),
+ __imag__ x);
+ }
+ else
+ {
+ __real__ res = fabsl (__ieee754_sqrtl (__real__ x));
+ __imag__ res = __copysignl (0.0, __imag__ x);
+ }
+ }
+ else if (rcls == FP_ZERO)
+ {
+ long double r = __ieee754_sqrtl (0.5 * fabsl (__imag__ x));
+
+ __real__ res = __copysignl (r, __imag__ x);
+ __imag__ res = r;
+ }
+ else
+ {
+ __complex__ long double q;
+ long double t, r;
+
+ if (fabsl (__imag__ x) < 2.0e-4 * fabsl (__real__ x))
+ t = 0.25 * __imag__ x * (__imag__ x / __real__ x);
+ else
+ t = 0.5 * (__ieee754_hypotl (__real__ x, __imag__ x) - __real__ x);
+
+ r = __ieee754_sqrtl (t);
+
+ __real__ q = __imag__ x / (2.0 * r);
+ __imag__ q = r;
+
+ /* Heron iteration in complex arithmetic. */
+ res = 0.5 * (q + q / x);
+ }
+ }
+
+ return res;
+}
+weak_alias (__csqrtl, csqrtl)
diff --git a/sysdeps/libm-ieee754/s_ctan.c b/sysdeps/libm-ieee754/s_ctan.c
new file mode 100644
index 0000000000..f448395c7e
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ctan.c
@@ -0,0 +1,64 @@
+/* Complex tangent function for double.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ double
+__ctan (__complex__ double x)
+{
+ __complex__ double res;
+
+ if (!finite (__real__ x) || !finite (__imag__ x))
+ {
+ if (__isinf (__imag__ x))
+ {
+ __real__ res = __copysign (0.0, __real__ x);
+ __imag__ res = __copysign (1.0, __imag__ x);
+ }
+ else if (__real__ x == 0.0)
+ {
+ res = x;
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else
+ {
+ double den = (__cos (2.0 * __real__ x)
+ + __ieee754_cosh (2.0 * __imag__ x));
+
+ __real__ res = __sin (2.0 * __real__ x) / den;
+ __imag__ res = __ieee754_sinh (2.0 * __imag__ x) / den;
+ }
+
+ return res;
+}
+weak_alias (__ctan, ctan)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__ctan, __ctanl)
+weak_alias (__ctan, ctanl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_ctanf.c b/sysdeps/libm-ieee754/s_ctanf.c
new file mode 100644
index 0000000000..99011fa41d
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ctanf.c
@@ -0,0 +1,60 @@
+/* Complex tangent function for float.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ float
+__ctanf (__complex__ float x)
+{
+ __complex__ float res;
+
+ if (!finite (__real__ x) || !finite (__imag__ x))
+ {
+ if (__isinff (__imag__ x))
+ {
+ __real__ res = __copysignf (0.0, __real__ x);
+ __imag__ res = __copysignf (1.0, __imag__ x);
+ }
+ else if (__real__ x == 0.0)
+ {
+ res = x;
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else
+ {
+ float den = (__cosf (2.0 * __real__ x)
+ + __ieee754_coshf (2.0 * __imag__ x));
+
+ __real__ res = __sinf (2.0 * __real__ x) / den;
+ __imag__ res = __ieee754_sinhf (2.0 * __imag__ x) / den;
+ }
+
+ return res;
+}
+weak_alias (__ctanf, ctanf)
diff --git a/sysdeps/libm-ieee754/s_ctanh.c b/sysdeps/libm-ieee754/s_ctanh.c
new file mode 100644
index 0000000000..7c9b3197ef
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ctanh.c
@@ -0,0 +1,64 @@
+/* Complex hyperbole tangent for double.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ double
+__ctanh (__complex__ double x)
+{
+ __complex__ double res;
+
+ if (!finite (__real__ x) || !finite (__imag__ x))
+ {
+ if (__isinf (__real__ x))
+ {
+ __real__ res = __copysign (1.0, __real__ x);
+ __imag__ res = __copysign (0.0, __imag__ x);
+ }
+ else if (__imag__ x == 0.0)
+ {
+ res = x;
+ }
+ else
+ {
+ __real__ res = __nan ("");
+ __imag__ res = __nan ("");
+ }
+ }
+ else
+ {
+ double den = (__ieee754_cosh (2.0 * __real__ x)
+ + __cos (2.0 * __imag__ x));
+
+ __real__ res = __ieee754_sinh (2.0 * __real__ x) / den;
+ __imag__ res = __sin (2.0 * __imag__ x) / den;
+ }
+
+ return res;
+}
+weak_alias (__ctanh, ctanh)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__ctanh, __ctanhl)
+weak_alias (__ctanh, ctanhl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_ctanhf.c b/sysdeps/libm-ieee754/s_ctanhf.c
new file mode 100644
index 0000000000..1bdbc0fdc5
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ctanhf.c
@@ -0,0 +1,60 @@
+/* Complex hyperbole tangent for float.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ float
+__ctanhf (__complex__ float x)
+{
+ __complex__ float res;
+
+ if (!finite (__real__ x) || !finite (__imag__ x))
+ {
+ if (__isinff (__real__ x))
+ {
+ __real__ res = __copysignf (1.0, __real__ x);
+ __imag__ res = __copysignf (0.0, __imag__ x);
+ }
+ else if (__imag__ x == 0.0)
+ {
+ res = x;
+ }
+ else
+ {
+ __real__ res = __nanf ("");
+ __imag__ res = __nanf ("");
+ }
+ }
+ else
+ {
+ float den = (__ieee754_coshf (2.0 * __real__ x)
+ + __cosf (2.0 * __imag__ x));
+
+ __real__ res = __ieee754_sinhf (2.0 * __real__ x) / den;
+ __imag__ res = __sinf (2.0 * __imag__ x) / den;
+ }
+
+ return res;
+}
+weak_alias (__ctanhf, ctanhf)
diff --git a/sysdeps/libm-ieee754/s_ctanhl.c b/sysdeps/libm-ieee754/s_ctanhl.c
new file mode 100644
index 0000000000..b34aeb77dd
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ctanhl.c
@@ -0,0 +1,60 @@
+/* Complex hyperbole tangent for long double.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ long double
+__ctanhl (__complex__ long double x)
+{
+ __complex__ long double res;
+
+ if (!finite (__real__ x) || !finite (__imag__ x))
+ {
+ if (__isinfl (__real__ x))
+ {
+ __real__ res = __copysignl (1.0, __real__ x);
+ __imag__ res = __copysignl (0.0, __imag__ x);
+ }
+ else if (__imag__ x == 0.0)
+ {
+ res = x;
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else
+ {
+ long double den = (__ieee754_coshl (2.0 * __real__ x)
+ + __cosl (2.0 * __imag__ x));
+
+ __real__ res = __ieee754_sinhl (2.0 * __real__ x) / den;
+ __imag__ res = __sinl (2.0 * __imag__ x) / den;
+ }
+
+ return res;
+}
+weak_alias (__ctanhl, ctanhl)
diff --git a/sysdeps/libm-ieee754/s_ctanl.c b/sysdeps/libm-ieee754/s_ctanl.c
new file mode 100644
index 0000000000..82f86fc148
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_ctanl.c
@@ -0,0 +1,60 @@
+/* Complex tangent function for long double.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <complex.h>
+#include <math.h>
+
+#include "math_private.h"
+
+
+__complex__ long double
+__ctanl (__complex__ long double x)
+{
+ __complex__ double res;
+
+ if (!finite (__real__ x) || !finite (__imag__ x))
+ {
+ if (__isinfl (__imag__ x))
+ {
+ __real__ res = __copysignl (0.0, __real__ x);
+ __imag__ res = __copysignl (1.0, __imag__ x);
+ }
+ else if (__real__ x == 0.0)
+ {
+ res = x;
+ }
+ else
+ {
+ __real__ res = __nanl ("");
+ __imag__ res = __nanl ("");
+ }
+ }
+ else
+ {
+ long double den = (__cosl (2.0 * __real__ x)
+ + __ieee754_coshl (2.0 * __imag__ x));
+
+ __real__ res = __sinl (2.0 * __real__ x) / den;
+ __imag__ res = __ieee754_sinhl (2.0 * __imag__ x) / den;
+ }
+
+ return res;
+}
+weak_alias (__ctanl, ctanl)
diff --git a/sysdeps/libm-ieee754/s_floorl.c b/sysdeps/libm-ieee754/s_floorl.c
index 8cd81c6302..0eb0bec9b8 100644
--- a/sysdeps/libm-ieee754/s_floorl.c
+++ b/sysdeps/libm-ieee754/s_floorl.c
@@ -48,7 +48,7 @@ static long double huge = 1.0e4930;
GET_LDOUBLE_WORDS(se,i0,i1,x);
sx = (se>>15)&1;
j0 = (se&0x7fff)-0x3fff;
- if(j0<32) {
+ if(j0<31) {
if(j0<0) { /* raise inexact if x != 0 */
if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
if(sx==0) {se=0;i0=i1=0;}
@@ -56,26 +56,26 @@ static long double huge = 1.0e4930;
{ se=0xbfff;i0;i1=0;}
}
} else {
- i = (0xffffffff)>>j0;
+ i = (0x7fffffff)>>j0;
if(((i0&i)|i1)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(sx) {
- if (j0>0) i0 += (0x80000000)>>(j0-1);
+ if (j0>0) i0 += (0x80000000)>>j0;
else ++se;
i0 &= (~i); i1=0;
}
}
- } else if (j0>63) {
+ } else if (j0>62) {
if(j0==0x4000) return x+x; /* inf or NaN */
else return x; /* x is integral */
} else {
- i = ((u_int32_t)(0xffffffff))>>(j0-32);
+ i = ((u_int32_t)(0xffffffff))>>(j0-31);
if((i1&i)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(sx) {
- if(j0==32) i0+=1;
+ if(j0==31) i0+=1;
else {
- j = i1+(1<<(64-j0));
+ j = i1+(1<<(63-j0));
if(j<i1) i0 +=1 ; /* got a carry */
i1=j;
}
diff --git a/sysdeps/libm-ieee754/s_nearbyint.c b/sysdeps/libm-ieee754/s_nearbyint.c
new file mode 100644
index 0000000000..32f5bf9447
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_nearbyint.c
@@ -0,0 +1,98 @@
+/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_rint.c,v 1.8 1995/05/10 20:48:04 jtc Exp $";
+#endif
+
+/*
+ * rint(x)
+ * Return x rounded to integral value according to the prevailing
+ * rounding mode.
+ * Method:
+ * Using floating addition.
+ * Exception:
+ * Inexact flag raised if x not equal to rint(x).
+ */
+
+#include <fenv.h>
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+TWO52[2]={
+ 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
+ -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
+};
+
+#ifdef __STDC__
+ double __nearbyint(double x)
+#else
+ double __nearbyint(x)
+ double x;
+#endif
+{
+ fenv_t env;
+ int32_t i0,j0,sx;
+ u_int32_t i,i1;
+ double w,t;
+ EXTRACT_WORDS(i0,i1,x);
+ sx = (i0>>31)&1;
+ j0 = ((i0>>20)&0x7ff)-0x3ff;
+ if(j0<20) {
+ if(j0<0) {
+ if(((i0&0x7fffffff)|i1)==0) return x;
+ i1 |= (i0&0x0fffff);
+ i0 &= 0xfffe0000;
+ i0 |= ((i1|-i1)>>12)&0x80000;
+ SET_HIGH_WORD(x,i0);
+ feholdexcept (&env);
+ w = TWO52[sx]+x;
+ t = w-TWO52[sx];
+ fesetenv (&env);
+ GET_HIGH_WORD(i0,t);
+ SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31));
+ return t;
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ i>>=1;
+ if(((i0&i)|i1)!=0) {
+ if(j0==19) i1 = 0x40000000; else
+ i0 = (i0&(~i))|((0x20000)>>j0);
+ }
+ }
+ } else if (j0>51) {
+ if(j0==0x400) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((u_int32_t)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) return x; /* x is integral */
+ i>>=1;
+ if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20));
+ }
+ INSERT_WORDS(x,i0,i1);
+ feholdexcept (&env);
+ w = TWO52[sx]+x;
+ t = w-TWO52[sx];
+ fesetenv (&env);
+ return t;
+}
+weak_alias (__nearbyint, nearbyint)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__nearbyint, __nearbyintl)
+weak_alias (__nearbyint, nearbyintl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_nearbyintf.c b/sysdeps/libm-ieee754/s_nearbyintf.c
new file mode 100644
index 0000000000..dc33fa59f9
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_nearbyintf.c
@@ -0,0 +1,80 @@
+/* s_rintf.c -- float version of s_rint.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ */
+/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_rintf.c,v 1.4 1995/05/10 20:48:06 jtc Exp $";
+#endif
+
+#include <fenv.h>
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+TWO23[2]={
+ 8.3886080000e+06, /* 0x4b000000 */
+ -8.3886080000e+06, /* 0xcb000000 */
+};
+
+#ifdef __STDC__
+ float __rintf(float x)
+#else
+ float __rintf(x)
+ float x;
+#endif
+{
+ fenv_t env;
+ int32_t i0,j0,sx;
+ u_int32_t i,i1;
+ float w,t;
+ GET_FLOAT_WORD(i0,x);
+ sx = (i0>>31)&1;
+ j0 = ((i0>>23)&0xff)-0x7f;
+ if(j0<23) {
+ if(j0<0) {
+ if((i0&0x7fffffff)==0) return x;
+ i1 = (i0&0x07fffff);
+ i0 &= 0xfff00000;
+ i0 |= ((i1|-i1)>>9)&0x400000;
+ SET_FLOAT_WORD(x,i0);
+ feholdexcept (&env);
+ w = TWO23[sx]+x;
+ t = w-TWO23[sx];
+ fesetenv (&env);
+ GET_FLOAT_WORD(i0,t);
+ SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
+ return t;
+ } else {
+ i = (0x007fffff)>>j0;
+ if((i0&i)==0) return x; /* x is integral */
+ i>>=1;
+ if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
+ }
+ } else {
+ if(j0==0x80) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ }
+ SET_FLOAT_WORD(x,i0);
+ feholdexcept (&env);
+ w = TWO23[sx]+x;
+ t = w-TWO23[sx];
+ fesetenv (&env);
+ return t;
+}
+weak_alias (__rintf, rintf)
diff --git a/sysdeps/libm-ieee754/s_nearbyintl.c b/sysdeps/libm-ieee754/s_nearbyintl.c
new file mode 100644
index 0000000000..b6a865443a
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_nearbyintl.c
@@ -0,0 +1,104 @@
+/* s_rintl.c -- long double version of s_rint.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ */
+/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * rintl(x)
+ * Return x rounded to integral value according to the prevailing
+ * rounding mode.
+ * Method:
+ * Using floating addition.
+ * Exception:
+ * Inexact flag raised if x not equal to rintl(x).
+ */
+
+#include <fenv.h>
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+TWO63[2]={
+ 9.223372036854775808000000e+18, /* 0x403E, 0x00000000, 0x00000000 */
+ -9.223372036854775808000000e+18 /* 0xC03E, 0x00000000, 0x00000000 */
+};
+
+#ifdef __STDC__
+ long double __rintl(long double x)
+#else
+ long double __rintl(x)
+ long double x;
+#endif
+{
+ fenv_t env;
+ int32_t se,j0,sx;
+ u_int32_t i,i0,i1;
+ long double w,t;
+ GET_LDOUBLE_WORDS(se,i0,i1,x);
+ sx = (se>>15)&1;
+ j0 = (se&0x7fff)-0x3fff;
+ if(j0<31) {
+ if(j0<0) {
+ if(((se&0x7fff)|i0|i1)==0) return x;
+ i1 |= i0;
+ i0 &= 0xe0000000;
+ i0 |= (i1|-i1)&0x80000000;
+ SET_LDOUBLE_MSW(x,i0);
+ feholdexcept (&env);
+ w = TWO63[sx]+x;
+ t = w-TWO63[sx];
+ fesetenv (&env);
+ GET_LDOUBLE_EXP(i0,t);
+ SET_LDOUBLE_EXP(t,(i0&0x7fff)|(sx<<15));
+ return t;
+ } else {
+ i = (0x7fffffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ i>>=1;
+ if(((i0&i)|i1)!=0) {
+ if(j0==31) i1 = 0x40000000; else
+ i0 = (i0&(~i))|((0x20000000)>>j0);
+ /* Shouldn't this be
+ if (j0 >= 30) i1 = 0x80000000 >> (j0 - 30);
+ i0 = (i0&(~i))|((0x20000000)>>j0);
+ If yes, this should be correct in s_rint and
+ s_rintf, too. -- drepper@cygnus.com */
+ }
+ }
+ } else if (j0>62) {
+ if(j0==0x4000) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((u_int32_t)(0xffffffff))>>(j0-31);
+ if((i1&i)==0) return x; /* x is integral */
+ i>>=1;
+ if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-31));
+ }
+ SET_LDOUBLE_WORDS(x,se,i0,i1);
+ feholdexcept (&env);
+ w = TWO63[sx]+x;
+ t = w-TWO63[sx];
+ fesetenv (&env);
+ return t;
+}
+weak_alias (__rintl, rintl)
diff --git a/sysdeps/libm-ieee754/s_remquo.c b/sysdeps/libm-ieee754/s_remquo.c
index 53f26c6d89..4103155e3f 100644
--- a/sysdeps/libm-ieee754/s_remquo.c
+++ b/sysdeps/libm-ieee754/s_remquo.c
@@ -49,12 +49,7 @@ __remquo (double x, double y, int *quo)
return (x * y) / (x * y);
if (hy <= 0x7fbfffff)
- {
- x = __ieee754_fmod (x, 8 * y); /* now x < 8y */
-
- if (fabs (x) >= 4 * fabs (y))
- cquo += 4;
- }
+ x = __ieee754_fmod (x, 8 * y); /* now x < 8y */
if (((hx - hy) | (lx - ly)) == 0)
{
@@ -66,14 +61,19 @@ __remquo (double x, double y, int *quo)
y = fabs (y);
cquo = 0;
- if (x >= 2 * y)
+ if (x >= 4 * y)
{
x -= 4 * y;
+ cquo += 4;
+ }
+ if (x >= 2 * y)
+ {
+ x -= 2 * y;
cquo += 2;
}
if (x >= y)
{
- x -= 2 * y;
+ x -= y;
++cquo;
}
@@ -83,24 +83,30 @@ __remquo (double x, double y, int *quo)
{
x -= y;
if (x + x >= y)
- x -= y;
+ {
+ x -= y;
+ ++cquo;
+ }
}
}
else
{
double y_half = 0.5 * y;
- if(x > y_half)
+ if (x > y_half)
{
x -= y;
if (x >= y_half)
- x -= y;
+ {
+ x -= y;
+ ++cquo;
+ }
}
}
*quo = qs ? -cquo : cquo;
- GET_HIGH_WORD (hx, x);
- SET_HIGH_WORD (x, hx ^ sx);
+ if (sx)
+ x = -x;
return x;
}
weak_alias (__remquo, remquo)
diff --git a/sysdeps/libm-ieee754/s_remquof.c b/sysdeps/libm-ieee754/s_remquof.c
index 0968fe650b..6fa02e47b3 100644
--- a/sysdeps/libm-ieee754/s_remquof.c
+++ b/sysdeps/libm-ieee754/s_remquof.c
@@ -48,12 +48,7 @@ __remquof (float x, float y, int *quo)
return (x * y) / (x * y);
if (hy <= 0x7dffffff)
- {
- x = __ieee754_fmodf (x, 8 * y); /* now x < 8y */
-
- if (fabs (x) >= 4 * fabs (y))
- cquo += 4;
- }
+ x = __ieee754_fmodf (x, 8 * y); /* now x < 8y */
if ((hx - hy) == 0)
{
@@ -65,14 +60,19 @@ __remquof (float x, float y, int *quo)
y = fabsf (y);
cquo = 0;
- if (x >= 2 * y)
+ if (x >= 4 * y)
{
x -= 4 * y;
+ cquo += 4;
+ }
+ if (x >= 2 * y)
+ {
+ x -= 2 * y;
cquo += 2;
}
if (x >= y)
{
- x -= 2 * y;
+ x -= y;
++cquo;
}
@@ -82,24 +82,30 @@ __remquof (float x, float y, int *quo)
{
x -= y;
if (x + x >= y)
- x -= y;
+ {
+ x -= y;
+ ++cquo;
+ }
}
}
else
{
float y_half = 0.5 * y;
- if(x > y_half)
+ if (x > y_half)
{
x -= y;
if (x >= y_half)
- x -= y;
+ {
+ x -= y;
+ ++cquo;
+ }
}
}
*quo = qs ? -cquo : cquo;
- GET_FLOAT_WORD (hx, x);
- SET_FLOAT_WORD (x, hx ^ sx);
+ if (sx)
+ x = -x;
return x;
}
weak_alias (__remquof, remquof)
diff --git a/sysdeps/libm-ieee754/s_remquol.c b/sysdeps/libm-ieee754/s_remquol.c
index 9515b218c6..9ef424901b 100644
--- a/sysdeps/libm-ieee754/s_remquol.c
+++ b/sysdeps/libm-ieee754/s_remquol.c
@@ -23,15 +23,15 @@
#include "math_private.h"
-static const double zero = 0.0;
+static const long double zero = 0.0;
long double
-__remquol (long double x, long double y, int *quo)
+__remquol (long double x, long double p, int *quo)
{
int32_t ex,ep,hx,hp;
u_int32_t sx,lx,lp;
- int cquo;
+ int cquo,qs;
GET_LDOUBLE_WORDS (ex, hx, lx, x);
GET_LDOUBLE_WORDS (ep, hp, lp, p);
@@ -49,12 +49,7 @@ __remquol (long double x, long double y, int *quo)
return (x * p) / (x * p);
if (ep <= 0x7ffb)
- {
- x = __ieee754_fmodl (x, 8 * p); /* now x < 8p */
-
- if (fabsl (x) >= 4 * fabsl (p))
- cquo += 4;
- }
+ x = __ieee754_fmodl (x, 8 * p); /* now x < 8p */
if (((ex - ep) | (hx - hp) | (lx - lp)) == 0)
{
@@ -66,14 +61,19 @@ __remquol (long double x, long double y, int *quo)
p = fabsl (p);
cquo = 0;
- if (x >= 2 * p)
+ if (x >= 4 * p)
{
x -= 4 * p;
+ cquo += 4;
+ }
+ if (x >= 2 * p)
+ {
+ x -= 2 * p;
cquo += 2;
}
if (x >= p)
{
- x -= 2 * p;
+ x -= p;
++cquo;
}
@@ -83,24 +83,30 @@ __remquol (long double x, long double y, int *quo)
{
x -= p;
if (x + x >= p)
- x -= p;
+ {
+ x -= p;
+ ++cquo;
+ }
}
}
else
{
long double p_half = 0.5 * p;
- if(x > p_half)
+ if (x > p_half)
{
x -= p;
if (x >= p_half)
- x -= p;
+ {
+ x -= p;
+ ++cquo;
+ }
}
}
*quo = qs ? -cquo : cquo;
- GET_LDOUBLE_EXP (ex, x);
- SET_LDOUBLE_EXP (x, ex ^ sx);
+ if (sx)
+ x = -x;
return x;
}
weak_alias (__remquol, remquol)
diff --git a/sysdeps/libm-ieee754/s_round.c b/sysdeps/libm-ieee754/s_round.c
new file mode 100644
index 0000000000..fdb17f8de8
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_round.c
@@ -0,0 +1,97 @@
+/* Round double to integer away from zero.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+static const double huge = 1.0e300;
+
+
+double
+__round (double x)
+{
+ int32_t i0, j0;
+ u_int32_t i1;
+
+ EXTRACT_WORDS (i0, i1, x);
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+ if (j0 < 20)
+ {
+ if (j0 < 0)
+ {
+ if (huge + x > 0.0)
+ {
+ i0 &= 0x80000000;
+ if (j0 == -1)
+ i0 |= 0x3ff00000;
+ i1 = 0;
+ }
+ }
+ else
+ {
+ u_int32_t i = 0x000fffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ /* X is integral. */
+ return x;
+ if (huge + x > 0.0)
+ {
+ /* Raise inexact if x != 0. */
+ i0 += 0x00080000 >> j0;
+ i0 &= ~i;
+ i1 = 0;
+ }
+ }
+ }
+ else if (j0 > 51)
+ {
+ if (j0 == 0x400)
+ /* Inf or NaN. */
+ return x + x;
+ else
+ return x;
+ }
+ else
+ {
+ u_int32_t i = 0xffffffff >> (j0 - 20);
+ if ((i1 & i) == 0)
+ /* X is integral. */
+ return x;
+
+ if (huge + x > 0.0)
+ {
+ /* Raise inexact if x != 0. */
+ u_int32_t j = i1 + (1 << (51 - j0));
+ if (j < i1)
+ i0 += 1;
+ i1 = j;
+ }
+ i1 &= ~i;
+ }
+
+ INSERT_WORDS (x, i0, i1);
+ return x;
+}
+weak_alias (__round, round)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__round, __roundl)
+weak_alias (__round, roundl)
+#endif
diff --git a/sysdeps/libm-ieee754/s_roundf.c b/sysdeps/libm-ieee754/s_roundf.c
new file mode 100644
index 0000000000..5dc0e368ff
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_roundf.c
@@ -0,0 +1,73 @@
+/* Round float to integer away from zero.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+static const float huge = 1.0e30;
+
+
+float
+__roundf (float x)
+{
+ int32_t i0, j0;
+
+ GET_FLOAT_WORD (i0, x);
+ j0 = ((i0 >> 23) & 0xff) - 0x7f;
+ if (j0 < 23)
+ {
+ if (j0 < 0)
+ {
+ if (huge + x > 0.0F)
+ {
+ i0 &= 0x80000000;
+ if (j0 == -1)
+ i0 |= 0x3f800000;
+ }
+ }
+ else
+ {
+ u_int32_t i = 0x007fffff >> j0;
+ if ((i0 & i) == 0)
+ /* X is integral. */
+ return x;
+ if (huge + x > 0.0F)
+ {
+ /* Raise inexact if x != 0. */
+ i0 += 0x00400000 >> j0;
+ i0 &= ~i;
+ }
+ }
+ }
+ else
+ {
+ if (j0 == 0x80)
+ /* Inf or NaN. */
+ return x + x;
+ else
+ return x;
+ }
+
+ SET_FLOAT_WORD (x, i0);
+ return x;
+}
+weak_alias (__roundf, roundf)
diff --git a/sysdeps/libm-ieee754/s_roundl.c b/sysdeps/libm-ieee754/s_roundl.c
new file mode 100644
index 0000000000..db87154089
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_roundl.c
@@ -0,0 +1,100 @@
+/* Round long double to integer away from zero.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+static const long double huge = 1.0e4930;
+
+
+long double
+__roundl (long double x)
+{
+ int32_t j0;
+ u_int32_t se, i1, i0;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ j0 = (se & 0x7fff) - 0x3fff;
+ if (j0 < 31)
+ {
+ if (j0 < 0)
+ {
+ if (huge + x > 0.0)
+ {
+ se &= 0x8000;
+ if (j0 == -1)
+ se |= 0x3fff;
+ i0 = i1 = 0;
+ }
+ }
+ else
+ {
+ u_int32_t i = 0x7fffffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ /* X is integral. */
+ return x;
+ if (huge + x > 0.0)
+ {
+ /* Raise inexact if x != 0. */
+ u_int32_t j = i0 + 0x40000000 >> j0;
+ if (j < i0)
+ se += 1;
+ i0 = (j & ~i) | 0x80000000;
+ i1 = 0;
+ }
+ }
+ }
+ else if (j0 > 62)
+ {
+ if (j0 == 0x4000)
+ /* Inf or NaN. */
+ return x + x;
+ else
+ return x;
+ }
+ else
+ {
+ u_int32_t i = 0xffffffff >> (j0 - 31);
+ if ((i1 & i) == 0)
+ /* X is integral. */
+ return x;
+
+ if (huge + x > 0.0)
+ {
+ /* Raise inexact if x != 0. */
+ u_int32_t j = i1 + (1 << (62 - j0));
+ if (j < i1)
+ {
+ u_int32_t k = i0 + 1;
+ if (k < i0)
+ se += 1;
+ i0 = k;
+ }
+ i1 = j;
+ }
+ i1 &= ~i;
+ }
+
+ SET_LDOUBLE_WORDS (x, se, i0, i1);
+ return x;
+}
+weak_alias (__roundl, roundl)
diff --git a/sysdeps/libm-ieee754/s_roundtol.c b/sysdeps/libm-ieee754/s_roundtol.c
new file mode 100644
index 0000000000..6649369b06
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_roundtol.c
@@ -0,0 +1,177 @@
+/* Round long double value to long int.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+#ifdef NO_LONG_DOUBLE
+/* The `long double' is in fact the IEEE `double' type. */
+
+long int
+__roundtol (long double x)
+{
+ int32_t j0;
+ u_int32_t i1, i0;
+ long int result;
+
+ EXTRACT_WORDS (i0, i1, x);
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+ if (j0 < 20)
+ {
+ if (j0 < 0)
+ result = j0 < -1 ? 0 : ((i0 & 0x80000000) ? -1 : 1);
+ else
+ {
+ u_int32_t i = 0xfffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ result = (long int) ((i0 & 0xfffff) | 0x100000) >> j0;
+ else
+ {
+ /* X is not integral. */
+ u_int32_t j = i0 + (0x80000 >> j0);
+ if (j < i0)
+ result = (long int) 0x80000 >> (20 - j0);
+ else
+ result = (j | 0x100000) >> (20 - j0);
+ }
+ }
+ }
+ else if (j0 >= 8 * sizeof (long int) || j0 > 51)
+ {
+ /* The number is too large. It is left implementation defined
+ what happens. */
+ result = (long int) x;
+ }
+ else
+ {
+ i = ((u_int32_t) (0xffffffff)) >> (j0 - 20);
+ if ((i1 & i) != 0)
+ {
+ /* x is not integral. */
+ u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
+ if (j < i1)
+ {
+ j = i0 + 1;
+ if ((j & 0xfffff) == 0)
+ {
+ if (sizeof (long int) <= 4)
+ /* Overflow. */
+ result = (long int) x;
+ else
+ result = 1l << (j0 + 1);
+ }
+ else
+ result = (long int) ((i0 & 0xfffff) | 0x100000) << (j0 - 31);
+ }
+ else
+ {
+ result = (long int) ((i0 & 0xfffff) | 0x100000) << (j0 - 31);
+ if (sizeof (long int) > 4 && j0 > 31)
+ result |= j >> (63 - j0);
+ }
+ }
+ else
+ {
+ result = (long int) ((i0 & 0xfffff) | 0x100000) << (j0 - 31);
+ if (sizeof (long int) > 4 && j0 > 31)
+ result |= j >> (63 - j0);
+ }
+ }
+
+ return i0 & 0x80000000 ? -result : result;
+}
+#else
+long int
+__roundtol (long double x)
+{
+ int32_t j0;
+ u_int32_t se, i1, i0;
+ long int result;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ j0 = (se & 0x7fff) - 0x3fff;
+ if (j0 < 31)
+ {
+ if (j0 < 0)
+ result = j0 < -1 ? 0 : 1;
+ else
+ {
+ u_int32_t i = 0x7fffffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ result = (long int) i0 >> j0;
+ else
+ {
+ /* X is not integral. */
+ u_int32_t j = i0 + (0x40000000 >> j0);
+ if (j < i0)
+ result = 0x80000000l >> (30 - j0);
+ else
+ result = j >> (31 - j0);
+ }
+ }
+ }
+ else if ((unsigned int) j0 >= 8 * sizeof (long int) || j0 > 62)
+ {
+ /* The number is too large. It is left implementation defined
+ what happens. */
+ result = (long int) x;
+ }
+ else
+ {
+ u_int32_t i = ((u_int32_t) (0xffffffff)) >> (j0 - 31);
+ if ((i1 & i) != 0)
+ {
+ /* x is not integral. */
+ u_int32_t j = i1 + (0x80000000 >> (j0 - 31));
+ if (j < i1)
+ {
+ j = i0 + 1;
+ if (j == 0)
+ {
+ if (sizeof (long int) <= 4)
+ /* Overflow. */
+ result = (long int) x;
+ else
+ result = 1l << (j0 + 1);
+ }
+ else
+ result = (long int) i0 << (j0 - 31);
+ }
+ else
+ {
+ result = (long int) i0 << (j0 - 31);
+ if (sizeof (long int) > 4 && j0 > 31)
+ result |= j >> (63 - j0);
+ }
+ }
+ else
+ {
+ result = (long int) i0 << (j0 - 31);
+ if (sizeof (long int) > 4 && j0 > 31)
+ result |= i1 >> (63 - j0);
+ }
+ }
+
+ return se & 0x8000 ? -result : result;
+}
+#endif
+weak_alias (__roundtol, roundtol)
diff --git a/sysdeps/libm-ieee754/s_roundtoll.c b/sysdeps/libm-ieee754/s_roundtoll.c
new file mode 100644
index 0000000000..8d99130697
--- /dev/null
+++ b/sysdeps/libm-ieee754/s_roundtoll.c
@@ -0,0 +1,179 @@
+/* Round long double value to long long int.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+#ifdef NO_LONG_DOUBLE
+/* The `long double' is in fact the IEEE `double' type. */
+
+long long int
+__roundtoll (long double x)
+{
+ int32_t j0;
+ u_int32_t i1, i0;
+ long long int result;
+
+ EXTRACT_WORDS (i0, i1, x);
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+ if (j0 < 20)
+ {
+ if (j0 < 0)
+ result = j0 < -1 ? 0 : ((i0 & 0x80000000) ? -1 : 1);
+ else
+ {
+ u_int32_t i = 0xfffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ result = (long long int) ((i0 & 0xfffff) | 0x100000) >> j0;
+ else
+ {
+ /* X is not integral. */
+ u_int32_t j = i0 + (0x80000 >> j0);
+ if (j < i0)
+ result = (long long int) 0x80000 >> (20 - j0);
+ else
+ result = (j | 0x100000) >> (20 - j0);
+ }
+ }
+ }
+ else if (j0 >= 8 * sizeof (long long int) || j0 > 51)
+ {
+ /* The number is too large. It is left implementation defined
+ what happens. */
+ result = (long long int) x;
+ }
+ else
+ {
+ i = ((u_int32_t) (0xffffffff)) >> (j0 - 20);
+ if ((i1 & i) != 0)
+ {
+ /* x is not integral. */
+ u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
+ if (j < i1)
+ {
+ j = i0 + 1;
+ if ((j & 0xfffff) == 0)
+ {
+ if (sizeof (long long int) <= 4)
+ /* Overflow. */
+ result = (long long int) x;
+ else
+ result = 1ll << (j0 + 1);
+ }
+ else
+ result = ((long long int) ((i0 & 0xfffff) | 0x100000)
+ << (j0 - 31));
+ }
+ else
+ {
+ result = ((long long int) ((i0 & 0xfffff) | 0x100000)
+ << (j0 - 31));
+ if (sizeof (long long int) > 4 && j0 > 31)
+ result |= j >> (63 - j0);
+ }
+ }
+ else
+ {
+ result = (long long int) ((i0 & 0xfffff) | 0x100000) << (j0 - 31);
+ if (sizeof (long long int) > 4 && j0 > 31)
+ result |= j >> (63 - j0);
+ }
+ }
+
+ return i0 & 0x80000000 ? -result : result;
+}
+#else
+long long int
+__roundtoll (long double x)
+{
+ int32_t j0;
+ u_int32_t se, i1, i0;
+ long long int result;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ j0 = (se & 0x7fff) - 0x3fff;
+ if (j0 < 31)
+ {
+ if (j0 < 0)
+ result = j0 < -1 ? 0 : 1;
+ else
+ {
+ u_int32_t i = 0x7fffffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ result = (long long int) i0 >> j0;
+ else
+ {
+ /* X is not integral. */
+ u_int32_t j = i0 + (0x40000000 >> j0);
+ if (j < i0)
+ result = 0x80000000l >> (30 - j0);
+ else
+ result = j >> (31 - j0);
+ }
+ }
+ }
+ else if ((unsigned int) j0 >= 8 * sizeof (long long int) || j0 > 62)
+ {
+ /* The number is too large. It is left implementation defined
+ what happens. */
+ result = (long long int) x;
+ }
+ else
+ {
+ u_int32_t i = ((u_int32_t) (0xffffffff)) >> (j0 - 31);
+ if ((i1 & i) != 0)
+ {
+ /* x is not integral. */
+ u_int32_t j = i1 + (0x80000000 >> (j0 - 31));
+ if (j < i1)
+ {
+ j = i0 + 1;
+ if (j == 0)
+ {
+ if (sizeof (long long int) <= 4)
+ /* Overflow. */
+ result = (long long int) x;
+ else
+ result = 1ll << (j0 + 1);
+ }
+ else
+ result = (long long int) i0 << (j0 - 31);
+ }
+ else
+ {
+ result = (long long int) i0 << (j0 - 31);
+ if (sizeof (long long int) > 4 && j0 > 31)
+ result |= j >> (63 - j0);
+ }
+ }
+ else
+ {
+ result = (long long int) i0 << (j0 - 31);
+ if (sizeof (long long int) > 4 && j0 > 31)
+ result |= i1 >> (63 - j0);
+ }
+ }
+
+ return se & 0x8000 ? -result : result;
+}
+#endif
+weak_alias (__roundtoll, roundtoll)
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 9b52b32d0c..68a6d90e32 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -282,6 +282,13 @@ __inline_functions (float,f)
__inline_functions (long double,l)
#undef __inline_functions
+__m81_defun (long int, __rinttol, (long double __x))
+{
+ long int __result;
+ __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));
+ return __result;
+}
+
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
/* Define inline versions of the user visible functions. */
@@ -349,6 +356,7 @@ __inline_forward_c(int,ilogbl, (long double __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
+__inline_forward_c(long int,rinttol, (long double __value), (__value))
#endif
#endif /* Use misc or ISO C9X */
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c
new file mode 100644
index 0000000000..439eae131c
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccosh.c
@@ -0,0 +1,119 @@
+/* Complex cosine hyperbole function. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <complex.h>
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef huge_val
+#define huge_val HUGE_VAL
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+__complex__ float_type
+s(__ccosh) (__complex__ float_type x)
+{
+ __complex__ float_type retval;
+
+ __real__ x = s(fabs) (__real__ x);
+
+ if (m81(__finite) (__real__ x))
+ {
+ if (m81(__finite) (__imag__ x))
+ {
+ float_type cosh_val;
+ float_type sin_ix, cos_ix;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ cosh_val = m81(__ieee754_cosh) (__real__ x);
+ __real__ retval = cos_ix * cosh_val;
+ __imag__ retval = sin_ix * cosh_val;
+ }
+ else if (__real__ x == 0)
+ {
+ __imag__ retval = 0.0;
+ __real__ retval = huge_val - huge_val;
+ }
+ else
+ __real__ retval = __imag__ retval = huge_val - huge_val;
+ }
+ else if (m81(__isinf) (__real__ x))
+ {
+ if (__imag__ x == 0)
+ {
+ __real__ retval = huge_val;
+ __imag__ retval = __imag__ x;
+ }
+ else if (m81(__finite) (__imag__ x))
+ {
+ float_type remainder, pi_2;
+ int quadrant;
+ __real__ retval = __imag__ retval = huge_val;
+
+ __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (remainder), "=dm" (quadrant)
+ : "f" (pi_2), "0" (__imag__ x));
+ quadrant = (quadrant >> 16) & 0x83;
+ if (quadrant & 0x80)
+ quadrant ^= 0x83;
+ switch (quadrant)
+ {
+ default:
+ break;
+ case 1:
+ __real__ retval = -__real__ retval;
+ break;
+ case 2:
+ __real__ retval = -__real__ retval;
+ case 3:
+ __imag__ retval = -__imag__ retval;
+ break;
+ }
+ }
+ else
+ {
+ /* The subtraction raises the invalid exception. */
+ __real__ retval = huge_val;
+ __imag__ retval = huge_val - huge_val;
+ }
+ }
+ else if (__imag__ x == 0)
+ {
+ __real__ retval = 0.0/0.0;
+ __imag__ retval = __imag__ x;
+ }
+ else
+ __real__ retval = __imag__ retval = 0.0/0.0;
+
+ return retval;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__ccosh), s(ccosh))
diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/fpu/s_ccoshf.c
new file mode 100644
index 0000000000..7d0766851f
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccoshf.c
@@ -0,0 +1,4 @@
+#define SUFF f
+#define float_type float
+#define huge_val HUGE_VALF
+#include <s_ccosh.c>
diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/fpu/s_ccoshl.c
new file mode 100644
index 0000000000..6f1d1e5f85
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccoshl.c
@@ -0,0 +1,4 @@
+#define SUFF l
+#define float_type long double
+#define huge_val HUGE_VALL
+#include <s_ccosh.c>
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
index d5c76453e8..4846ec10f3 100644
--- a/sysdeps/m68k/fpu/s_cexp.c
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -40,18 +40,24 @@ __complex__ float_type
s(__cexp) (__complex__ float_type x)
{
__complex__ float_type retval;
- float_type sin_ix, cos_ix;
if (m81(__finite) (__real__ x))
{
if (m81(__finite) (__imag__ x))
{
- float_type exp_val = s(__exp) (__real__ x);
+ float_type exp_val = m81(__ieee754_exp) (__real__ x);
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- __real__ retval = exp_val * cos_ix;
- __imag__ retval = exp_val * sin_ix;
+ __real__ retval = __imag__ retval = exp_val;
+ if (m81(__finite) (exp_val))
+ {
+ float_type sin_ix, cos_ix;
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval *= cos_ix;
+ __imag__ retval *= sin_ix;
+ }
+ else
+ goto fix_sign;
}
else
/* If the imaginary part is +-inf or NaN and the real part is
@@ -62,16 +68,41 @@ s(__cexp) (__complex__ float_type x)
{
if (m81(__finite) (__imag__ x))
{
- if (m81(__signbit) (__real__ x) == 0 && __imag__ x == 0.0)
- retval = huge_val;
+ float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val;
+
+ if (__imag__ x == 0.0)
+ {
+ __real__ retval = value;
+ __imag__ retval = __imag__ x;
+ }
else
{
- float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val;
+ float_type remainder, pi_2;
+ int quadrant;
+ __real__ retval = value;
+ __imag__ retval = value;
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- __real__ retval = value * cos_ix;
- __imag__ retval = value * sin_ix;
+ fix_sign:
+ __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (remainder), "=dm" (quadrant)
+ : "f" (pi_2), "0" (__imag__ x));
+ quadrant = (quadrant >> 16) & 0x83;
+ if (quadrant & 0x80)
+ quadrant ^= 0x83;
+ switch (quadrant)
+ {
+ default:
+ break;
+ case 1:
+ __real__ retval = -__real__ retval;
+ break;
+ case 2:
+ __real__ retval = -__real__ retval;
+ case 3:
+ __imag__ retval = -__imag__ retval;
+ break;
+ }
}
}
else if (m81(__signbit) (__real__ x) == 0)
@@ -80,7 +111,10 @@ s(__cexp) (__complex__ float_type x)
__imag__ retval = 0.0/0.0;
}
else
- retval = 0.0;
+ {
+ __real__ retval = 0.0;
+ __imag__ retval = s(__copysign) (0.0, __imag__ x);
+ }
}
else
/* If the real part is NaN the result is NaN + iNaN. */
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c
new file mode 100644
index 0000000000..c409ed0d8f
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinh.c
@@ -0,0 +1,128 @@
+/* Complex sine hyperbole function. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <complex.h>
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef huge_val
+#define huge_val HUGE_VAL
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+__complex__ float_type
+s(__csinh) (__complex__ float_type x)
+{
+ __complex__ float_type retval;
+ int negate = m81(__signbit) (__real__ x);
+
+ __real__ x = s(fabs) (__real__ x);
+
+ if (m81(__finite) (__real__ x))
+ {
+ if (m81(__finite) (__imag__ x))
+ {
+ float_type sinh_val;
+ float_type sin_ix, cos_ix;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ sinh_val = m81(__ieee754_sinh) (__real__ x);
+ __real__ retval = cos_ix * sinh_val;
+ __imag__ retval = sin_ix * sinh_val;
+
+ if (negate)
+ __real__ retval = -__real__ retval;
+ }
+ else if (__real__ x == 0)
+ {
+ __real__ retval = 0.0;
+ __imag__ retval = 0.0/0.0;
+
+ if (negate)
+ __real__ retval = -__real__ retval;
+ }
+ else
+ __real__ retval = __imag__ retval = 0.0/0.0;
+ }
+ else if (m81(__isinf) (__real__ x))
+ {
+ if (__imag__ x == 0.0)
+ {
+ __real__ retval = negate ? -huge_val : huge_val;
+ __imag__ retval = __imag__ x;
+ }
+ else if (m81(__finite) (__imag__ x))
+ {
+ float_type remainder, pi_2;
+ int quadrant;
+ __real__ retval = __imag__ retval = huge_val;
+
+ __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (remainder), "=dm" (quadrant)
+ : "f" (pi_2), "0" (__imag__ x));
+ quadrant = (quadrant >> 16) & 0x83;
+ if (quadrant & 0x80)
+ quadrant ^= 0x83;
+ if (negate)
+ quadrant ^= 1;
+ switch (quadrant)
+ {
+ default:
+ break;
+ case 1:
+ __real__ retval = -__real__ retval;
+ break;
+ case 2:
+ __real__ retval = -__real__ retval;
+ case 3:
+ __imag__ retval = -__imag__ retval;
+ break;
+ }
+ }
+ else
+ {
+ /* The subtraction raises the invalid exception. */
+ __real__ retval = huge_val;
+ __imag__ retval = huge_val - huge_val;
+ }
+ }
+ else if (__imag__ x == 0.0)
+ {
+ __real__ retval = 0.0/0.0;
+ __imag__ retval = __imag__ x;
+ }
+ else
+ __real__ retval = __imag__ retval = 0.0/0.0;
+
+ return retval;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__csinh), s(csinh))
diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/fpu/s_csinhf.c
new file mode 100644
index 0000000000..42c114b961
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinhf.c
@@ -0,0 +1,4 @@
+#define SUFF f
+#define float_type float
+#define huge_val HUGE_VALF
+#include <s_csinh.c>
diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/fpu/s_csinhl.c
new file mode 100644
index 0000000000..c8aa5c7d27
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinhl.c
@@ -0,0 +1,4 @@
+#define SUFF l
+#define float_type long double
+#define huge_val HUGE_VALL
+#include <s_csinh.c>
diff --git a/sysdeps/m68k/fpu/s_rinttol.c b/sysdeps/m68k/fpu/s_rinttol.c
new file mode 100644
index 0000000000..7476d785a6
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_rinttol.c
@@ -0,0 +1,31 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+
+long int
+__rinttol (long double x)
+{
+ return __m81_u(__rinttol) (x);
+}
+
+weak_alias (__rinttol, rinttol)
diff --git a/sysdeps/m68k/fpu/s_rinttoll.c b/sysdeps/m68k/fpu/s_rinttoll.c
new file mode 100644
index 0000000000..bad8082bd1
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_rinttoll.c
@@ -0,0 +1,62 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+long long int
+__rinttoll (long double x)
+{
+ int32_t se, sx;
+ u_int32_t h, l;
+ long long int result;
+
+ x = __m81_u(__rintl) (x);
+
+ /* We could use __fixxfdi from libgcc, but here we can take advantage of
+ the known floating point format. */
+ GET_LDOUBLE_WORDS (se, h, l, x);
+
+ sx = se & (1 << 15);
+ se = (se ^ sx) - 0x3fff;
+
+ if (se < 64)
+ {
+ if (se > 31)
+ result = (((long long int) (h >> (63 - se)) << 32)
+ | (l >> (63 - se)) | (h << (se - 31)));
+ else
+ result = h >> (31 - se);
+ if (sx)
+ result = -result;
+ }
+ else
+ /* Too large. The number is either +-inf or NaN or it is too
+ large to be effected by rounding. The standard leaves it
+ undefined what to return when the number is too large to fit in
+ a `long long int'. */
+ result = -1LL;
+
+ return result;
+}
+
+weak_alias (__rinttoll, rinttoll)
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
index 79e87dc2db..8d45aaec2b 100644
--- a/sysdeps/m68k/huge_val.h
+++ b/sysdeps/m68k/huge_val.h
@@ -65,12 +65,6 @@ static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
#define HUGE_VALL (__huge_vall.__ld)
#endif /* GCC. */
-
-/* Expression representing positive infinity. Here it is the same as
- HUGE_VALF. */
-#define INFINITY HUGE_VALF
-
#endif /* __USE_ISOC9X. */
-
#endif /* huge_val.h */
diff --git a/sysdeps/sparc/dl-machine.h b/sysdeps/sparc/dl-machine.h
index ceaf9eedce..1ab3762ea0 100644
--- a/sysdeps/sparc/dl-machine.h
+++ b/sysdeps/sparc/dl-machine.h
@@ -295,10 +295,10 @@ _start:\n\
or %l2,%lo(_GLOBAL_OFFSET_TABLE_-(2b-.)),%l2\n\
or %l3,%lo(_dl_default_scope),%l3\n\
add %o7,%l2,%l1\n\
- # %l1 has the GOT. %l3 has _dl_default_scope offset\n\
- # Now, load _dl_default_scope [2]\n\
- add %l3,4,%l3\n\
+ # %l1 has the GOT. %l3 has _dl_default_scope GOT offset\n\
ld [%l1+%l3],%l4\n\
+ # %l4 has pointer to _dl_default_scope. Now, load _dl_default_scope [2]\n\
+ ld [%l4+8],%l4\n\
# %l4 has _dl_default_scope [2]\n\
# call _dl_init_next until it returns 0, pass _dl_default_scope [2]\n\
3:\n\
@@ -308,7 +308,8 @@ _start:\n\
bz,a 4f\n\
nop\n\
call %o0\n\
- nop\n\
+ /* Pass pointer to argument block to this init function */\n\
+ add %sp,64,%o0\n\
b,a 3b\n\
4:\n\
# Clear the _dl_starting_up variable and pass _dl_fini in %g1 as per ELF ABI.\n\
diff --git a/sysdeps/sparc/elf/start.c b/sysdeps/sparc/elf/start.c
index f9c97f89bc..f1e80195ca 100644
--- a/sysdeps/sparc/elf/start.c
+++ b/sysdeps/sparc/elf/start.c
@@ -60,8 +60,8 @@ _start (void)
#ifdef ELF_INIT_FINI
{
extern void _fini (void);
- atexit (_fini);
_init ();
+ atexit (_fini);
}
#endif
exit (main (argc, argv, envp));
diff --git a/sysdeps/sparc/fpu_control.h b/sysdeps/sparc/fpu_control.h
index cfd85844c3..5ef3824702 100644
--- a/sysdeps/sparc/fpu_control.h
+++ b/sysdeps/sparc/fpu_control.h
@@ -31,12 +31,12 @@
#define _FPU_SINGLE 0x10000000 /* DO NOT USE */
/* rounding control / Sparc */
-#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
-#define _FPU_RC_DOWN 0x80000000
-#define _FPU_RC_UP 0xc0000000
+#define _FPU_RC_DOWN 0xc0000000
+#define _FPU_RC_UP 0x80000000
#define _FPU_RC_ZERO 0x40000000
+#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
-#define _FPU_RESERVED 0x300000 /* Reserved bits in cw */
+#define _FPU_RESERVED 0x30300000 /* Reserved bits in cw */
/* Now two recommended cw */
@@ -45,26 +45,16 @@
- extended precision
- rounding to nearest
- exceptions on overflow, zero divide and NaN */
-#define _FPU_DEFAULT 0x1f
+#define _FPU_DEFAULT 0x1e
/* IEEE: same as above, but exceptions */
#define _FPU_IEEE 0x0
-/* private namespace. It should only be used by crt0.o. */
-extern unsigned short __fpu_control;
-
/* Type of the control word. */
-typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int fpu_control_t;
#define _FPU_GETCW(cw) __asm__ ("st %%fsr,%0" : "=m" (*&cw))
-#define _FPU_SETCW(cw) __asm__ ("ld %0,%%fsr" : "=m" (*&cw))
-
-#if 0
-/* The intel original macros */
-/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
-#define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
-#endif
+#define _FPU_SETCW(cw) __asm__ ("ld %0,%%fsr" : : "m" (*&cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
diff --git a/sysdeps/sparc/setjmp.S b/sysdeps/sparc/setjmp.S
index f07a348fe3..9e93668d96 100644
--- a/sysdeps/sparc/setjmp.S
+++ b/sysdeps/sparc/setjmp.S
@@ -31,15 +31,15 @@ ENTRY (__sigsetjmp)
call 1f
nop
1:
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(2b-.)),%l7
- or %l7,%lo(_GLOBAL_OFFSET_TABLE_-(2b-.)),%l7
- add %l7,%o7,%l7
+ sethi %hi(_GLOBAL_OFFSET_TABLE_-(2b-.)),%g2
+ or %g2,%lo(_GLOBAL_OFFSET_TABLE_-(2b-.)),%g2
+ add %g2,%o7,%g2
sethi %hi(C_SYMBOL_NAME (__sigjmp_save)), %g3
or %g3,%lo(C_SYMBOL_NAME (__sigjmp_save)), %g3
st %sp, [%o0 + (JB_SP * 4)]
st %fp, [%o0 + (JB_FP * 4)]
mov %g1,%o7
- ld [%l7+%g3],%g1
+ ld [%g2+%g3],%g1
jmp %g1
st %o7, [%o0+(JB_PC*4)]
#else
diff --git a/sysdeps/sparc/udiv_qrnnd.S b/sysdeps/sparc/udiv_qrnnd.S
index e5d30679e1..9126b64f50 100644
--- a/sysdeps/sparc/udiv_qrnnd.S
+++ b/sysdeps/sparc/udiv_qrnnd.S
@@ -26,7 +26,6 @@
! n1 i1
! n0 i2
! d i3
-
#include "DEFS.h"
#include "sysdep.h"
#undef ret /* Kludge for glibc */
@@ -38,6 +37,7 @@ LC1: .double 0r2147483648
.align 4
.global __udiv_qrnnd
+ .type __udiv_qrnnd,@function
FUNC(__udiv_qrnnd)
!#PROLOGUE# 0
save %sp,-104,%sp
diff --git a/sysdeps/stub/fclrexcpt.c b/sysdeps/stub/fclrexcpt.c
new file mode 100644
index 0000000000..50373e06a5
--- /dev/null
+++ b/sysdeps/stub/fclrexcpt.c
@@ -0,0 +1,27 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feclearexcept (int excepts)
+{
+}
+stub_warning (feclearexcept)
diff --git a/sysdeps/stub/fegetenv.c b/sysdeps/stub/fegetenv.c
new file mode 100644
index 0000000000..5d10d84abc
--- /dev/null
+++ b/sysdeps/stub/fegetenv.c
@@ -0,0 +1,27 @@
+/* Store current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetenv (fenv_t *envp)
+{
+}
+stub_warning (fegetenv)
diff --git a/sysdeps/stub/fegetround.c b/sysdeps/stub/fegetround.c
new file mode 100644
index 0000000000..db673c83aa
--- /dev/null
+++ b/sysdeps/stub/fegetround.c
@@ -0,0 +1,28 @@
+/* Return current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetround (void)
+{
+ return 0;
+}
+stub_warning (fegetround)
diff --git a/sysdeps/stub/feholdexcpt.c b/sysdeps/stub/feholdexcpt.c
new file mode 100644
index 0000000000..c52dbcfa5d
--- /dev/null
+++ b/sysdeps/stub/feholdexcpt.c
@@ -0,0 +1,28 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ return 0; /* Signal failure. */
+}
+stub_warning (feholdexcept)
diff --git a/sysdeps/stub/fenvbits.h b/sysdeps/stub/fenvbits.h
new file mode 100644
index 0000000000..cb8868cc70
--- /dev/null
+++ b/sysdeps/stub/fenvbits.h
@@ -0,0 +1,63 @@
+/* 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.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file should never be included directly. */
+
+#ifndef _FENVBITS_H
+#define _FENVBITS_H 1
+
+/* Here should be the exception be defined:
+ FE_INVALID
+ FE_DIVBYZERO
+ FE_OVERFLOW
+ FE_UNDERFLOW
+ FE_INEXACT
+ We define no macro which signals no exception is supported. */
+
+#define FE_ALL_EXCEPT 0
+
+
+/* Here should the rounding modes be defined:
+ FE_TONEAREST
+ FE_DOWNWARD
+ FE_UPWARD
+ FE_TOWARDSZERO
+ We define no macro which signals no rounding mode is selectable. */
+
+
+/* Type representing exception flags.
+ XXX Probably we should also include the signal handler here. */
+typedef struct
+ {
+ unsigned int flags;
+ }
+fexcept_t;
+
+
+/* Type representing floating-point environment. */
+typedef struct
+ {
+ fexcept_t excepts;
+ /* XXX I don't know what else we should save. */
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1l)
+
+#endif /* fenvbits.h */
diff --git a/sysdeps/stub/fesetenv.c b/sysdeps/stub/fesetenv.c
new file mode 100644
index 0000000000..57cad7c093
--- /dev/null
+++ b/sysdeps/stub/fesetenv.c
@@ -0,0 +1,27 @@
+/* Install given floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fesetenv (const fenv_t *envp)
+{
+}
+stub_warning (fesetenv)
diff --git a/sysdeps/stub/fesetround.c b/sysdeps/stub/fesetround.c
new file mode 100644
index 0000000000..ed1d20fa62
--- /dev/null
+++ b/sysdeps/stub/fesetround.c
@@ -0,0 +1,28 @@
+/* Set current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ return 0; /* Signal we are unable to set the direction. */
+}
+stub_warning (fesetround)
diff --git a/sysdeps/stub/feupdateenv.c b/sysdeps/stub/feupdateenv.c
new file mode 100644
index 0000000000..2e9c8fdac0
--- /dev/null
+++ b/sysdeps/stub/feupdateenv.c
@@ -0,0 +1,27 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feupdateenv (const fenv_t *envp)
+{
+}
+stub_warning (feupdateenv)
diff --git a/sysdeps/stub/fgetexcptflg.c b/sysdeps/stub/fgetexcptflg.c
new file mode 100644
index 0000000000..18beff4359
--- /dev/null
+++ b/sysdeps/stub/fgetexcptflg.c
@@ -0,0 +1,27 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+}
+stub_warning (fegetexceptflag)
diff --git a/sysdeps/stub/fraiseexcpt.c b/sysdeps/stub/fraiseexcpt.c
new file mode 100644
index 0000000000..b03192c3d6
--- /dev/null
+++ b/sysdeps/stub/fraiseexcpt.c
@@ -0,0 +1,27 @@
+/* Raise given exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feraiseexcept (int excepts)
+{
+}
+stub_warning (feraiseexcept)
diff --git a/sysdeps/stub/fsetexcptflg.c b/sysdeps/stub/fsetexcptflg.c
new file mode 100644
index 0000000000..e352244e6f
--- /dev/null
+++ b/sysdeps/stub/fsetexcptflg.c
@@ -0,0 +1,27 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+}
+stub_warning (fesetexceptflag)
diff --git a/sysdeps/stub/ftestexcept.c b/sysdeps/stub/ftestexcept.c
new file mode 100644
index 0000000000..7227c21a48
--- /dev/null
+++ b/sysdeps/stub/ftestexcept.c
@@ -0,0 +1,28 @@
+/* Test exception in current environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fetestexcept (int excepts)
+{
+ return 0;
+}
+stub_warning (fetestexcept)
diff --git a/sysdeps/unix/sysv/linux/sparc/init-first.h b/sysdeps/unix/sysv/linux/sparc/init-first.h
new file mode 100644
index 0000000000..39822fc595
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/init-first.h
@@ -0,0 +1,52 @@
+/* Prepare arguments for library initialization function.
+ 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.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* The job of this fragment it to find argc and friends for INIT.
+ This is done in one of two ways: either in the stack context
+ of program start, or having dlopen pass them in. */
+
+#define SYSDEP_CALL_INIT(NAME, INIT) \
+void NAME (void *arg) \
+{ \
+ int argc; \
+ char **argv, **envp; \
+ /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. \
+ If the address would be taken inside the expression the optimizer \
+ would try to be too smart and throws it away. Grrr. */ \
+ int *dummy_addr = &_dl_starting_up; \
+ \
+ __libc_multiple_libcs = dummy_addr && !_dl_starting_up; \
+ \
+ if (!__libc_multiple_libcs) \
+ { \
+ argc = *(int *) arg; \
+ argv = (char **) (arg + 4); \
+ envp = &argv[argc+1]; \
+ } \
+ else \
+ { \
+ argc = (int) arg; \
+ argv = ((char ***) &arg)[1]; \
+ envp = ((char ***) &arg)[2]; \
+ } \
+ \
+ INIT (argc, argv, envp); \
+}
+
+
diff --git a/sysdeps/unix/sysv/linux/sparc/signum.h b/sysdeps/unix/sysv/linux/sparc/signum.h
index d50a636bc3..3437c16113 100644
--- a/sysdeps/unix/sysv/linux/sparc/signum.h
+++ b/sysdeps/unix/sysv/linux/sparc/signum.h
@@ -29,7 +29,6 @@
* to make it OSF/1 binary compatible, at least for normal binaries.
*/
#define _NSIG 32 /* Biggest signal number + 1. */
-#define NSIG _NSIG
#define SIGHUP 1
#define SIGINT 2
@@ -67,6 +66,4 @@
#define SIGUSR1 30
#define SIGUSR2 31
-/* Linux/SPARC does not have SIGPWR */
-#define SIGIOT SIGABRT
#endif /* <signal.h> included. */
diff --git a/sysdeps/unix/sysv/linux/sparc/syscalls.list b/sysdeps/unix/sysv/linux/sparc/syscalls.list
index 3d59984f1b..7883d70719 100644
--- a/sysdeps/unix/sysv/linux/sparc/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/syscalls.list
@@ -1,6 +1,3 @@
# File name Caller Syscall name # args Strong name Weak names
-fork - fork 0 __fork fork
-pipe - pipe 1 __pipe pipe
s_llseek llseek _llseek 5 __sys_llseek
-syscall - syscall 0 __syscall syscall
diff --git a/time/strftime.c b/time/strftime.c
index 690cf2af0e..898bd6c98c 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -179,7 +179,7 @@ static const char spaces[16] = " ";
# define memset_space(P, Len) \
do { \
int _len = (Len); \
- \
+ \
do \
{ \
int _this = _len > 16 ? 16 : _len; \
@@ -190,7 +190,7 @@ static const char spaces[16] = " ";
while (_len > 0); \
} while (0)
#else
-# define memset_space(P, Len) memset ((P), ' ', (Len))
+# define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len))
#endif
#define add(n, f) \
diff --git a/time/strptime.c b/time/strptime.c
index 89cfa8e2a4..fd457af6c0 100644
--- a/time/strptime.c
+++ b/time/strptime.c
@@ -537,7 +537,7 @@ strptime_internal (buf, format, tm, decided)
case 'y':
/* Match year within century. */
get_number (0, 99);
- tm->tm_year = val;
+ tm->tm_year = val >= 50 ? val : val + 100;
break;
case 'Y':
/* Match year including century number. */