diff options
author | cvs2svn <> | 2009-09-04 04:29:41 +0000 |
---|---|---|
committer | cvs2svn <> | 2009-09-04 04:29:41 +0000 |
commit | 5cbd59b72a754824f6f13459279c0bdf11c686f1 (patch) | |
tree | 4d4011e117543c1044b59ff714b48dadbd98566c /newlib/libc/stdlib | |
parent | ec977517dc2a22f5b95faf626b405ecb2879b2d5 (diff) | |
download | cygnal-5cbd59b72a754824f6f13459279c0bdf11c686f1.tar.gz cygnal-5cbd59b72a754824f6f13459279c0bdf11c686f1.tar.bz2 cygnal-5cbd59b72a754824f6f13459279c0bdf11c686f1.zip |
This commit was manufactured by cvs2svn to create branch 'binutils-binutils-2_20-branchpoint
2_20-branch'.
Sprout from master 2009-09-04 04:29:40 UTC Jie Zhang <jie.zhang@analog.com> ' gas/'
Cherrypick from cygnus 1999-05-03 07:29:06 UTC Richard Henderson <rth@redhat.com> '19990502 sourceware import':
README
config/mt-d30v
config/mt-netware
config/mt-ospace
etc/add-log.el
etc/add-log.vi
etc/configbuild.ein
etc/configbuild.fig
etc/configbuild.jin
etc/configbuild.tin
etc/configdev.ein
etc/configdev.fig
etc/configdev.jin
etc/configdev.tin
include/aout/hppa.h
include/coff/sym.h
include/fopen-bin.h
include/fopen-same.h
include/opcode/tahoe.h
makefile.vms
Delete:
djunpack.bat
libgloss/ChangeLog
libgloss/Makefile.in
libgloss/README
libgloss/acinclude.m4
libgloss/aclocal.m4
libgloss/arm/Makefile.in
libgloss/arm/_exit.c
libgloss/arm/_kill.c
libgloss/arm/aclocal.m4
libgloss/arm/coff-iq80310.specs
libgloss/arm/coff-pid.specs
libgloss/arm/coff-rdimon.specs
libgloss/arm/coff-rdpmon.specs
libgloss/arm/coff-redboot.ld
libgloss/arm/coff-redboot.specs
libgloss/arm/configure
libgloss/arm/configure.in
libgloss/arm/crt0.S
libgloss/arm/elf-iq80310.specs
libgloss/arm/elf-linux.specs
libgloss/arm/elf-pid.specs
libgloss/arm/elf-rdimon.specs
libgloss/arm/elf-rdpmon.specs
libgloss/arm/elf-redboot.ld
libgloss/arm/elf-redboot.specs
libgloss/arm/libcfunc.c
libgloss/arm/linux-crt0.c
libgloss/arm/linux-syscall.h
libgloss/arm/linux-syscalls0.S
libgloss/arm/linux-syscalls1.c
libgloss/arm/redboot-crt0.S
libgloss/arm/redboot-syscalls.c
libgloss/arm/swi.h
libgloss/arm/syscall.h
libgloss/arm/syscalls.c
libgloss/arm/trap.S
libgloss/bfin/Makefile.in
libgloss/bfin/aclocal.m4
libgloss/bfin/basiccrt.S
libgloss/bfin/bf522.ld
libgloss/bfin/bf523.ld
libgloss/bfin/bf524.ld
libgloss/bfin/bf525.ld
libgloss/bfin/bf526.ld
libgloss/bfin/bf527.ld
libgloss/bfin/bf531.ld
libgloss/bfin/bf532.ld
libgloss/bfin/bf533.ld
libgloss/bfin/bf534.ld
libgloss/bfin/bf536.ld
libgloss/bfin/bf537.ld
libgloss/bfin/bf538.ld
libgloss/bfin/bf539.ld
libgloss/bfin/bf542.ld
libgloss/bfin/bf544.ld
libgloss/bfin/bf547.ld
libgloss/bfin/bf548.ld
libgloss/bfin/bf549.ld
libgloss/bfin/bf561.ld
libgloss/bfin/bf561a.ld
libgloss/bfin/bf561b.ld
libgloss/bfin/bf561m.ld
libgloss/bfin/bfin-common-mc.ld
libgloss/bfin/bfin-common-sc.ld
libgloss/bfin/configure
libgloss/bfin/configure.in
libgloss/bfin/crt0.S
libgloss/bfin/include/blackfin.h
libgloss/bfin/include/cdefBF522.h
libgloss/bfin/include/cdefBF525.h
libgloss/bfin/include/cdefBF527.h
libgloss/bfin/include/cdefBF52x_base.h
libgloss/bfin/include/cdefBF531.h
libgloss/bfin/include/cdefBF532.h
libgloss/bfin/include/cdefBF533.h
libgloss/bfin/include/cdefBF534.h
libgloss/bfin/include/cdefBF535.h
libgloss/bfin/include/cdefBF536.h
libgloss/bfin/include/cdefBF537.h
libgloss/bfin/include/cdefBF538.h
libgloss/bfin/include/cdefBF539.h
libgloss/bfin/include/cdefBF53x.h
libgloss/bfin/include/cdefBF541.h
libgloss/bfin/include/cdefBF542.h
libgloss/bfin/include/cdefBF544.h
libgloss/bfin/include/cdefBF547.h
libgloss/bfin/include/cdefBF548.h
libgloss/bfin/include/cdefBF549.h
libgloss/bfin/include/cdefBF54x_base.h
libgloss/bfin/include/cdefBF561.h
libgloss/bfin/include/cdef_LPBlackfin.h
libgloss/bfin/include/cdefblackfin.h
libgloss/bfin/include/cplb.h
libgloss/bfin/include/cplbtab.h
libgloss/bfin/include/defBF522.h
libgloss/bfin/include/defBF525.h
libgloss/bfin/include/defBF527.h
libgloss/bfin/include/defBF52x_base.h
libgloss/bfin/include/defBF531.h
libgloss/bfin/include/defBF532.h
libgloss/bfin/include/defBF533.h
libgloss/bfin/include/defBF534.h
libgloss/bfin/include/defBF535.h
libgloss/bfin/include/defBF536.h
libgloss/bfin/include/defBF537.h
libgloss/bfin/include/defBF538.h
libgloss/bfin/include/defBF539.h
libgloss/bfin/include/defBF541.h
libgloss/bfin/include/defBF542.h
libgloss/bfin/include/defBF544.h
libgloss/bfin/include/defBF547.h
libgloss/bfin/include/defBF548.h
libgloss/bfin/include/defBF549.h
libgloss/bfin/include/defBF54x_base.h
libgloss/bfin/include/defBF561.h
libgloss/bfin/include/def_LPBlackfin.h
libgloss/bfin/include/defblackfin.h
libgloss/bfin/include/sys/_adi_platform.h
libgloss/bfin/include/sys/anomaly_macros_rtl.h
libgloss/bfin/include/sys/excause.h
libgloss/bfin/include/sys/exception.h
libgloss/bfin/include/sys/mc_typedef.h
libgloss/bfin/include/sys/platform.h
libgloss/bfin/include/sys/pll.h
libgloss/bfin/include/sysreg.h
libgloss/bfin/syscalls.c
libgloss/close.c
libgloss/config/default.mh
libgloss/config/default.mt
libgloss/config/dos.mh
libgloss/config/mips.mt
libgloss/config/mn10200.mt
libgloss/config/mn10300.mt
libgloss/config/ppc.mh
libgloss/configure
libgloss/configure.in
libgloss/cris/Makefile.in
libgloss/cris/aclocal.m4
libgloss/cris/configure
libgloss/cris/configure.in
libgloss/cris/crt0.S
libgloss/cris/crti.c
libgloss/cris/crtn.c
libgloss/cris/gensyscalls
libgloss/cris/irqtable.S
libgloss/cris/lcrt0.c
libgloss/cris/linunistd.h
libgloss/cris/outbyte.c
libgloss/cris/setup.S
libgloss/crx/Makefile.in
libgloss/crx/_exit.c
libgloss/crx/_getenv.c
libgloss/crx/_rename.c
libgloss/crx/aclocal.m4
libgloss/crx/close.c
libgloss/crx/configure
libgloss/crx/configure.in
libgloss/crx/crt0.S
libgloss/crx/crti.S
libgloss/crx/crtn.S
libgloss/crx/dvz_hndl.c
libgloss/crx/flg_hndl.c
libgloss/crx/fstat.c
libgloss/crx/getpid.c
libgloss/crx/iad_hndl.c
libgloss/crx/intable.c
libgloss/crx/isatty.c
libgloss/crx/kill.c
libgloss/crx/lseek.c
libgloss/crx/open.c
libgloss/crx/putnum.c
libgloss/crx/read.c
libgloss/crx/sbrk.c
libgloss/crx/sim.ld
libgloss/crx/stat.c
libgloss/crx/svc_hndl.c
libgloss/crx/time.c
libgloss/crx/und_hndl.c
libgloss/crx/unlink.c
libgloss/crx/write.c
libgloss/d30v/Makefile.in
libgloss/d30v/aclocal.m4
libgloss/d30v/configure
libgloss/d30v/configure.in
libgloss/d30v/crt0.S
libgloss/d30v/inbyte.c
libgloss/d30v/outbyte.c
libgloss/d30v/syscalls.c
libgloss/debug.c
libgloss/debug.h
libgloss/doc/Makefile.in
libgloss/doc/configure
libgloss/doc/configure.in
libgloss/doc/porting.texi
libgloss/fr30/Makefile.in
libgloss/fr30/aclocal.m4
libgloss/fr30/configure
libgloss/fr30/configure.in
libgloss/fr30/crt0.s
libgloss/fr30/syscalls.c
libgloss/frv/Makefile.in
libgloss/frv/aclocal.m4
libgloss/frv/configure
libgloss/frv/configure.in
libgloss/frv/crt0.S
libgloss/frv/fstat.c
libgloss/frv/getpid.c
libgloss/frv/isatty.c
libgloss/frv/kill.c
libgloss/frv/print.c
libgloss/frv/putnum.c
libgloss/frv/sbrk.c
libgloss/frv/sim-close.S
libgloss/frv/sim-exit.S
libgloss/frv/sim-inbyte.c
libgloss/frv/sim-lseek.S
libgloss/frv/sim-open.S
libgloss/frv/sim-read.S
libgloss/frv/sim-time.c
libgloss/frv/sim-unlink.S
libgloss/frv/sim-write.S
libgloss/frv/stat.c
libgloss/fstat.c
libgloss/getpid.c
libgloss/glue.h
libgloss/hp74x/Makefile.in
libgloss/hp74x/README
libgloss/hp74x/aclocal.m4
libgloss/hp74x/checksum.c
libgloss/hp74x/configure
libgloss/hp74x/configure.in
libgloss/hp74x/crt0.s
libgloss/hp74x/debugger.h
libgloss/hp74x/debugger.s
libgloss/hp74x/diagnose.h
libgloss/hp74x/hppa-defs.h
libgloss/hp74x/hppa.ld
libgloss/hp74x/io.c
libgloss/hp74x/iva_table.h
libgloss/hp74x/iva_table.s
libgloss/hp74x/pa_stub.c
libgloss/hp74x/test.c
libgloss/i386/Makefile.in
libgloss/i386/aclocal.m4
libgloss/i386/configure
libgloss/i386/configure.in
libgloss/i386/cygmon-crt0.S
libgloss/i386/cygmon-gmon.c
libgloss/i386/cygmon-gmon.h
libgloss/i386/cygmon-salib.c
libgloss/i386/cygmon-syscall.h
libgloss/i386/cygmon.ld
libgloss/i960/Makefile.in
libgloss/i960/aclocal.m4
libgloss/i960/asm.h
libgloss/i960/configure
libgloss/i960/configure.in
libgloss/i960/crt0.c
libgloss/i960/mon-read.c
libgloss/i960/mon-syscalls.S
libgloss/i960/mon-write.c
libgloss/i960/mon960.c
libgloss/i960/mon960.ld
libgloss/i960/syscall.h
libgloss/iq2000/Makefile.in
libgloss/iq2000/_exit.c
libgloss/iq2000/access.c
libgloss/iq2000/aclocal.m4
libgloss/iq2000/chmod.c
libgloss/iq2000/chown.c
libgloss/iq2000/close.c
libgloss/iq2000/configure
libgloss/iq2000/configure.in
libgloss/iq2000/creat.c
libgloss/iq2000/crt0.S
libgloss/iq2000/crt1.c
libgloss/iq2000/execv.c
libgloss/iq2000/execve.c
libgloss/iq2000/fork.c
libgloss/iq2000/fstat.c
libgloss/iq2000/getpid.c
libgloss/iq2000/gettime.c
libgloss/iq2000/isatty.c
libgloss/iq2000/kill.c
libgloss/iq2000/lseek.c
libgloss/iq2000/open.c
libgloss/iq2000/pipe.c
libgloss/iq2000/read.c
libgloss/iq2000/sbrk.c
libgloss/iq2000/sim.ld
libgloss/iq2000/stat.c
libgloss/iq2000/test.c
libgloss/iq2000/time.c
libgloss/iq2000/times.c
libgloss/iq2000/trap.c
libgloss/iq2000/trap.h
libgloss/iq2000/unlink.c
libgloss/iq2000/utime.c
libgloss/iq2000/wait.c
libgloss/iq2000/write.c
libgloss/isatty.c
libgloss/kill.c
libgloss/libnosys/Makefile.in
libgloss/libnosys/_exit.c
libgloss/libnosys/acconfig.h
libgloss/libnosys/aclocal.m4
libgloss/libnosys/chown.c
libgloss/libnosys/close.c
libgloss/libnosys/config.h.in
libgloss/libnosys/configure
libgloss/libnosys/configure.in
libgloss/libnosys/environ.c
libgloss/libnosys/errno.c
libgloss/libnosys/execve.c
libgloss/libnosys/fork.c
libgloss/libnosys/fstat.c
libgloss/libnosys/getpid.c
libgloss/libnosys/gettod.c
libgloss/libnosys/isatty.c
libgloss/libnosys/kill.c
libgloss/libnosys/link.c
libgloss/libnosys/lseek.c
libgloss/libnosys/open.c
libgloss/libnosys/read.c
libgloss/libnosys/readlink.c
libgloss/libnosys/sbrk.c
libgloss/libnosys/stat.c
libgloss/libnosys/symlink.c
libgloss/libnosys/times.c
libgloss/libnosys/unlink.c
libgloss/libnosys/wait.c
libgloss/libnosys/warning.h
libgloss/libnosys/write.c
libgloss/lm32/Makefile.in
libgloss/lm32/aclocal.m4
libgloss/lm32/configure
libgloss/lm32/configure.in
libgloss/lm32/crt0.S
libgloss/lm32/isatty.c
libgloss/lm32/scall.S
libgloss/lm32/sim.ld
libgloss/lseek.c
libgloss/m32c/Makefile.in
libgloss/m32c/abort.S
libgloss/m32c/aclocal.m4
libgloss/m32c/argv.S
libgloss/m32c/argvlen.S
libgloss/m32c/chdir.S
libgloss/m32c/chmod.S
libgloss/m32c/close.S
libgloss/m32c/configure
libgloss/m32c/configure.in
libgloss/m32c/crt0.S
libgloss/m32c/crtn.S
libgloss/m32c/exit.S
libgloss/m32c/fstat.S
libgloss/m32c/genscript
libgloss/m32c/getpid.S
libgloss/m32c/gettimeofday.S
libgloss/m32c/heaptop.S
libgloss/m32c/isatty.S
libgloss/m32c/kill.S
libgloss/m32c/link.S
libgloss/m32c/lseek.S
libgloss/m32c/m32c.tmpl
libgloss/m32c/m32csys.h
libgloss/m32c/open.S
libgloss/m32c/read.S
libgloss/m32c/sample.c
libgloss/m32c/sbrk.c
libgloss/m32c/stat.S
libgloss/m32c/time.S
libgloss/m32c/times.S
libgloss/m32c/unlink.S
libgloss/m32c/utime.S
libgloss/m32c/varvects.S
libgloss/m32c/varvects.h
libgloss/m32c/write.S
libgloss/m32r/Makefile.in
libgloss/m32r/aclocal.m4
libgloss/m32r/chmod.c
libgloss/m32r/close.c
libgloss/m32r/configure
libgloss/m32r/configure.in
libgloss/m32r/crt0.S
libgloss/m32r/eit.h
libgloss/m32r/eva-stub.ld
libgloss/m32r/eva.ld
libgloss/m32r/exit.c
libgloss/m32r/fstat.c
libgloss/m32r/getpid.c
libgloss/m32r/isatty.c
libgloss/m32r/kill.c
libgloss/m32r/lseek.c
libgloss/m32r/m32r-lib.c
libgloss/m32r/m32r-stub.c
libgloss/m32r/mon.specs
libgloss/m32r/open.c
libgloss/m32r/raise.c
libgloss/m32r/read.c
libgloss/m32r/sbrk.c
libgloss/m32r/stat.c
libgloss/m32r/trap0.S
libgloss/m32r/trapmon0.c
libgloss/m32r/unlink.c
libgloss/m32r/utime.c
libgloss/m32r/write.c
libgloss/m68hc11/Makefile.in
libgloss/m68hc11/aclocal.m4
libgloss/m68hc11/configure
libgloss/m68hc11/configure.in
libgloss/m68hc11/crt0.S
libgloss/m68hc11/sci-inout.S
libgloss/m68hc11/sim-valid-m68hc11.ld
libgloss/m68hc11/sim-valid-m68hc12.ld
libgloss/m68hc11/syscalls.c
libgloss/m68k/Makefile.in
libgloss/m68k/README
libgloss/m68k/aclocal.m4
libgloss/m68k/asm.h
libgloss/m68k/bcc.ld
libgloss/m68k/cf-crt0.S
libgloss/m68k/cf-crt1.c
libgloss/m68k/cf-exit.c
libgloss/m68k/cf-hosted.S
libgloss/m68k/cf-isrs.c
libgloss/m68k/cf-isv.S
libgloss/m68k/cf-sbrk.c
libgloss/m68k/cf.sc
libgloss/m68k/configure
libgloss/m68k/configure.in
libgloss/m68k/cpu32bug.S
libgloss/m68k/cpu32bug.h
libgloss/m68k/crt0.S
libgloss/m68k/dtor.C
libgloss/m68k/fido-_exit.c
libgloss/m68k/fido-crt0.S
libgloss/m68k/fido-handler.c
libgloss/m68k/fido-hosted.S
libgloss/m68k/fido-sbrk.c
libgloss/m68k/fido.h
libgloss/m68k/fido.sc
libgloss/m68k/fido_profiling.h
libgloss/m68k/idp-inbyte.c
libgloss/m68k/idp-outbyte.c
libgloss/m68k/idp.ld
libgloss/m68k/idpgdb.ld
libgloss/m68k/io-close.c
libgloss/m68k/io-exit.c
libgloss/m68k/io-fstat.c
libgloss/m68k/io-gdb.c
libgloss/m68k/io-gettimeofday.c
libgloss/m68k/io-isatty.c
libgloss/m68k/io-lseek.c
libgloss/m68k/io-open.c
libgloss/m68k/io-read.c
libgloss/m68k/io-rename.c
libgloss/m68k/io-stat.c
libgloss/m68k/io-system.c
libgloss/m68k/io-time.c
libgloss/m68k/io-unlink.c
libgloss/m68k/io-write.c
libgloss/m68k/io.h
libgloss/m68k/leds.c
libgloss/m68k/leds.h
libgloss/m68k/mc68681reg.h
libgloss/m68k/mc68ec.c
libgloss/m68k/mvme-stub.c
libgloss/m68k/mvme.S
libgloss/m68k/mvme135-asm.S
libgloss/m68k/mvme135.ld
libgloss/m68k/mvme162.ld
libgloss/m68k/mvme162lx-asm.S
libgloss/m68k/sbc5204.ld
libgloss/m68k/sbc5206.ld
libgloss/m68k/sim-abort.c
libgloss/m68k/sim-crt0.S
libgloss/m68k/sim-errno.c
libgloss/m68k/sim-funcs.c
libgloss/m68k/sim-inbyte.c
libgloss/m68k/sim-print.c
libgloss/m68k/sim-sbrk.c
libgloss/m68k/sim.ld
libgloss/m68k/simulator.S
libgloss/m68k/test.c
libgloss/mcore/Makefile.in
libgloss/mcore/aclocal.m4
libgloss/mcore/close.c
libgloss/mcore/cmb-exit.c
libgloss/mcore/cmb-inbyte.c
libgloss/mcore/cmb-outbyte.c
libgloss/mcore/configure
libgloss/mcore/configure.in
libgloss/mcore/crt0.S
libgloss/mcore/elf-cmb.ld
libgloss/mcore/elf-cmb.specs
libgloss/mcore/fstat.c
libgloss/mcore/getpid.c
libgloss/mcore/kill.c
libgloss/mcore/lseek.c
libgloss/mcore/open.c
libgloss/mcore/pe-cmb.ld
libgloss/mcore/pe-cmb.specs
libgloss/mcore/print.c
libgloss/mcore/putnum.c
libgloss/mcore/raise.c
libgloss/mcore/read.c
libgloss/mcore/sbrk.c
libgloss/mcore/stat.c
libgloss/mcore/syscalls.S
libgloss/mcore/unlink.c
libgloss/mcore/write.c
libgloss/mep/Makefile.in
libgloss/mep/aclocal.m4
libgloss/mep/configure
libgloss/mep/configure.in
libgloss/mep/crt0.S
libgloss/mep/crtn.S
libgloss/mep/default.ld
libgloss/mep/fmax.ld
libgloss/mep/gcov-io.h
libgloss/mep/gmap_default.ld
libgloss/mep/h_reset.c
libgloss/mep/handlers.c
libgloss/mep/isatty.c
libgloss/mep/mep-bb.c
libgloss/mep/mep-gmon.c
libgloss/mep/min.ld
libgloss/mep/read.c
libgloss/mep/sbrk.c
libgloss/mep/sdram-crt0.S
libgloss/mep/sim-crt0.S
libgloss/mep/sim-crtn.S
libgloss/mep/simnovec-crt0.S
libgloss/mep/simple.ld
libgloss/mep/simsdram-crt0.S
libgloss/mep/syscalls.S
libgloss/mep/write.c
libgloss/mips/Makefile.in
libgloss/mips/aclocal.m4
libgloss/mips/array-io.c
libgloss/mips/array.ld
libgloss/mips/cfe.c
libgloss/mips/cfe.ld
libgloss/mips/cfe_api.c
libgloss/mips/cfe_api.h
libgloss/mips/cfe_api_int.h
libgloss/mips/cfe_error.h
libgloss/mips/cfe_mem.c
libgloss/mips/cma101.c
libgloss/mips/configure
libgloss/mips/configure.in
libgloss/mips/crt0.S
libgloss/mips/crt0_cfe.S
libgloss/mips/crt0_cygmon.S
libgloss/mips/cygmon.c
libgloss/mips/ddb-kseg0.ld
libgloss/mips/ddb.ld
libgloss/mips/dtor.C
libgloss/mips/dve.ld
libgloss/mips/dvemon.c
libgloss/mips/entry.S
libgloss/mips/idt.ld
libgloss/mips/idt32.ld
libgloss/mips/idt64.ld
libgloss/mips/idtecoff.ld
libgloss/mips/idtmon.S
libgloss/mips/jmr3904-io.c
libgloss/mips/jmr3904app-java.ld
libgloss/mips/jmr3904app.ld
libgloss/mips/jmr3904dram-java.ld
libgloss/mips/jmr3904dram.ld
libgloss/mips/lsi.ld
libgloss/mips/lsipmon.S
libgloss/mips/nullmon.c
libgloss/mips/nullmon.ld
libgloss/mips/pmon.S
libgloss/mips/pmon.ld
libgloss/mips/regs.S
libgloss/mips/syscalls.c
libgloss/mips/test.c
libgloss/mips/vr4300.S
libgloss/mips/vr5xxx.S
libgloss/mn10200/Makefile.in
libgloss/mn10200/_exit.c
libgloss/mn10200/access.c
libgloss/mn10200/aclocal.m4
libgloss/mn10200/chmod.c
libgloss/mn10200/chown.c
libgloss/mn10200/close.c
libgloss/mn10200/configure
libgloss/mn10200/configure.in
libgloss/mn10200/creat.c
libgloss/mn10200/crt0.S
libgloss/mn10200/crt1.c
libgloss/mn10200/eval.ld
libgloss/mn10200/execv.c
libgloss/mn10200/execve.c
libgloss/mn10200/fork.c
libgloss/mn10200/fstat.c
libgloss/mn10200/getpid.c
libgloss/mn10200/gettime.c
libgloss/mn10200/isatty.c
libgloss/mn10200/kill.c
libgloss/mn10200/lseek.c
libgloss/mn10200/open.c
libgloss/mn10200/pipe.c
libgloss/mn10200/read.c
libgloss/mn10200/sbrk.c
libgloss/mn10200/sim.ld
libgloss/mn10200/stat.c
libgloss/mn10200/test.c
libgloss/mn10200/time.c
libgloss/mn10200/times.c
libgloss/mn10200/trap.S
libgloss/mn10200/trap.h
libgloss/mn10200/unlink.c
libgloss/mn10200/utime.c
libgloss/mn10200/wait.c
libgloss/mn10200/write.c
libgloss/mn10300/Makefile.in
libgloss/mn10300/_exit.c
libgloss/mn10300/access.c
libgloss/mn10300/aclocal.m4
libgloss/mn10300/asb2303.ld
libgloss/mn10300/asb2305.ld
libgloss/mn10300/chmod.c
libgloss/mn10300/chown.c
libgloss/mn10300/close.c
libgloss/mn10300/configure
libgloss/mn10300/configure.in
libgloss/mn10300/creat.c
libgloss/mn10300/crt0-eval.S
libgloss/mn10300/crt0.S
libgloss/mn10300/crt0_cygmon.S
libgloss/mn10300/crt0_redboot.S
libgloss/mn10300/crt1.c
libgloss/mn10300/cygmon.c
libgloss/mn10300/eval.ld
libgloss/mn10300/execv.c
libgloss/mn10300/execve.c
libgloss/mn10300/fork.c
libgloss/mn10300/fstat.c
libgloss/mn10300/getpid.c
libgloss/mn10300/gettime.c
libgloss/mn10300/isatty.c
libgloss/mn10300/kill.c
libgloss/mn10300/lseek.c
libgloss/mn10300/open.c
libgloss/mn10300/pipe.c
libgloss/mn10300/read.c
libgloss/mn10300/sbrk.c
libgloss/mn10300/sim.ld
libgloss/mn10300/stat.c
libgloss/mn10300/test.c
libgloss/mn10300/time.c
libgloss/mn10300/times.c
libgloss/mn10300/trap.S
libgloss/mn10300/trap.h
libgloss/mn10300/unlink.c
libgloss/mn10300/utime.c
libgloss/mn10300/wait.c
libgloss/mn10300/write.c
libgloss/moxie/Makefile.in
libgloss/moxie/aclocal.m4
libgloss/moxie/configure
libgloss/moxie/configure.in
libgloss/moxie/crt0.S
libgloss/moxie/fstat.c
libgloss/moxie/getpid.c
libgloss/moxie/isatty.c
libgloss/moxie/kill.c
libgloss/moxie/moxie-elf-common.ld
libgloss/moxie/print.c
libgloss/moxie/putnum.c
libgloss/moxie/qemu-time.c
libgloss/moxie/qemu-write.c
libgloss/moxie/qemu.ld
libgloss/moxie/sbrk.c
libgloss/moxie/sim-close.S
libgloss/moxie/sim-exit.S
libgloss/moxie/sim-inbyte.c
libgloss/moxie/sim-lseek.S
libgloss/moxie/sim-lseek.c
libgloss/moxie/sim-open.S
libgloss/moxie/sim-read.S
libgloss/moxie/sim-time.c
libgloss/moxie/sim-unlink.S
libgloss/moxie/sim-write.S
libgloss/moxie/sim.ld
libgloss/moxie/stat.c
libgloss/mt/16-002.ld
libgloss/mt/16-003.ld
libgloss/mt/64-001.ld
libgloss/mt/Makefile.in
libgloss/mt/access.c
libgloss/mt/aclocal.m4
libgloss/mt/chmod.c
libgloss/mt/close.c
libgloss/mt/configure
libgloss/mt/configure.in
libgloss/mt/crt0-16-002.S
libgloss/mt/crt0-16-003.S
libgloss/mt/crt0-64-001.S
libgloss/mt/crt0-ms2.S
libgloss/mt/crt0.S
libgloss/mt/exit-16-002.c
libgloss/mt/exit-16-003.c
libgloss/mt/exit-64-001.c
libgloss/mt/exit-ms2.c
libgloss/mt/exit.c
libgloss/mt/fstat.c
libgloss/mt/getpid.c
libgloss/mt/gettime.c
libgloss/mt/isatty.c
libgloss/mt/kill.c
libgloss/mt/lseek.c
libgloss/mt/ms2.ld
libgloss/mt/open.c
libgloss/mt/read.c
libgloss/mt/sbrk.c
libgloss/mt/startup-16-002.S
libgloss/mt/startup-16-003.S
libgloss/mt/startup-64-001.S
libgloss/mt/startup-ms2.S
libgloss/mt/stat.c
libgloss/mt/time.c
libgloss/mt/times.c
libgloss/mt/trap.S
libgloss/mt/trap.h
libgloss/mt/unlink.c
libgloss/mt/utime.c
libgloss/mt/write.c
libgloss/open.c
libgloss/pa/Makefile.in
libgloss/pa/README
libgloss/pa/aclocal.m4
libgloss/pa/configure
libgloss/pa/configure.in
libgloss/pa/crt0.S
libgloss/pa/hp-milli.s
libgloss/pa/op50n-io.S
libgloss/pa/op50n.h
libgloss/pa/op50n.ld
libgloss/pa/op50nled.c
libgloss/pa/setjmp.S
libgloss/pa/test.c
libgloss/pa/w89k-io.c
libgloss/pa/w89k.h
libgloss/pa/w89k.ld
libgloss/print.c
libgloss/putnum.c
libgloss/read.c
libgloss/rs6000/Makefile.in
libgloss/rs6000/aclocal.m4
libgloss/rs6000/ads-exit.S
libgloss/rs6000/ads-io.c
libgloss/rs6000/ads.ld
libgloss/rs6000/configure
libgloss/rs6000/configure.in
libgloss/rs6000/crt0.S
libgloss/rs6000/mbx-exit.c
libgloss/rs6000/mbx-inbyte.c
libgloss/rs6000/mbx-outbyte.c
libgloss/rs6000/mbx-print.c
libgloss/rs6000/mbx.ld
libgloss/rs6000/mbx.specs
libgloss/rs6000/mcount.S
libgloss/rs6000/mvme-errno.c
libgloss/rs6000/mvme-exit.S
libgloss/rs6000/mvme-inbyte.S
libgloss/rs6000/mvme-outbyte.S
libgloss/rs6000/mvme-print.c
libgloss/rs6000/mvme-read.c
libgloss/rs6000/sim-abort.c
libgloss/rs6000/sim-crt0.S
libgloss/rs6000/sim-errno.c
libgloss/rs6000/sim-getrusage.S
libgloss/rs6000/sim-inbyte.c
libgloss/rs6000/sim-print.c
libgloss/rs6000/sim-sbrk.c
libgloss/rs6000/simulator.S
libgloss/rs6000/sol-cfuncs.c
libgloss/rs6000/sol-syscall.S
libgloss/rs6000/test.c
libgloss/rs6000/xil-crt0.S
libgloss/rs6000/xilinx.ld
libgloss/rs6000/xilinx440.ld
libgloss/rs6000/yellowknife.ld
libgloss/sbrk.c
libgloss/sh/sh1lcevb.ld
libgloss/sh/sh2lcevb.ld
libgloss/sh/sh3bb.ld
libgloss/sh/sh3lcevb.ld
libgloss/sparc/Makefile.in
libgloss/sparc/aclocal.m4
libgloss/sparc/asm.h
libgloss/sparc/cache.c
libgloss/sparc/configure
libgloss/sparc/configure.in
libgloss/sparc/crt0-701.S
libgloss/sparc/crt0.S
libgloss/sparc/cygmon-crt0.S
libgloss/sparc/cygmon-salib.c
libgloss/sparc/cygmon-sparc64-ld.src
libgloss/sparc/cygmon.ld.src
libgloss/sparc/dtor.C
libgloss/sparc/elfsim.ld
libgloss/sparc/erc32-crt0.S
libgloss/sparc/erc32-io.c
libgloss/sparc/erc32-stub.c
libgloss/sparc/erc32.ld
libgloss/sparc/ex930.ld
libgloss/sparc/ex931.ld
libgloss/sparc/ex934.ld
libgloss/sparc/fixctors.c
libgloss/sparc/libsys/Makefile.in
libgloss/sparc/libsys/_exit.S
libgloss/sparc/libsys/aclocal.m4
libgloss/sparc/libsys/cerror.S
libgloss/sparc/libsys/configure
libgloss/sparc/libsys/configure.in
libgloss/sparc/libsys/isatty.c
libgloss/sparc/libsys/libsys-crt0.S
libgloss/sparc/libsys/sbrk.S
libgloss/sparc/libsys/syscall.h
libgloss/sparc/libsys/syscallasm.h
libgloss/sparc/libsys/template.S
libgloss/sparc/libsys/template_r.S
libgloss/sparc/salib-701.c
libgloss/sparc/salib.c
libgloss/sparc/slite.h
libgloss/sparc/sparc-stub.c
libgloss/sparc/sparc86x.ld
libgloss/sparc/sparcl-stub.c
libgloss/sparc/sparclet-stub.c
libgloss/sparc/sparclite.h
libgloss/sparc/sysc-701.c
libgloss/sparc/syscalls.c
libgloss/sparc/test.c
libgloss/sparc/traps.S
libgloss/sparc/tsc701.ld
libgloss/spu/Makefile.in
libgloss/spu/access.c
libgloss/spu/aclocal.m4
libgloss/spu/chdir.c
libgloss/spu/chmod.c
libgloss/spu/chown.c
libgloss/spu/close.c
libgloss/spu/configure
libgloss/spu/configure.in
libgloss/spu/conv_stat.c
libgloss/spu/crt0.S
libgloss/spu/crti.S
libgloss/spu/crtn.S
libgloss/spu/dirfuncs.c
libgloss/spu/dup.c
libgloss/spu/dup2.c
libgloss/spu/exit.c
libgloss/spu/fchdir.c
libgloss/spu/fchmod.c
libgloss/spu/fchown.c
libgloss/spu/fdatasync.c
libgloss/spu/fstat.c
libgloss/spu/fsync.c
libgloss/spu/ftruncate.c
libgloss/spu/getcwd.c
libgloss/spu/getitimer.c
libgloss/spu/getpagesize.c
libgloss/spu/getpid.c
libgloss/spu/gettimeofday.c
libgloss/spu/isatty.c
libgloss/spu/jsre.h
libgloss/spu/kill.c
libgloss/spu/lchown.c
libgloss/spu/link.c
libgloss/spu/linux_getpid.c
libgloss/spu/linux_gettid.c
libgloss/spu/linux_syscalls.c
libgloss/spu/lockf.c
libgloss/spu/lseek.c
libgloss/spu/lstat.c
libgloss/spu/mkdir.c
libgloss/spu/mknod.c
libgloss/spu/mkstemp.c
libgloss/spu/mktemp.c
libgloss/spu/mmap_eaddr.c
libgloss/spu/mremap_eaddr.c
libgloss/spu/msync_eaddr.c
libgloss/spu/munmap_eaddr.c
libgloss/spu/nanosleep.c
libgloss/spu/open.c
libgloss/spu/pread.c
libgloss/spu/pwrite.c
libgloss/spu/read.c
libgloss/spu/readlink.c
libgloss/spu/readv.c
libgloss/spu/rmdir.c
libgloss/spu/sbrk.c
libgloss/spu/sched_yield.c
libgloss/spu/setitimer.c
libgloss/spu/shm_open.c
libgloss/spu/shm_unlink.c
libgloss/spu/stat.c
libgloss/spu/symlink.c
libgloss/spu/sync.c
libgloss/spu/syscalls.c
libgloss/spu/times.c
libgloss/spu/truncate.c
libgloss/spu/umask.c
libgloss/spu/unlink.c
libgloss/spu/utime.c
libgloss/spu/utimes.c
libgloss/spu/write.c
libgloss/spu/writev.c
libgloss/stat.c
libgloss/syscall.h
libgloss/testsuite/Makefile.in
libgloss/testsuite/config/hppa.mt
libgloss/testsuite/config/m68k.mt
libgloss/testsuite/config/mips.mt
libgloss/testsuite/config/support.c
libgloss/testsuite/configure.in
libgloss/testsuite/lib/libgloss.exp
libgloss/testsuite/libgloss.all/.gdbinit
libgloss/testsuite/libgloss.all/Makefile.in
libgloss/testsuite/libgloss.all/array.c
libgloss/testsuite/libgloss.all/configure.in
libgloss/testsuite/libgloss.all/div.c
libgloss/testsuite/libgloss.all/double.c
libgloss/testsuite/libgloss.all/float.c
libgloss/testsuite/libgloss.all/func.c
libgloss/testsuite/libgloss.all/io.c
libgloss/testsuite/libgloss.all/math.c
libgloss/testsuite/libgloss.all/memory.c
libgloss/testsuite/libgloss.all/misc.c
libgloss/testsuite/libgloss.all/printf.c
libgloss/testsuite/libgloss.all/struct.c
libgloss/testsuite/libgloss.all/varargs.c
libgloss/testsuite/libgloss.all/varargs2.c
libgloss/unlink.c
libgloss/v850/sys/syscall.h
libgloss/wince/Makefile.am
libgloss/wince/Makefile.in
libgloss/wince/aclocal.m4
libgloss/wince/configure
libgloss/wince/configure.in
libgloss/write.c
libgloss/xstormy16/Makefile.in
libgloss/xstormy16/aclocal.m4
libgloss/xstormy16/close.c
libgloss/xstormy16/configure
libgloss/xstormy16/configure.in
libgloss/xstormy16/crt0.s
libgloss/xstormy16/crt0_stub.s
libgloss/xstormy16/crti.s
libgloss/xstormy16/crtn.s
libgloss/xstormy16/eva_app.c
libgloss/xstormy16/eva_app.ld
libgloss/xstormy16/eva_stub.ld
libgloss/xstormy16/fstat.c
libgloss/xstormy16/getpid.c
libgloss/xstormy16/isatty.c
libgloss/xstormy16/kill.c
libgloss/xstormy16/lseek.c
libgloss/xstormy16/open.c
libgloss/xstormy16/sim_high.ld
libgloss/xstormy16/sim_malloc_start.s
libgloss/xstormy16/sim_rom.ld
libgloss/xstormy16/stat.c
libgloss/xstormy16/syscalls.S
libgloss/xstormy16/syscalls.m4
libgloss/xstormy16/unlink.c
libgloss/xstormy16/xstormy16_stub.c
newlib/ChangeLog
newlib/HOWTO
newlib/MAINTAINERS
newlib/Makefile.am
newlib/Makefile.in
newlib/Makefile.shared
newlib/NEWS
newlib/README
newlib/acconfig.h
newlib/acinclude.m4
newlib/aclocal.m4
newlib/configure
newlib/configure.host
newlib/configure.in
newlib/confsubdir.m4
newlib/doc/Makefile.am
newlib/doc/Makefile.in
newlib/doc/aclocal.m4
newlib/doc/ansidecl.h
newlib/doc/configure
newlib/doc/configure.in
newlib/doc/doc.str
newlib/doc/makedoc.c
newlib/iconvdata/EUC-JP.irreversible
newlib/iconvdata/Makefile.am
newlib/iconvdata/Makefile.in
newlib/iconvdata/SJIS.irreversible
newlib/iconvdata/aclocal.m4
newlib/iconvdata/configure
newlib/iconvdata/configure.in
newlib/iconvdata/dummy.c
newlib/iconvdata/euc-jp.c
newlib/iconvdata/gconv-modules
newlib/iconvdata/jis0201.c
newlib/iconvdata/jis0201.h
newlib/iconvdata/jis0208.c
newlib/iconvdata/jis0208.h
newlib/iconvdata/jis0212.c
newlib/iconvdata/jis0212.h
newlib/iconvdata/sjis.c
newlib/libc/Makefile.am
newlib/libc/Makefile.in
newlib/libc/aclocal.m4
newlib/libc/argz/Makefile.am
newlib/libc/argz/Makefile.in
newlib/libc/argz/argz_add.c
newlib/libc/argz/argz_add_sep.c
newlib/libc/argz/argz_append.c
newlib/libc/argz/argz_count.c
newlib/libc/argz/argz_create.c
newlib/libc/argz/argz_create_sep.c
newlib/libc/argz/argz_delete.c
newlib/libc/argz/argz_extract.c
newlib/libc/argz/argz_insert.c
newlib/libc/argz/argz_next.c
newlib/libc/argz/argz_replace.c
newlib/libc/argz/argz_stringify.c
newlib/libc/argz/buf_findstr.c
newlib/libc/argz/buf_findstr.h
newlib/libc/argz/dummy.c
newlib/libc/argz/envz_add.c
newlib/libc/argz/envz_entry.c
newlib/libc/argz/envz_get.c
newlib/libc/argz/envz_merge.c
newlib/libc/argz/envz_remove.c
newlib/libc/argz/envz_strip.c
newlib/libc/configure
newlib/libc/configure.in
newlib/libc/ctype/Makefile.am
newlib/libc/ctype/Makefile.in
newlib/libc/ctype/ctype.tex
newlib/libc/ctype/ctype_.c
newlib/libc/ctype/ctype_cp.h
newlib/libc/ctype/ctype_iso.h
newlib/libc/ctype/isalnum.c
newlib/libc/ctype/isalpha.c
newlib/libc/ctype/isascii.c
newlib/libc/ctype/isblank.c
newlib/libc/ctype/iscntrl.c
newlib/libc/ctype/isdigit.c
newlib/libc/ctype/islower.c
newlib/libc/ctype/isprint.c
newlib/libc/ctype/ispunct.c
newlib/libc/ctype/isspace.c
newlib/libc/ctype/isupper.c
newlib/libc/ctype/iswalnum.c
newlib/libc/ctype/iswalpha.c
newlib/libc/ctype/iswblank.c
newlib/libc/ctype/iswcntrl.c
newlib/libc/ctype/iswctype.c
newlib/libc/ctype/iswdigit.c
newlib/libc/ctype/iswgraph.c
newlib/libc/ctype/iswlower.c
newlib/libc/ctype/iswprint.c
newlib/libc/ctype/iswpunct.c
newlib/libc/ctype/iswspace.c
newlib/libc/ctype/iswupper.c
newlib/libc/ctype/iswxdigit.c
newlib/libc/ctype/isxdigit.c
newlib/libc/ctype/jp2uc.c
newlib/libc/ctype/jp2uc.h
newlib/libc/ctype/local.h
newlib/libc/ctype/toascii.c
newlib/libc/ctype/tolower.c
newlib/libc/ctype/toupper.c
newlib/libc/ctype/towctrans.c
newlib/libc/ctype/towlower.c
newlib/libc/ctype/towupper.c
newlib/libc/ctype/utf8alpha.h
newlib/libc/ctype/utf8print.h
newlib/libc/ctype/utf8punct.h
newlib/libc/ctype/wctrans.c
newlib/libc/ctype/wctype.c
newlib/libc/errno/Makefile.am
newlib/libc/errno/Makefile.in
newlib/libc/errno/errno.c
newlib/libc/iconv/Makefile.am
newlib/libc/iconv/Makefile.in
newlib/libc/iconv/ccs/Makefile.am
newlib/libc/iconv/ccs/Makefile.in
newlib/libc/iconv/ccs/big5.c
newlib/libc/iconv/ccs/binary/Makefile.am
newlib/libc/iconv/ccs/binary/Makefile.in
newlib/libc/iconv/ccs/binary/big5.cct
newlib/libc/iconv/ccs/binary/cns11643_plane1.cct
newlib/libc/iconv/ccs/binary/cns11643_plane14.cct
newlib/libc/iconv/ccs/binary/cns11643_plane2.cct
newlib/libc/iconv/ccs/binary/cp775.cct
newlib/libc/iconv/ccs/binary/cp850.cct
newlib/libc/iconv/ccs/binary/cp852.cct
newlib/libc/iconv/ccs/binary/cp855.cct
newlib/libc/iconv/ccs/binary/cp866.cct
newlib/libc/iconv/ccs/binary/iso_8859_1.cct
newlib/libc/iconv/ccs/binary/iso_8859_10.cct
newlib/libc/iconv/ccs/binary/iso_8859_11.cct
newlib/libc/iconv/ccs/binary/iso_8859_13.cct
newlib/libc/iconv/ccs/binary/iso_8859_14.cct
newlib/libc/iconv/ccs/binary/iso_8859_15.cct
newlib/libc/iconv/ccs/binary/iso_8859_2.cct
newlib/libc/iconv/ccs/binary/iso_8859_3.cct
newlib/libc/iconv/ccs/binary/iso_8859_4.cct
newlib/libc/iconv/ccs/binary/iso_8859_5.cct
newlib/libc/iconv/ccs/binary/iso_8859_6.cct
newlib/libc/iconv/ccs/binary/iso_8859_7.cct
newlib/libc/iconv/ccs/binary/iso_8859_8.cct
newlib/libc/iconv/ccs/binary/iso_8859_9.cct
newlib/libc/iconv/ccs/binary/iso_ir_111.cct
newlib/libc/iconv/ccs/binary/jis_x0201_1976.cct
newlib/libc/iconv/ccs/binary/jis_x0208_1990.cct
newlib/libc/iconv/ccs/binary/jis_x0212_1990.cct
newlib/libc/iconv/ccs/binary/koi8_r.cct
newlib/libc/iconv/ccs/binary/koi8_ru.cct
newlib/libc/iconv/ccs/binary/koi8_u.cct
newlib/libc/iconv/ccs/binary/koi8_uni.cct
newlib/libc/iconv/ccs/binary/ksx1001.cct
newlib/libc/iconv/ccs/binary/win_1250.cct
newlib/libc/iconv/ccs/binary/win_1251.cct
newlib/libc/iconv/ccs/binary/win_1252.cct
newlib/libc/iconv/ccs/binary/win_1253.cct
newlib/libc/iconv/ccs/binary/win_1254.cct
newlib/libc/iconv/ccs/binary/win_1255.cct
newlib/libc/iconv/ccs/binary/win_1256.cct
newlib/libc/iconv/ccs/binary/win_1257.cct
newlib/libc/iconv/ccs/binary/win_1258.cct
newlib/libc/iconv/ccs/ccs.h
newlib/libc/iconv/ccs/ccsbi.c
newlib/libc/iconv/ccs/ccsbi.h
newlib/libc/iconv/ccs/ccsnames.h
newlib/libc/iconv/ccs/cns11643_plane1.c
newlib/libc/iconv/ccs/cns11643_plane14.c
newlib/libc/iconv/ccs/cns11643_plane2.c
newlib/libc/iconv/ccs/cp775.c
newlib/libc/iconv/ccs/cp850.c
newlib/libc/iconv/ccs/cp852.c
newlib/libc/iconv/ccs/cp855.c
newlib/libc/iconv/ccs/cp866.c
newlib/libc/iconv/ccs/iso_8859_1.c
newlib/libc/iconv/ccs/iso_8859_10.c
newlib/libc/iconv/ccs/iso_8859_11.c
newlib/libc/iconv/ccs/iso_8859_13.c
newlib/libc/iconv/ccs/iso_8859_14.c
newlib/libc/iconv/ccs/iso_8859_15.c
newlib/libc/iconv/ccs/iso_8859_2.c
newlib/libc/iconv/ccs/iso_8859_3.c
newlib/libc/iconv/ccs/iso_8859_4.c
newlib/libc/iconv/ccs/iso_8859_5.c
newlib/libc/iconv/ccs/iso_8859_6.c
newlib/libc/iconv/ccs/iso_8859_7.c
newlib/libc/iconv/ccs/iso_8859_8.c
newlib/libc/iconv/ccs/iso_8859_9.c
newlib/libc/iconv/ccs/iso_ir_111.c
newlib/libc/iconv/ccs/jis_x0201_1976.c
newlib/libc/iconv/ccs/jis_x0208_1990.c
newlib/libc/iconv/ccs/jis_x0212_1990.c
newlib/libc/iconv/ccs/koi8_r.c
newlib/libc/iconv/ccs/koi8_ru.c
newlib/libc/iconv/ccs/koi8_u.c
newlib/libc/iconv/ccs/koi8_uni.c
newlib/libc/iconv/ccs/ksx1001.c
newlib/libc/iconv/ccs/mktbl.pl
newlib/libc/iconv/ccs/win_1250.c
newlib/libc/iconv/ccs/win_1251.c
newlib/libc/iconv/ccs/win_1252.c
newlib/libc/iconv/ccs/win_1253.c
newlib/libc/iconv/ccs/win_1254.c
newlib/libc/iconv/ccs/win_1255.c
newlib/libc/iconv/ccs/win_1256.c
newlib/libc/iconv/ccs/win_1257.c
newlib/libc/iconv/ccs/win_1258.c
newlib/libc/iconv/ces/Makefile.am
newlib/libc/iconv/ces/Makefile.in
newlib/libc/iconv/ces/cesbi.c
newlib/libc/iconv/ces/cesbi.h
newlib/libc/iconv/ces/cesdeps.h
newlib/libc/iconv/ces/euc.c
newlib/libc/iconv/ces/mkdeps.pl
newlib/libc/iconv/ces/table-pcs.c
newlib/libc/iconv/ces/table.c
newlib/libc/iconv/ces/ucs-2-internal.c
newlib/libc/iconv/ces/ucs-2.c
newlib/libc/iconv/ces/ucs-4-internal.c
newlib/libc/iconv/ces/ucs-4.c
newlib/libc/iconv/ces/us-ascii.c
newlib/libc/iconv/ces/utf-16.c
newlib/libc/iconv/ces/utf-8.c
newlib/libc/iconv/encoding.aliases
newlib/libc/iconv/iconv.tex
newlib/libc/iconv/lib/Makefile.am
newlib/libc/iconv/lib/Makefile.in
newlib/libc/iconv/lib/aliasesbi.c
newlib/libc/iconv/lib/aliasesi.c
newlib/libc/iconv/lib/conv.h
newlib/libc/iconv/lib/encnames.h
newlib/libc/iconv/lib/encoding.deps
newlib/libc/iconv/lib/endian.h
newlib/libc/iconv/lib/iconv.c
newlib/libc/iconv/lib/iconvnls.c
newlib/libc/iconv/lib/iconvnls.h
newlib/libc/iconv/lib/local.h
newlib/libc/iconv/lib/nullconv.c
newlib/libc/iconv/lib/ucsconv.c
newlib/libc/iconv/lib/ucsconv.h
newlib/libc/include/_ansi.h
newlib/libc/include/_syslist.h
newlib/libc/include/alloca.h
newlib/libc/include/ar.h
newlib/libc/include/argz.h
newlib/libc/include/assert.h
newlib/libc/include/ctype.h
newlib/libc/include/dirent.h
newlib/libc/include/envlock.h
newlib/libc/include/envz.h
newlib/libc/include/errno.h
newlib/libc/include/fastmath.h
newlib/libc/include/fcntl.h
newlib/libc/include/fnmatch.h
newlib/libc/include/getopt.h
newlib/libc/include/glob.h
newlib/libc/include/grp.h
newlib/libc/include/iconv.h
newlib/libc/include/ieeefp.h
newlib/libc/include/inttypes.h
newlib/libc/include/langinfo.h
newlib/libc/include/libgen.h
newlib/libc/include/limits.h
newlib/libc/include/locale.h
newlib/libc/include/machine/_default_types.h
newlib/libc/include/machine/_types.h
newlib/libc/include/machine/ansi.h
newlib/libc/include/machine/endian.h
newlib/libc/include/machine/fastmath.h
newlib/libc/include/machine/ieeefp.h
newlib/libc/include/machine/malloc.h
newlib/libc/include/machine/param.h
newlib/libc/include/machine/setjmp-dj.h
newlib/libc/include/machine/setjmp.h
newlib/libc/include/machine/stdlib.h
newlib/libc/include/machine/termios.h
newlib/libc/include/machine/time.h
newlib/libc/include/machine/types.h
newlib/libc/include/malloc.h
newlib/libc/include/math.h
newlib/libc/include/newlib.h
newlib/libc/include/paths.h
newlib/libc/include/process.h
newlib/libc/include/pthread.h
newlib/libc/include/pwd.h
newlib/libc/include/reent.h
newlib/libc/include/regdef.h
newlib/libc/include/regex.h
newlib/libc/include/sched.h
newlib/libc/include/search.h
newlib/libc/include/setjmp.h
newlib/libc/include/signal.h
newlib/libc/include/stdint.h
newlib/libc/include/stdio.h
newlib/libc/include/stdlib.h
newlib/libc/include/string.h
newlib/libc/include/sys/_default_fcntl.h
newlib/libc/include/sys/_types.h
newlib/libc/include/sys/cdefs.h
newlib/libc/include/sys/config.h
newlib/libc/include/sys/custom_file.h
newlib/libc/include/sys/dirent.h
newlib/libc/include/sys/errno.h
newlib/libc/include/sys/fcntl.h
newlib/libc/include/sys/features.h
newlib/libc/include/sys/file.h
newlib/libc/include/sys/iconvnls.h
newlib/libc/include/sys/lock.h
newlib/libc/include/sys/param.h
newlib/libc/include/sys/queue.h
newlib/libc/include/sys/reent.h
newlib/libc/include/sys/resource.h
newlib/libc/include/sys/sched.h
newlib/libc/include/sys/signal.h
newlib/libc/include/sys/stat.h
newlib/libc/include/sys/stdio.h
newlib/libc/include/sys/string.h
newlib/libc/include/sys/syslimits.h
newlib/libc/include/sys/time.h
newlib/libc/include/sys/timeb.h
newlib/libc/include/sys/times.h
newlib/libc/include/sys/types.h
newlib/libc/include/sys/unistd.h
newlib/libc/include/sys/utime.h
newlib/libc/include/sys/wait.h
newlib/libc/include/tar.h
newlib/libc/include/termios.h
newlib/libc/include/time.h
newlib/libc/include/unctrl.h
newlib/libc/include/unistd.h
newlib/libc/include/utime.h
newlib/libc/include/utmp.h
newlib/libc/include/wchar.h
newlib/libc/include/wctype.h
newlib/libc/include/wordexp.h
newlib/libc/libc.texinfo
newlib/libc/locale/Makefile.am
newlib/libc/locale/Makefile.in
newlib/libc/locale/fix_grouping.c
newlib/libc/locale/ldpart.c
newlib/libc/locale/ldpart.h
newlib/libc/locale/lmessages.c
newlib/libc/locale/lmessages.h
newlib/libc/locale/lmonetary.c
newlib/libc/locale/lmonetary.h
newlib/libc/locale/lnumeric.c
newlib/libc/locale/lnumeric.h
newlib/libc/locale/locale.c
newlib/libc/locale/locale.tex
newlib/libc/locale/nl_langinfo.3
newlib/libc/locale/nl_langinfo.c
newlib/libc/locale/setlocale.h
newlib/libc/locale/timelocal.c
newlib/libc/locale/timelocal.h
newlib/libc/machine/Makefile.am
newlib/libc/machine/Makefile.in
newlib/libc/machine/a29k/Makefile.am
newlib/libc/machine/a29k/Makefile.in
newlib/libc/machine/a29k/aclocal.m4
newlib/libc/machine/a29k/configure
newlib/libc/machine/a29k/configure.in
newlib/libc/machine/aclocal.m4
newlib/libc/machine/arm/Makefile.am
newlib/libc/machine/arm/Makefile.in
newlib/libc/machine/arm/access.c
newlib/libc/machine/arm/aclocal.m4
newlib/libc/machine/arm/arm_asm.h
newlib/libc/machine/arm/configure
newlib/libc/machine/arm/configure.in
newlib/libc/machine/arm/machine/endian.h
newlib/libc/machine/arm/machine/param.h
newlib/libc/machine/arm/setjmp.S
newlib/libc/machine/arm/strcmp.c
newlib/libc/machine/arm/strcpy.c
newlib/libc/machine/arm/strlen.c
newlib/libc/machine/bfin/Makefile.am
newlib/libc/machine/bfin/Makefile.in
newlib/libc/machine/bfin/aclocal.m4
newlib/libc/machine/bfin/configure
newlib/libc/machine/bfin/configure.in
newlib/libc/machine/bfin/longjmp.S
newlib/libc/machine/bfin/setjmp.S
newlib/libc/machine/configure
newlib/libc/machine/configure.in
newlib/libc/machine/cris/Makefile.am
newlib/libc/machine/cris/Makefile.in
newlib/libc/machine/cris/aclocal.m4
newlib/libc/machine/cris/configure
newlib/libc/machine/cris/configure.in
newlib/libc/machine/cris/include/pthread.h
newlib/libc/machine/cris/libcdtor.c
newlib/libc/machine/cris/memcpy.c
newlib/libc/machine/cris/memmove.c
newlib/libc/machine/cris/memset.c
newlib/libc/machine/cris/setjmp.c
newlib/libc/machine/cris/sys/errno.h
newlib/libc/machine/cris/sys/fcntl.h
newlib/libc/machine/cris/sys/signal.h
newlib/libc/machine/crx/Makefile.am
newlib/libc/machine/crx/Makefile.in
newlib/libc/machine/crx/aclocal.m4
newlib/libc/machine/crx/configure
newlib/libc/machine/crx/configure.in
newlib/libc/machine/crx/getenv.c
newlib/libc/machine/crx/setjmp.S
newlib/libc/machine/crx/sys/asm.h
newlib/libc/machine/crx/sys/libh.h
newlib/libc/machine/crx/sys/syscall.h
newlib/libc/machine/d10v/Makefile.am
newlib/libc/machine/d10v/Makefile.in
newlib/libc/machine/d10v/aclocal.m4
newlib/libc/machine/d10v/configure
newlib/libc/machine/d10v/configure.in
newlib/libc/machine/d10v/setjmp.S
newlib/libc/machine/d30v/Makefile.am
newlib/libc/machine/d30v/Makefile.in
newlib/libc/machine/d30v/aclocal.m4
newlib/libc/machine/d30v/configure
newlib/libc/machine/d30v/configure.in
newlib/libc/machine/d30v/setjmp.S
newlib/libc/machine/fr30/Makefile.am
newlib/libc/machine/fr30/Makefile.in
newlib/libc/machine/fr30/aclocal.m4
newlib/libc/machine/fr30/configure
newlib/libc/machine/fr30/configure.in
newlib/libc/machine/fr30/setjmp.S
newlib/libc/machine/frv/Makefile.am
newlib/libc/machine/frv/Makefile.in
newlib/libc/machine/frv/aclocal.m4
newlib/libc/machine/frv/configure
newlib/libc/machine/frv/configure.in
newlib/libc/machine/frv/setjmp.S
newlib/libc/machine/h8300/Makefile.am
newlib/libc/machine/h8300/Makefile.in
newlib/libc/machine/h8300/aclocal.m4
newlib/libc/machine/h8300/configure
newlib/libc/machine/h8300/configure.in
newlib/libc/machine/h8300/defines.h
newlib/libc/machine/h8300/h8sx_strcpy.S
newlib/libc/machine/h8300/memcpy.S
newlib/libc/machine/h8300/memset.S
newlib/libc/machine/h8300/reg_memcpy.S
newlib/libc/machine/h8300/reg_memset.S
newlib/libc/machine/h8300/setarch.h
newlib/libc/machine/h8300/setjmp.S
newlib/libc/machine/h8300/strcmp.S
newlib/libc/machine/h8500/Makefile.am
newlib/libc/machine/h8500/Makefile.in
newlib/libc/machine/h8500/aclocal.m4
newlib/libc/machine/h8500/cmpsi.c
newlib/libc/machine/h8500/configure
newlib/libc/machine/h8500/configure.in
newlib/libc/machine/h8500/divhi3.S
newlib/libc/machine/h8500/divsi3.c
newlib/libc/machine/h8500/mulhi3.c
newlib/libc/machine/h8500/mulsi3.c
newlib/libc/machine/h8500/negsi2.c
newlib/libc/machine/h8500/psi.S
newlib/libc/machine/h8500/setjmp.S
newlib/libc/machine/h8500/shifts.c
newlib/libc/machine/hppa/DEFS.h
newlib/libc/machine/hppa/Makefile.am
newlib/libc/machine/hppa/Makefile.in
newlib/libc/machine/hppa/aclocal.m4
newlib/libc/machine/hppa/configure
newlib/libc/machine/hppa/configure.in
newlib/libc/machine/hppa/memchr.S
newlib/libc/machine/hppa/memcmp.S
newlib/libc/machine/hppa/memcpy.S
newlib/libc/machine/hppa/memset.S
newlib/libc/machine/hppa/pcc_prefix.s
newlib/libc/machine/hppa/setjmp.S
newlib/libc/machine/hppa/strcat.S
newlib/libc/machine/hppa/strcmp.S
newlib/libc/machine/hppa/strcpy.S
newlib/libc/machine/hppa/strlen.S
newlib/libc/machine/hppa/strncat.S
newlib/libc/machine/hppa/strncmp.S
newlib/libc/machine/hppa/strncpy.S
newlib/libc/machine/i386/Makefile.am
newlib/libc/machine/i386/Makefile.in
newlib/libc/machine/i386/aclocal.m4
newlib/libc/machine/i386/configure
newlib/libc/machine/i386/configure.in
newlib/libc/machine/i386/f_atan2.S
newlib/libc/machine/i386/f_atan2f.S
newlib/libc/machine/i386/f_exp.c
newlib/libc/machine/i386/f_expf.c
newlib/libc/machine/i386/f_frexp.S
newlib/libc/machine/i386/f_frexpf.S
newlib/libc/machine/i386/f_ldexp.S
newlib/libc/machine/i386/f_ldexpf.S
newlib/libc/machine/i386/f_log.S
newlib/libc/machine/i386/f_log10.S
newlib/libc/machine/i386/f_log10f.S
newlib/libc/machine/i386/f_logf.S
newlib/libc/machine/i386/f_math.h
newlib/libc/machine/i386/f_pow.c
newlib/libc/machine/i386/f_powf.c
newlib/libc/machine/i386/f_tan.S
newlib/libc/machine/i386/f_tanf.S
newlib/libc/machine/i386/i386mach.h
newlib/libc/machine/i386/machine/fastmath.h
newlib/libc/machine/i386/memchr.S
newlib/libc/machine/i386/memcmp.S
newlib/libc/machine/i386/memcpy.S
newlib/libc/machine/i386/memmove.S
newlib/libc/machine/i386/memset.S
newlib/libc/machine/i386/setjmp.S
newlib/libc/machine/i386/strchr.S
newlib/libc/machine/i386/strlen.S
newlib/libc/machine/i960/Makefile.am
newlib/libc/machine/i960/Makefile.in
newlib/libc/machine/i960/aclocal.m4
newlib/libc/machine/i960/configure
newlib/libc/machine/i960/configure.in
newlib/libc/machine/i960/memccpy.S
newlib/libc/machine/i960/memccpy_ca.S
newlib/libc/machine/i960/memchr.S
newlib/libc/machine/i960/memchr_ca.S
newlib/libc/machine/i960/memcmp.S
newlib/libc/machine/i960/memcmp_ca.S
newlib/libc/machine/i960/memcpy.S
newlib/libc/machine/i960/memcpy_ca.S
newlib/libc/machine/i960/memset.S
newlib/libc/machine/i960/setjmp.S
newlib/libc/machine/i960/strchr.S
newlib/libc/machine/i960/strchr_ca.S
newlib/libc/machine/i960/strcmp.S
newlib/libc/machine/i960/strcmp_ca.S
newlib/libc/machine/i960/strcpy.S
newlib/libc/machine/i960/strcpy_ca.S
newlib/libc/machine/i960/strcspn.S
newlib/libc/machine/i960/strdup.S
newlib/libc/machine/i960/strlen.S
newlib/libc/machine/i960/strlen_ca.S
newlib/libc/machine/i960/strncat.S
newlib/libc/machine/i960/strncat_ca.S
newlib/libc/machine/i960/strncmp.S
newlib/libc/machine/i960/strncmp_ca.S
newlib/libc/machine/i960/strncpy.S
newlib/libc/machine/i960/strncpy_ca.S
newlib/libc/machine/i960/strpbrk.S
newlib/libc/machine/i960/strrchr.S
newlib/libc/machine/iq2000/Makefile.am
newlib/libc/machine/iq2000/Makefile.in
newlib/libc/machine/iq2000/aclocal.m4
newlib/libc/machine/iq2000/configure
newlib/libc/machine/iq2000/configure.in
newlib/libc/machine/iq2000/setjmp.S
newlib/libc/machine/lm32/Makefile.am
newlib/libc/machine/lm32/Makefile.in
newlib/libc/machine/lm32/aclocal.m4
newlib/libc/machine/lm32/configure
newlib/libc/machine/lm32/configure.in
newlib/libc/machine/lm32/setjmp.S
newlib/libc/machine/m32c/Makefile.am
newlib/libc/machine/m32c/Makefile.in
newlib/libc/machine/m32c/aclocal.m4
newlib/libc/machine/m32c/configure
newlib/libc/machine/m32c/configure.in
newlib/libc/machine/m32c/setjmp.S
newlib/libc/machine/m32r/Makefile.am
newlib/libc/machine/m32r/Makefile.in
newlib/libc/machine/m32r/aclocal.m4
newlib/libc/machine/m32r/configure
newlib/libc/machine/m32r/configure.in
newlib/libc/machine/m32r/setjmp.S
newlib/libc/machine/m68hc11/Makefile.am
newlib/libc/machine/m68hc11/Makefile.in
newlib/libc/machine/m68hc11/aclocal.m4
newlib/libc/machine/m68hc11/configure
newlib/libc/machine/m68hc11/configure.in
newlib/libc/machine/m68hc11/setjmp.S
newlib/libc/machine/m68k/Makefile.am
newlib/libc/machine/m68k/Makefile.in
newlib/libc/machine/m68k/aclocal.m4
newlib/libc/machine/m68k/configure
newlib/libc/machine/m68k/configure.in
newlib/libc/machine/m68k/m68kasm.h
newlib/libc/machine/m68k/memcpy.S
newlib/libc/machine/m68k/memset.S
newlib/libc/machine/m68k/setjmp.S
newlib/libc/machine/m68k/strcpy.c
newlib/libc/machine/m68k/strlen.c
newlib/libc/machine/m88k/Makefile.am
newlib/libc/machine/m88k/Makefile.in
newlib/libc/machine/m88k/aclocal.m4
newlib/libc/machine/m88k/configure
newlib/libc/machine/m88k/configure.in
newlib/libc/machine/m88k/setjmp.S
newlib/libc/machine/mep/Makefile.am
newlib/libc/machine/mep/Makefile.in
newlib/libc/machine/mep/aclocal.m4
newlib/libc/machine/mep/configure
newlib/libc/machine/mep/configure.in
newlib/libc/machine/mep/setjmp.S
newlib/libc/machine/mips/Makefile.am
newlib/libc/machine/mips/Makefile.in
newlib/libc/machine/mips/aclocal.m4
newlib/libc/machine/mips/configure
newlib/libc/machine/mips/configure.in
newlib/libc/machine/mips/machine/regdef.h
newlib/libc/machine/mips/memcpy.c
newlib/libc/machine/mips/memset.c
newlib/libc/machine/mips/setjmp.S
newlib/libc/machine/mips/strcmp.c
newlib/libc/machine/mips/strlen.c
newlib/libc/machine/mips/strncpy.c
newlib/libc/machine/mn10200/Makefile.am
newlib/libc/machine/mn10200/Makefile.in
newlib/libc/machine/mn10200/aclocal.m4
newlib/libc/machine/mn10200/configure
newlib/libc/machine/mn10200/configure.in
newlib/libc/machine/mn10200/setjmp.S
newlib/libc/machine/mn10300/Makefile.am
newlib/libc/machine/mn10300/Makefile.in
newlib/libc/machine/mn10300/aclocal.m4
newlib/libc/machine/mn10300/configure
newlib/libc/machine/mn10300/configure.in
newlib/libc/machine/mn10300/memchr.S
newlib/libc/machine/mn10300/memcmp.S
newlib/libc/machine/mn10300/memcpy.S
newlib/libc/machine/mn10300/memset.S
newlib/libc/machine/mn10300/setjmp.S
newlib/libc/machine/mn10300/strchr.S
newlib/libc/machine/mn10300/strcmp.S
newlib/libc/machine/mn10300/strcpy.S
newlib/libc/machine/mn10300/strlen.S
newlib/libc/machine/moxie/Makefile.am
newlib/libc/machine/moxie/Makefile.in
newlib/libc/machine/moxie/aclocal.m4
newlib/libc/machine/moxie/configure
newlib/libc/machine/moxie/configure.in
newlib/libc/machine/moxie/setjmp.S
newlib/libc/machine/mt/Makefile.am
newlib/libc/machine/mt/Makefile.in
newlib/libc/machine/mt/aclocal.m4
newlib/libc/machine/mt/configure
newlib/libc/machine/mt/configure.in
newlib/libc/machine/mt/setjmp.S
newlib/libc/machine/necv70/Makefile.am
newlib/libc/machine/necv70/Makefile.in
newlib/libc/machine/necv70/aclocal.m4
newlib/libc/machine/necv70/configure
newlib/libc/machine/necv70/configure.in
newlib/libc/machine/necv70/fastmath.S
newlib/libc/machine/necv70/machine/registers.h
newlib/libc/machine/necv70/necv70.tex
newlib/libc/machine/necv70/setjmp.S
newlib/libc/machine/powerpc/Makefile.am
newlib/libc/machine/powerpc/Makefile.in
newlib/libc/machine/powerpc/aclocal.m4
newlib/libc/machine/powerpc/atosfix16.c
newlib/libc/machine/powerpc/atosfix32.c
newlib/libc/machine/powerpc/atosfix64.c
newlib/libc/machine/powerpc/atoufix16.c
newlib/libc/machine/powerpc/atoufix32.c
newlib/libc/machine/powerpc/atoufix64.c
newlib/libc/machine/powerpc/configure
newlib/libc/machine/powerpc/configure.in
newlib/libc/machine/powerpc/fix64.h
newlib/libc/machine/powerpc/machine/malloc.h
newlib/libc/machine/powerpc/machine/stdlib.h
newlib/libc/machine/powerpc/setjmp.S
newlib/libc/machine/powerpc/simdldtoa.c
newlib/libc/machine/powerpc/strtosfix16.c
newlib/libc/machine/powerpc/strtosfix32.c
newlib/libc/machine/powerpc/strtosfix64.c
newlib/libc/machine/powerpc/strtoufix16.c
newlib/libc/machine/powerpc/strtoufix32.c
newlib/libc/machine/powerpc/strtoufix64.c
newlib/libc/machine/powerpc/times.c
newlib/libc/machine/powerpc/ufix64toa.c
newlib/libc/machine/powerpc/vec_calloc.c
newlib/libc/machine/powerpc/vec_free.c
newlib/libc/machine/powerpc/vec_malloc.c
newlib/libc/machine/powerpc/vec_mallocr.c
newlib/libc/machine/powerpc/vec_realloc.c
newlib/libc/machine/powerpc/vfprintf.c
newlib/libc/machine/powerpc/vfscanf.c
newlib/libc/machine/sh/Makefile.am
newlib/libc/machine/sh/Makefile.in
newlib/libc/machine/sh/aclocal.m4
newlib/libc/machine/sh/asm.h
newlib/libc/machine/sh/configure
newlib/libc/machine/sh/configure.in
newlib/libc/machine/sh/memcpy.S
newlib/libc/machine/sh/memset.S
newlib/libc/machine/sh/setjmp.S
newlib/libc/machine/sh/strcmp.S
newlib/libc/machine/sh/strcpy.S
newlib/libc/machine/sh/strlen.S
newlib/libc/machine/sh/strncpy.S
newlib/libc/machine/sparc/Makefile.am
newlib/libc/machine/sparc/Makefile.in
newlib/libc/machine/sparc/aclocal.m4
newlib/libc/machine/sparc/configure
newlib/libc/machine/sparc/configure.in
newlib/libc/machine/sparc/machine/sparclet.h
newlib/libc/machine/sparc/scan.c
newlib/libc/machine/sparc/setjmp.S
newlib/libc/machine/sparc/shuffle.c
newlib/libc/machine/spu/Makefile.am
newlib/libc/machine/spu/Makefile.in
newlib/libc/machine/spu/aclocal.m4
newlib/libc/machine/spu/assert.c
newlib/libc/machine/spu/c99ppe.h
newlib/libc/machine/spu/calloc_ea.c
newlib/libc/machine/spu/clearerr.c
newlib/libc/machine/spu/configure
newlib/libc/machine/spu/configure.in
newlib/libc/machine/spu/creat.c
newlib/libc/machine/spu/ea_internal.h
newlib/libc/machine/spu/fclose.c
newlib/libc/machine/spu/fdopen.c
newlib/libc/machine/spu/feof.c
newlib/libc/machine/spu/ferror.c
newlib/libc/machine/spu/fflush.c
newlib/libc/machine/spu/fgetc.c
newlib/libc/machine/spu/fgetpos.c
newlib/libc/machine/spu/fgets.c
newlib/libc/machine/spu/fileno.c
newlib/libc/machine/spu/fiprintf.S
newlib/libc/machine/spu/fiscanf.S
newlib/libc/machine/spu/fopen.c
newlib/libc/machine/spu/fprintf.S
newlib/libc/machine/spu/fputc.c
newlib/libc/machine/spu/fputs.c
newlib/libc/machine/spu/fread.c
newlib/libc/machine/spu/free_ea.c
newlib/libc/machine/spu/freopen.c
newlib/libc/machine/spu/fscanf.S
newlib/libc/machine/spu/fseek.c
newlib/libc/machine/spu/fsetpos.c
newlib/libc/machine/spu/ftell.c
newlib/libc/machine/spu/fwrite.c
newlib/libc/machine/spu/getc.c
newlib/libc/machine/spu/getchar.c
newlib/libc/machine/spu/gets.c
newlib/libc/machine/spu/impure.c
newlib/libc/machine/spu/include/ea.h
newlib/libc/machine/spu/include/fenv.h
newlib/libc/machine/spu/include/spu_timer.h
newlib/libc/machine/spu/iprintf.S
newlib/libc/machine/spu/iscanf.S
newlib/libc/machine/spu/machine/_types.h
newlib/libc/machine/spu/malloc_ea.c
newlib/libc/machine/spu/memchr_ea.c
newlib/libc/machine/spu/memcmp.c
newlib/libc/machine/spu/memcmp_ea.c
newlib/libc/machine/spu/memcpy.c
newlib/libc/machine/spu/memcpy_ea.c
newlib/libc/machine/spu/memmove.c
newlib/libc/machine/spu/memmove_ea.c
newlib/libc/machine/spu/memset.c
newlib/libc/machine/spu/memset_ea.c
newlib/libc/machine/spu/mk_syscalls
newlib/libc/machine/spu/mmap_ea.c
newlib/libc/machine/spu/mremap_ea.c
newlib/libc/machine/spu/msync_ea.c
newlib/libc/machine/spu/munmap_ea.c
newlib/libc/machine/spu/perror.c
newlib/libc/machine/spu/posix_memalign_ea.c
newlib/libc/machine/spu/pread_ea.c
newlib/libc/machine/spu/printf.S
newlib/libc/machine/spu/putc.c
newlib/libc/machine/spu/putchar.c
newlib/libc/machine/spu/puts.c
newlib/libc/machine/spu/pwrite_ea.c
newlib/libc/machine/spu/read_ea.c
newlib/libc/machine/spu/readv_ea.c
newlib/libc/machine/spu/realloc_ea.c
newlib/libc/machine/spu/remove.c
newlib/libc/machine/spu/rename.c
newlib/libc/machine/spu/rewind.c
newlib/libc/machine/spu/scanf.S
newlib/libc/machine/spu/setbuf.c
newlib/libc/machine/spu/setjmp.S
newlib/libc/machine/spu/setvbuf.c
newlib/libc/machine/spu/siprintf.S
newlib/libc/machine/spu/siscanf.S
newlib/libc/machine/spu/sleep.c
newlib/libc/machine/spu/sniprintf.S
newlib/libc/machine/spu/snprintf.S
newlib/libc/machine/spu/sprintf.S
newlib/libc/machine/spu/spu-gmon.c
newlib/libc/machine/spu/spu-mcount.S
newlib/libc/machine/spu/spu_clock_stop.c
newlib/libc/machine/spu/spu_clock_svcs.c
newlib/libc/machine/spu/spu_timebase.c
newlib/libc/machine/spu/spu_timer_flih.S
newlib/libc/machine/spu/spu_timer_free.c
newlib/libc/machine/spu/spu_timer_internal.h
newlib/libc/machine/spu/spu_timer_slih.c
newlib/libc/machine/spu/spu_timer_slih_reg.c
newlib/libc/machine/spu/spu_timer_stop.c
newlib/libc/machine/spu/spu_timer_svcs.c
newlib/libc/machine/spu/sscanf.S
newlib/libc/machine/spu/stack_reg_va.S
newlib/libc/machine/spu/stdio.c
newlib/libc/machine/spu/straddr.h
newlib/libc/machine/spu/strcat.c
newlib/libc/machine/spu/strcat_ea.c
newlib/libc/machine/spu/strchr.c
newlib/libc/machine/spu/strchr_ea.c
newlib/libc/machine/spu/strcmp.c
newlib/libc/machine/spu/strcmp_ea.c
newlib/libc/machine/spu/strcpy.c
newlib/libc/machine/spu/strcpy.h
newlib/libc/machine/spu/strcpy_ea.c
newlib/libc/machine/spu/strcspn.c
newlib/libc/machine/spu/strcspn_ea.c
newlib/libc/machine/spu/strlen.c
newlib/libc/machine/spu/strlen_ea.c
newlib/libc/machine/spu/strncat.c
newlib/libc/machine/spu/strncat_ea.c
newlib/libc/machine/spu/strncmp.c
newlib/libc/machine/spu/strncmp.h
newlib/libc/machine/spu/strncmp_ea.c
newlib/libc/machine/spu/strncpy.c
newlib/libc/machine/spu/strncpy_ea.c
newlib/libc/machine/spu/strpbrk.c
newlib/libc/machine/spu/strpbrk_ea.c
newlib/libc/machine/spu/strrchr.c
newlib/libc/machine/spu/strrchr_ea.c
newlib/libc/machine/spu/strspn.c
newlib/libc/machine/spu/strspn_ea.c
newlib/libc/machine/spu/strstr_ea.c
newlib/libc/machine/spu/strxfrm.c
newlib/libc/machine/spu/sys/custom_file.h
newlib/libc/machine/spu/sys/dirent.h
newlib/libc/machine/spu/sys/errno.h
newlib/libc/machine/spu/sys/fenv.h
newlib/libc/machine/spu/sys/linux_syscalls.h
newlib/libc/machine/spu/sys/mman.h
newlib/libc/machine/spu/sys/sched.h
newlib/libc/machine/spu/sys/syscall.h
newlib/libc/machine/spu/sys/uio.h
newlib/libc/machine/spu/sys/utime.h
newlib/libc/machine/spu/syscall.def
newlib/libc/machine/spu/tmpfile.c
newlib/libc/machine/spu/tmpnam.c
newlib/libc/machine/spu/ungetc.c
newlib/libc/machine/spu/usleep.c
newlib/libc/machine/spu/vec_literal.h
newlib/libc/machine/spu/vfiprintf.c
newlib/libc/machine/spu/vfiscanf.c
newlib/libc/machine/spu/vfprintf.c
newlib/libc/machine/spu/vfscanf.c
newlib/libc/machine/spu/viprintf.c
newlib/libc/machine/spu/viscanf.c
newlib/libc/machine/spu/vprintf.c
newlib/libc/machine/spu/vscanf.c
newlib/libc/machine/spu/vsiprintf.c
newlib/libc/machine/spu/vsiscanf.c
newlib/libc/machine/spu/vsniprintf.c
newlib/libc/machine/spu/vsnprintf.c
newlib/libc/machine/spu/vsprintf.c
newlib/libc/machine/spu/vsscanf.c
newlib/libc/machine/spu/write_ea.c
newlib/libc/machine/spu/writev_ea.c
newlib/libc/machine/tic4x/Makefile.am
newlib/libc/machine/tic4x/Makefile.in
newlib/libc/machine/tic4x/aclocal.m4
newlib/libc/machine/tic4x/configure
newlib/libc/machine/tic4x/configure.in
newlib/libc/machine/tic4x/setjmp.S
newlib/libc/machine/tic80/Makefile.am
newlib/libc/machine/tic80/Makefile.in
newlib/libc/machine/tic80/aclocal.m4
newlib/libc/machine/tic80/configure
newlib/libc/machine/tic80/configure.in
newlib/libc/machine/tic80/setjmp.S
newlib/libc/machine/v850/Makefile.am
newlib/libc/machine/v850/Makefile.in
newlib/libc/machine/v850/aclocal.m4
newlib/libc/machine/v850/configure
newlib/libc/machine/v850/configure.in
newlib/libc/machine/v850/setjmp.S
newlib/libc/machine/w65/Makefile.am
newlib/libc/machine/w65/Makefile.in
newlib/libc/machine/w65/aclocal.m4
newlib/libc/machine/w65/cmpsi.c
newlib/libc/machine/w65/configure
newlib/libc/machine/w65/configure.in
newlib/libc/machine/w65/divsi3.c
newlib/libc/machine/w65/lshrhi.S
newlib/libc/machine/w65/mulsi3.c
newlib/libc/machine/w65/sdivhi3.S
newlib/libc/machine/w65/smulhi3.S
newlib/libc/machine/w65/udivhi3.S
newlib/libc/machine/w65/umodhi3.S
newlib/libc/machine/x86_64/Makefile.am
newlib/libc/machine/x86_64/Makefile.in
newlib/libc/machine/x86_64/aclocal.m4
newlib/libc/machine/x86_64/configure
newlib/libc/machine/x86_64/configure.in
newlib/libc/machine/x86_64/memcpy.S
newlib/libc/machine/x86_64/memset.S
newlib/libc/machine/x86_64/setjmp.S
newlib/libc/machine/x86_64/x86_64mach.h
newlib/libc/machine/xscale/Makefile.am
newlib/libc/machine/xscale/Makefile.in
newlib/libc/machine/xscale/aclocal.m4
newlib/libc/machine/xscale/configure
newlib/libc/machine/xscale/configure.in
newlib/libc/machine/xscale/machine/profile.h
newlib/libc/machine/xscale/memchr.c
newlib/libc/machine/xscale/memcmp.c
newlib/libc/machine/xscale/memcpy.c
newlib/libc/machine/xscale/memmove.c
newlib/libc/machine/xscale/memset.c
newlib/libc/machine/xscale/setjmp.S
newlib/libc/machine/xscale/strchr.c
newlib/libc/machine/xscale/strcmp.c
newlib/libc/machine/xscale/strcpy.c
newlib/libc/machine/xscale/strlen.c
newlib/libc/machine/xscale/xscale.h
newlib/libc/machine/xstormy16/Makefile.am
newlib/libc/machine/xstormy16/Makefile.in
newlib/libc/machine/xstormy16/aclocal.m4
newlib/libc/machine/xstormy16/configure
newlib/libc/machine/xstormy16/configure.in
newlib/libc/machine/xstormy16/mallocr.c
newlib/libc/machine/xstormy16/setjmp.S
newlib/libc/machine/xstormy16/tiny-malloc.c
newlib/libc/machine/z8k/Makefile.am
newlib/libc/machine/z8k/Makefile.in
newlib/libc/machine/z8k/aclocal.m4
newlib/libc/machine/z8k/args.h
newlib/libc/machine/z8k/configure
newlib/libc/machine/z8k/configure.in
newlib/libc/machine/z8k/memcmp.S
newlib/libc/machine/z8k/memcpy.S
newlib/libc/machine/z8k/memmove.S
newlib/libc/machine/z8k/memset.S
newlib/libc/machine/z8k/setjmp.S
newlib/libc/misc/Makefile.am
newlib/libc/misc/Makefile.in
newlib/libc/misc/__dprintf.c
newlib/libc/misc/ffs.c
newlib/libc/misc/init.c
newlib/libc/misc/misc.tex
newlib/libc/misc/unctrl.c
newlib/libc/posix/COPYRIGHT
newlib/libc/posix/Makefile.am
newlib/libc/posix/Makefile.in
newlib/libc/posix/_isatty.c
newlib/libc/posix/cclass.h
newlib/libc/posix/closedir.c
newlib/libc/posix/cname.h
newlib/libc/posix/collate.c
newlib/libc/posix/collate.h
newlib/libc/posix/collcmp.c
newlib/libc/posix/creat.c
newlib/libc/posix/engine.c
newlib/libc/posix/execl.c
newlib/libc/posix/execle.c
newlib/libc/posix/execlp.c
newlib/libc/posix/execv.c
newlib/libc/posix/execve.c
newlib/libc/posix/execvp.c
newlib/libc/posix/fnmatch.3
newlib/libc/posix/fnmatch.c
newlib/libc/posix/glob.3
newlib/libc/posix/glob.c
newlib/libc/posix/isatty.c
newlib/libc/posix/namespace.h
newlib/libc/posix/opendir.c
newlib/libc/posix/popen.c
newlib/libc/posix/posix.tex
newlib/libc/posix/readdir.c
newlib/libc/posix/readdir_r.c
newlib/libc/posix/regcomp.c
newlib/libc/posix/regerror.c
newlib/libc/posix/regex.3
newlib/libc/posix/regex2.h
newlib/libc/posix/regexec.c
newlib/libc/posix/regfree.c
newlib/libc/posix/rewinddir.c
newlib/libc/posix/rune.h
newlib/libc/posix/runetype.h
newlib/libc/posix/scandir.c
newlib/libc/posix/seekdir.c
newlib/libc/posix/sleep.c
newlib/libc/posix/sysexits.h
newlib/libc/posix/telldir.c
newlib/libc/posix/un-namespace.h
newlib/libc/posix/usleep.c
newlib/libc/posix/utils.h
newlib/libc/posix/wordexp.c
newlib/libc/posix/wordfree.c
newlib/libc/reent/Makefile.am
newlib/libc/reent/Makefile.in
newlib/libc/reent/closer.c
newlib/libc/reent/execr.c
newlib/libc/reent/fcntlr.c
newlib/libc/reent/fstat64r.c
newlib/libc/reent/fstatr.c
newlib/libc/reent/getreent.c
newlib/libc/reent/gettimeofdayr.c
newlib/libc/reent/impure.c
newlib/libc/reent/isattyr.c
newlib/libc/reent/linkr.c
newlib/libc/reent/lseek64r.c
newlib/libc/reent/lseekr.c
newlib/libc/reent/mkdirr.c
newlib/libc/reent/open64r.c
newlib/libc/reent/openr.c
newlib/libc/reent/readr.c
newlib/libc/reent/reent.c
newlib/libc/reent/reent.tex
newlib/libc/reent/renamer.c
newlib/libc/reent/sbrkr.c
newlib/libc/reent/signalr.c
newlib/libc/reent/signgam.c
newlib/libc/reent/stat64r.c
newlib/libc/reent/statr.c
newlib/libc/reent/timesr.c
newlib/libc/reent/unlinkr.c
newlib/libc/reent/writer.c
newlib/libc/saber
newlib/libc/search/Makefile.am
newlib/libc/search/Makefile.in
newlib/libc/search/bsearch.c
newlib/libc/search/db_local.h
newlib/libc/search/extern.h
newlib/libc/search/hash.c
newlib/libc/search/hash.h
newlib/libc/search/hash_bigkey.c
newlib/libc/search/hash_buf.c
newlib/libc/search/hash_func.c
newlib/libc/search/hash_log2.c
newlib/libc/search/hash_page.c
newlib/libc/search/hcreate.3
newlib/libc/search/hcreate.c
newlib/libc/search/hcreate_r.c
newlib/libc/search/page.h
newlib/libc/search/qsort.c
newlib/libc/search/tdelete.c
newlib/libc/search/tdestroy.c
newlib/libc/search/tfind.c
newlib/libc/search/tsearch.3
newlib/libc/search/tsearch.c
newlib/libc/search/twalk.c
newlib/libc/signal/Makefile.am
newlib/libc/signal/Makefile.in
newlib/libc/signal/raise.c
newlib/libc/signal/signal.c
newlib/libc/signal/signal.tex
newlib/libc/stdio/Makefile.am
newlib/libc/stdio/Makefile.in
newlib/libc/stdio/asiprintf.c
newlib/libc/stdio/asniprintf.c
newlib/libc/stdio/asnprintf.c
newlib/libc/stdio/asprintf.c
newlib/libc/stdio/clearerr.c
newlib/libc/stdio/diprintf.c
newlib/libc/stdio/dprintf.c
newlib/libc/stdio/fclose.c
newlib/libc/stdio/fcloseall.c
newlib/libc/stdio/fdopen.c
newlib/libc/stdio/feof.c
newlib/libc/stdio/ferror.c
newlib/libc/stdio/fflush.c
newlib/libc/stdio/fgetc.c
newlib/libc/stdio/fgetpos.c
newlib/libc/stdio/fgets.c
newlib/libc/stdio/fgetwc.c
newlib/libc/stdio/fgetws.c
newlib/libc/stdio/fileno.c
newlib/libc/stdio/findfp.c
newlib/libc/stdio/fiprintf.c
newlib/libc/stdio/fiscanf.c
newlib/libc/stdio/flags.c
newlib/libc/stdio/floatio.h
newlib/libc/stdio/fmemopen.c
newlib/libc/stdio/fopen.c
newlib/libc/stdio/fopencookie.c
newlib/libc/stdio/fprintf.c
newlib/libc/stdio/fpurge.c
newlib/libc/stdio/fputc.c
newlib/libc/stdio/fputs.c
newlib/libc/stdio/fputwc.c
newlib/libc/stdio/fputws.c
newlib/libc/stdio/fread.c
newlib/libc/stdio/freopen.c
newlib/libc/stdio/fscanf.c
newlib/libc/stdio/fseek.c
newlib/libc/stdio/fseeko.c
newlib/libc/stdio/fsetpos.c
newlib/libc/stdio/ftell.c
newlib/libc/stdio/ftello.c
newlib/libc/stdio/funopen.c
newlib/libc/stdio/fvwrite.c
newlib/libc/stdio/fvwrite.h
newlib/libc/stdio/fwalk.c
newlib/libc/stdio/fwide.c
newlib/libc/stdio/fwprintf.c
newlib/libc/stdio/fwrite.c
newlib/libc/stdio/fwscanf.c
newlib/libc/stdio/getc.c
newlib/libc/stdio/getc_u.c
newlib/libc/stdio/getchar.c
newlib/libc/stdio/getchar_u.c
newlib/libc/stdio/getdelim.c
newlib/libc/stdio/getline.c
newlib/libc/stdio/gets.c
newlib/libc/stdio/getw.c
newlib/libc/stdio/getwc.c
newlib/libc/stdio/getwchar.c
newlib/libc/stdio/iprintf.c
newlib/libc/stdio/iscanf.c
newlib/libc/stdio/local.h
newlib/libc/stdio/makebuf.c
newlib/libc/stdio/mktemp.c
newlib/libc/stdio/open_memstream.c
newlib/libc/stdio/perror.c
newlib/libc/stdio/printf.c
newlib/libc/stdio/putc.c
newlib/libc/stdio/putc_u.c
newlib/libc/stdio/putchar.c
newlib/libc/stdio/putchar_u.c
newlib/libc/stdio/puts.c
newlib/libc/stdio/putw.c
newlib/libc/stdio/putwc.c
newlib/libc/stdio/putwchar.c
newlib/libc/stdio/refill.c
newlib/libc/stdio/remove.c
newlib/libc/stdio/rename.c
newlib/libc/stdio/rewind.c
newlib/libc/stdio/rget.c
newlib/libc/stdio/scanf.c
newlib/libc/stdio/sccl.c
newlib/libc/stdio/setbuf.c
newlib/libc/stdio/setbuffer.c
newlib/libc/stdio/setlinebuf.c
newlib/libc/stdio/setvbuf.c
newlib/libc/stdio/siprintf.c
newlib/libc/stdio/siscanf.c
newlib/libc/stdio/sniprintf.c
newlib/libc/stdio/snprintf.c
newlib/libc/stdio/sprintf.c
newlib/libc/stdio/sscanf.c
newlib/libc/stdio/stdio.c
newlib/libc/stdio/stdio.tex
newlib/libc/stdio/swprintf.c
newlib/libc/stdio/swscanf.c
newlib/libc/stdio/tmpfile.c
newlib/libc/stdio/tmpnam.c
newlib/libc/stdio/ungetc.c
newlib/libc/stdio/ungetwc.c
newlib/libc/stdio/vasiprintf.c
newlib/libc/stdio/vasniprintf.c
newlib/libc/stdio/vasnprintf.c
newlib/libc/stdio/vasprintf.c
newlib/libc/stdio/vdiprintf.c
newlib/libc/stdio/vdprintf.c
newlib/libc/stdio/vfieeefp.h
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vfscanf.c
newlib/libc/stdio/vfwprintf.c
newlib/libc/stdio/vfwscanf.c
newlib/libc/stdio/viprintf.c
newlib/libc/stdio/viscanf.c
newlib/libc/stdio/vprintf.c
newlib/libc/stdio/vscanf.c
newlib/libc/stdio/vsiprintf.c
newlib/libc/stdio/vsiscanf.c
newlib/libc/stdio/vsniprintf.c
newlib/libc/stdio/vsnprintf.c
newlib/libc/stdio/vsprintf.c
newlib/libc/stdio/vsscanf.c
newlib/libc/stdio/vswprintf.c
newlib/libc/stdio/vswscanf.c
newlib/libc/stdio/vwprintf.c
newlib/libc/stdio/vwscanf.c
newlib/libc/stdio/wbuf.c
newlib/libc/stdio/wprintf.c
newlib/libc/stdio/wscanf.c
newlib/libc/stdio/wsetup.c
newlib/libc/stdio64/Makefile.am
newlib/libc/stdio64/Makefile.in
newlib/libc/stdio64/dummy.c
newlib/libc/stdio64/fdopen64.c
newlib/libc/stdio64/fgetpos64.c
newlib/libc/stdio64/fopen64.c
newlib/libc/stdio64/freopen64.c
newlib/libc/stdio64/fseeko64.c
newlib/libc/stdio64/fsetpos64.c
newlib/libc/stdio64/ftello64.c
newlib/libc/stdio64/stdio64.c
newlib/libc/stdio64/stdio64.tex
newlib/libc/stdio64/tmpfile64.c
newlib/libc/stdlib/Makefile.am
newlib/libc/stdlib/Makefile.in
newlib/libc/stdlib/_Exit.c
newlib/libc/stdlib/__adjust.c
newlib/libc/stdlib/__atexit.c
newlib/libc/stdlib/__call_atexit.c
newlib/libc/stdlib/__exp10.c
newlib/libc/stdlib/__ten_mu.c
newlib/libc/stdlib/a64l.c
newlib/libc/stdlib/abort.c
newlib/libc/stdlib/abs.c
newlib/libc/stdlib/assert.c
newlib/libc/stdlib/atexit.c
newlib/libc/stdlib/atexit.h
newlib/libc/stdlib/atof.c
newlib/libc/stdlib/atoff.c
newlib/libc/stdlib/atoi.c
newlib/libc/stdlib/atol.c
newlib/libc/stdlib/atoll.c
newlib/libc/stdlib/btowc.c
newlib/libc/stdlib/calloc.c
newlib/libc/stdlib/cxa_atexit.c
newlib/libc/stdlib/cxa_finalize.c
newlib/libc/stdlib/div.c
newlib/libc/stdlib/drand48.c
newlib/libc/stdlib/dtoa.c
newlib/libc/stdlib/dtoastub.c
newlib/libc/stdlib/ecvtbuf.c
newlib/libc/stdlib/efgcvt.c
newlib/libc/stdlib/environ.c
newlib/libc/stdlib/envlock.c
newlib/libc/stdlib/eprintf.c
newlib/libc/stdlib/erand48.c
newlib/libc/stdlib/exit.c
newlib/libc/stdlib/gd_qnan.h
newlib/libc/stdlib/gdtoa-gethex.c
newlib/libc/stdlib/gdtoa-hexnan.c
newlib/libc/stdlib/gdtoa.h
newlib/libc/stdlib/getenv.c
newlib/libc/stdlib/getenv_r.c
newlib/libc/stdlib/getopt.c
newlib/libc/stdlib/getsubopt.3
newlib/libc/stdlib/getsubopt.c
newlib/libc/stdlib/jrand48.c
newlib/libc/stdlib/l64a.c
newlib/libc/stdlib/labs.c
newlib/libc/stdlib/lcong48.c
newlib/libc/stdlib/ldiv.c
newlib/libc/stdlib/ldtoa.c
newlib/libc/stdlib/llabs.c
newlib/libc/stdlib/lldiv.c
newlib/libc/stdlib/local.h
newlib/libc/stdlib/lrand48.c
newlib/libc/stdlib/malign.c
newlib/libc/stdlib/malloc.c
newlib/libc/stdlib/mallocr.c
newlib/libc/stdlib/mbctype.h
newlib/libc/stdlib/mblen.c
newlib/libc/stdlib/mblen_r.c
newlib/libc/stdlib/mbrlen.c
newlib/libc/stdlib/mbrtowc.c
newlib/libc/stdlib/mbsinit.c
newlib/libc/stdlib/mbsnrtowcs.c
newlib/libc/stdlib/mbsrtowcs.c
newlib/libc/stdlib/mbstowcs.c
newlib/libc/stdlib/mbstowcs_r.c
newlib/libc/stdlib/mbtowc.c
newlib/libc/stdlib/mbtowc_r.c
newlib/libc/stdlib/mlock.c
newlib/libc/stdlib/mprec.c
newlib/libc/stdlib/mprec.h
newlib/libc/stdlib/mrand48.c
newlib/libc/stdlib/msize.c
newlib/libc/stdlib/mstats.c
newlib/libc/stdlib/mtrim.c
newlib/libc/stdlib/nrand48.c
newlib/libc/stdlib/on_exit.c
newlib/libc/stdlib/putenv.c
newlib/libc/stdlib/putenv_r.c
newlib/libc/stdlib/rand.c
newlib/libc/stdlib/rand48.c
newlib/libc/stdlib/rand48.h
newlib/libc/stdlib/rand_r.c
newlib/libc/stdlib/realloc.c
newlib/libc/stdlib/reallocf.c
newlib/libc/stdlib/sb_charsets.c
newlib/libc/stdlib/seed48.c
newlib/libc/stdlib/setenv.c
newlib/libc/stdlib/setenv_r.c
newlib/libc/stdlib/srand48.c
newlib/libc/stdlib/std.h
newlib/libc/stdlib/stdlib.tex
newlib/libc/stdlib/strtod.c
newlib/libc/stdlib/strtol.c
newlib/libc/stdlib/strtold.c
newlib/libc/stdlib/strtoll.c
newlib/libc/stdlib/strtoll_r.c
newlib/libc/stdlib/strtoul.c
newlib/libc/stdlib/strtoull.c
newlib/libc/stdlib/strtoull_r.c
newlib/libc/stdlib/system.c
newlib/libc/stdlib/valloc.c
newlib/libc/stdlib/wcrtomb.c
newlib/libc/stdlib/wcsnrtombs.c
newlib/libc/stdlib/wcsrtombs.c
newlib/libc/stdlib/wcstod.c
newlib/libc/stdlib/wcstol.c
newlib/libc/stdlib/wcstold.c
newlib/libc/stdlib/wcstoll.c
newlib/libc/stdlib/wcstoll_r.c
newlib/libc/stdlib/wcstombs.c
newlib/libc/stdlib/wcstombs_r.c
newlib/libc/stdlib/wcstoul.c
newlib/libc/stdlib/wcstoull.c
newlib/libc/stdlib/wcstoull_r.c
newlib/libc/stdlib/wctob.c
newlib/libc/stdlib/wctomb.c
newlib/libc/stdlib/wctomb_r.c
newlib/libc/string/Makefile.am
newlib/libc/string/Makefile.in
newlib/libc/string/bcmp.c
newlib/libc/string/bcopy.c
newlib/libc/string/bzero.c
newlib/libc/string/index.c
newlib/libc/string/local.h
newlib/libc/string/memccpy.c
newlib/libc/string/memchr.c
newlib/libc/string/memcmp.c
newlib/libc/string/memcpy.c
newlib/libc/string/memmem.c
newlib/libc/string/memmove.c
newlib/libc/string/mempcpy.c
newlib/libc/string/memset.c
newlib/libc/string/rindex.c
newlib/libc/string/stpcpy.c
newlib/libc/string/stpncpy.c
newlib/libc/string/str-two-way.h
newlib/libc/string/strcasecmp.c
newlib/libc/string/strcasestr.c
newlib/libc/string/strcat.c
newlib/libc/string/strchr.c
newlib/libc/string/strcmp.c
newlib/libc/string/strcoll.c
newlib/libc/string/strcpy.c
newlib/libc/string/strcspn.c
newlib/libc/string/strdup.c
newlib/libc/string/strdup_r.c
newlib/libc/string/strerror.c
newlib/libc/string/strerror_r.c
newlib/libc/string/strings.tex
newlib/libc/string/strlcat.c
newlib/libc/string/strlcpy.c
newlib/libc/string/strlen.c
newlib/libc/string/strlwr.c
newlib/libc/string/strncasecmp.c
newlib/libc/string/strncat.c
newlib/libc/string/strncmp.c
newlib/libc/string/strncpy.c
newlib/libc/string/strndup.c
newlib/libc/string/strndup_r.c
newlib/libc/string/strnlen.c
newlib/libc/string/strpbrk.c
newlib/libc/string/strrchr.c
newlib/libc/string/strsep.c
newlib/libc/string/strspn.c
newlib/libc/string/strstr.c
newlib/libc/string/strtok.c
newlib/libc/string/strtok_r.c
newlib/libc/string/strupr.c
newlib/libc/string/strxfrm.c
newlib/libc/string/swab.c
newlib/libc/string/u_strerr.c
newlib/libc/string/wcpcpy.c
newlib/libc/string/wcpncpy.c
newlib/libc/string/wcscasecmp.c
newlib/libc/string/wcscat.c
newlib/libc/string/wcschr.c
newlib/libc/string/wcscmp.c
newlib/libc/string/wcscoll.c
newlib/libc/string/wcscpy.c
newlib/libc/string/wcscspn.c
newlib/libc/string/wcsdup.c
newlib/libc/string/wcslcat.c
newlib/libc/string/wcslcpy.c
newlib/libc/string/wcslen.c
newlib/libc/string/wcsncasecmp.c
newlib/libc/string/wcsncat.c
newlib/libc/string/wcsncmp.c
newlib/libc/string/wcsncpy.c
newlib/libc/string/wcsnlen.c
newlib/libc/string/wcspbrk.c
newlib/libc/string/wcsrchr.c
newlib/libc/string/wcsspn.c
newlib/libc/string/wcsstr.c
newlib/libc/string/wcstok.c
newlib/libc/string/wcstrings.tex
newlib/libc/string/wcswidth.c
newlib/libc/string/wcsxfrm.c
newlib/libc/string/wcwidth.c
newlib/libc/string/wmemchr.c
newlib/libc/string/wmemcmp.c
newlib/libc/string/wmemcpy.c
newlib/libc/string/wmemmove.c
newlib/libc/string/wmemset.c
newlib/libc/sys.tex
newlib/libc/sys/Makefile.am
newlib/libc/sys/Makefile.in
newlib/libc/sys/a29khif/Makefile.am
newlib/libc/sys/a29khif/Makefile.in
newlib/libc/sys/a29khif/_alloc.S
newlib/libc/sys/a29khif/_close.S
newlib/libc/sys/a29khif/_cycles.S
newlib/libc/sys/a29khif/_exit.S
newlib/libc/sys/a29khif/_fstat.S
newlib/libc/sys/a29khif/_getpsiz.S
newlib/libc/sys/a29khif/_gettz.S
newlib/libc/sys/a29khif/_ioctl.S
newlib/libc/sys/a29khif/_iostat.S
newlib/libc/sys/a29khif/_iowait.S
newlib/libc/sys/a29khif/_isatty.S
newlib/libc/sys/a29khif/_lseek.S
newlib/libc/sys/a29khif/_open.S
newlib/libc/sys/a29khif/_query.S
newlib/libc/sys/a29khif/_read.S
newlib/libc/sys/a29khif/_sbrk.S
newlib/libc/sys/a29khif/_setim.S
newlib/libc/sys/a29khif/_settrap.S
newlib/libc/sys/a29khif/_setvec.S
newlib/libc/sys/a29khif/_tmpnam.S
newlib/libc/sys/a29khif/_write.S
newlib/libc/sys/a29khif/aclocal.m4
newlib/libc/sys/a29khif/alloc.S
newlib/libc/sys/a29khif/clock.S
newlib/libc/sys/a29khif/configure
newlib/libc/sys/a29khif/configure.in
newlib/libc/sys/a29khif/crt0.S
newlib/libc/sys/a29khif/getargs.S
newlib/libc/sys/a29khif/getenv.S
newlib/libc/sys/a29khif/getpid.c
newlib/libc/sys/a29khif/kill.c
newlib/libc/sys/a29khif/read.S
newlib/libc/sys/a29khif/remove.S
newlib/libc/sys/a29khif/rename.S
newlib/libc/sys/a29khif/signal.S
newlib/libc/sys/a29khif/stubs.S
newlib/libc/sys/a29khif/sys/cpudef.h
newlib/libc/sys/a29khif/sys/fpsymbol.h
newlib/libc/sys/a29khif/sys/intrinsi.h
newlib/libc/sys/a29khif/sys/macros.h
newlib/libc/sys/a29khif/sys/proreg.h
newlib/libc/sys/a29khif/sys/romdcl.h
newlib/libc/sys/a29khif/sys/smartmac.h
newlib/libc/sys/a29khif/sys/sysmac.h
newlib/libc/sys/a29khif/systime.S
newlib/libc/sys/a29khif/vec.S
newlib/libc/sys/aclocal.m4
newlib/libc/sys/arc/Makefile.am
newlib/libc/sys/arc/Makefile.in
newlib/libc/sys/arc/aclocal.m4
newlib/libc/sys/arc/configure
newlib/libc/sys/arc/configure.in
newlib/libc/sys/arc/crt0.S
newlib/libc/sys/arc/dummy.S
newlib/libc/sys/arc/isatty.c
newlib/libc/sys/arc/mem-layout.c
newlib/libc/sys/arc/sbrk.c
newlib/libc/sys/arc/sys/syscall.h
newlib/libc/sys/arc/syscalls.c
newlib/libc/sys/arm/Makefile.am
newlib/libc/sys/arm/Makefile.in
newlib/libc/sys/arm/aclocal.m4
newlib/libc/sys/arm/aeabi_atexit.c
newlib/libc/sys/arm/configure
newlib/libc/sys/arm/configure.in
newlib/libc/sys/arm/crt0.S
newlib/libc/sys/arm/libcfunc.c
newlib/libc/sys/arm/swi.h
newlib/libc/sys/arm/sys/fcntl.h
newlib/libc/sys/arm/sys/param.h
newlib/libc/sys/arm/syscalls.c
newlib/libc/sys/arm/trap.S
newlib/libc/sys/configure
newlib/libc/sys/configure.in
newlib/libc/sys/d10v/Makefile.am
newlib/libc/sys/d10v/Makefile.in
newlib/libc/sys/d10v/aclocal.m4
newlib/libc/sys/d10v/configure
newlib/libc/sys/d10v/configure.in
newlib/libc/sys/d10v/creat.c
newlib/libc/sys/d10v/crt0.S
newlib/libc/sys/d10v/sys/syscall.h
newlib/libc/sys/d10v/syscalls.c
newlib/libc/sys/d10v/trap.S
newlib/libc/sys/decstation/Makefile.am
newlib/libc/sys/decstation/Makefile.in
newlib/libc/sys/decstation/_main.c
newlib/libc/sys/decstation/aclocal.m4
newlib/libc/sys/decstation/configure
newlib/libc/sys/decstation/configure.in
newlib/libc/sys/decstation/sys/dirent.h
newlib/libc/sys/h8300hms/Makefile.am
newlib/libc/sys/h8300hms/Makefile.in
newlib/libc/sys/h8300hms/_exit.S
newlib/libc/sys/h8300hms/aclocal.m4
newlib/libc/sys/h8300hms/close.S
newlib/libc/sys/h8300hms/configure
newlib/libc/sys/h8300hms/configure.in
newlib/libc/sys/h8300hms/crt0.S
newlib/libc/sys/h8300hms/crt1.c
newlib/libc/sys/h8300hms/fstat.S
newlib/libc/sys/h8300hms/lseek.S
newlib/libc/sys/h8300hms/misc.c
newlib/libc/sys/h8300hms/open.S
newlib/libc/sys/h8300hms/read.S
newlib/libc/sys/h8300hms/sbrk.c
newlib/libc/sys/h8300hms/setarch.h
newlib/libc/sys/h8300hms/stat.S
newlib/libc/sys/h8300hms/sys/file.h
newlib/libc/sys/h8300hms/sys/syscall.h
newlib/libc/sys/h8300hms/syscalls.c
newlib/libc/sys/h8300hms/write.S
newlib/libc/sys/h8500hms/Makefile.am
newlib/libc/sys/h8500hms/Makefile.in
newlib/libc/sys/h8500hms/aclocal.m4
newlib/libc/sys/h8500hms/configure
newlib/libc/sys/h8500hms/configure.in
newlib/libc/sys/h8500hms/crt0.c
newlib/libc/sys/h8500hms/misc.c
newlib/libc/sys/h8500hms/syscalls.c
newlib/libc/sys/linux/Makefile.am
newlib/libc/sys/linux/Makefile.in
newlib/libc/sys/linux/aclocal.m4
newlib/libc/sys/linux/aio.c
newlib/libc/sys/linux/aio64.c
newlib/libc/sys/linux/argp/Makefile.am
newlib/libc/sys/linux/argp/Makefile.in
newlib/libc/sys/linux/argp/argp-ba.c
newlib/libc/sys/linux/argp/argp-eexst.c
newlib/libc/sys/linux/argp/argp-fmtstream.c
newlib/libc/sys/linux/argp/argp-fmtstream.h
newlib/libc/sys/linux/argp/argp-fs-xinl.c
newlib/libc/sys/linux/argp/argp-help.c
newlib/libc/sys/linux/argp/argp-namefrob.h
newlib/libc/sys/linux/argp/argp-parse.c
newlib/libc/sys/linux/argp/argp-pv.c
newlib/libc/sys/linux/argp/argp-pvh.c
newlib/libc/sys/linux/argp/argp-xinl.c
newlib/libc/sys/linux/bits/dirent.h
newlib/libc/sys/linux/bits/initspin.h
newlib/libc/sys/linux/bits/libc-lock.h
newlib/libc/sys/linux/bits/pthreadtypes.h
newlib/libc/sys/linux/bits/typesizes.h
newlib/libc/sys/linux/bp-checks.h
newlib/libc/sys/linux/brk.c
newlib/libc/sys/linux/calloc.c
newlib/libc/sys/linux/callocr.c
newlib/libc/sys/linux/cfreer.c
newlib/libc/sys/linux/cfspeed.c
newlib/libc/sys/linux/clock_getres.c
newlib/libc/sys/linux/clock_gettime.c
newlib/libc/sys/linux/clock_settime.c
newlib/libc/sys/linux/cmath/Makefile.am
newlib/libc/sys/linux/cmath/Makefile.in
newlib/libc/sys/linux/cmath/math_private.h
newlib/libc/sys/linux/cmath/s_cacos.c
newlib/libc/sys/linux/cmath/s_cacosf.c
newlib/libc/sys/linux/cmath/s_cacosh.c
newlib/libc/sys/linux/cmath/s_cacoshf.c
newlib/libc/sys/linux/cmath/s_cacoshl.c
newlib/libc/sys/linux/cmath/s_cacosl.c
newlib/libc/sys/linux/cmath/s_casin.c
newlib/libc/sys/linux/cmath/s_casinf.c
newlib/libc/sys/linux/cmath/s_casinh.c
newlib/libc/sys/linux/cmath/s_casinhf.c
newlib/libc/sys/linux/cmath/s_casinhl.c
newlib/libc/sys/linux/cmath/s_casinl.c
newlib/libc/sys/linux/cmath/s_catan.c
newlib/libc/sys/linux/cmath/s_catanf.c
newlib/libc/sys/linux/cmath/s_catanh.c
newlib/libc/sys/linux/cmath/s_catanhf.c
newlib/libc/sys/linux/cmath/s_catanhl.c
newlib/libc/sys/linux/cmath/s_catanl.c
newlib/libc/sys/linux/cmath/s_cbrtl.c
newlib/libc/sys/linux/cmath/s_ccos.c
newlib/libc/sys/linux/cmath/s_ccosf.c
newlib/libc/sys/linux/cmath/s_ccosh.c
newlib/libc/sys/linux/cmath/s_ccoshf.c
newlib/libc/sys/linux/cmath/s_ccoshl.c
newlib/libc/sys/linux/cmath/s_ccosl.c
newlib/libc/sys/linux/cmath/s_cexp.c
newlib/libc/sys/linux/cmath/s_cexpf.c
newlib/libc/sys/linux/cmath/s_cexpl.c
newlib/libc/sys/linux/cmath/s_clog.c
newlib/libc/sys/linux/cmath/s_clog10.c
newlib/libc/sys/linux/cmath/s_clog10f.c
newlib/libc/sys/linux/cmath/s_clog10l.c
newlib/libc/sys/linux/cmath/s_clogf.c
newlib/libc/sys/linux/cmath/s_clogl.c
newlib/libc/sys/linux/cmath/s_cpow.c
newlib/libc/sys/linux/cmath/s_cpowf.c
newlib/libc/sys/linux/cmath/s_cpowl.c
newlib/libc/sys/linux/cmath/s_cproj.c
newlib/libc/sys/linux/cmath/s_cprojf.c
newlib/libc/sys/linux/cmath/s_cprojl.c
newlib/libc/sys/linux/cmath/s_csin.c
newlib/libc/sys/linux/cmath/s_csinf.c
newlib/libc/sys/linux/cmath/s_csinh.c
newlib/libc/sys/linux/cmath/s_csinhf.c
newlib/libc/sys/linux/cmath/s_csinhl.c
newlib/libc/sys/linux/cmath/s_csinl.c
newlib/libc/sys/linux/cmath/s_csqrt.c
newlib/libc/sys/linux/cmath/s_csqrtf.c
newlib/libc/sys/linux/cmath/s_csqrtl.c
newlib/libc/sys/linux/cmath/s_ctan.c
newlib/libc/sys/linux/cmath/s_ctanf.c
newlib/libc/sys/linux/cmath/s_ctanh.c
newlib/libc/sys/linux/cmath/s_ctanhf.c
newlib/libc/sys/linux/cmath/s_ctanhl.c
newlib/libc/sys/linux/cmath/s_ctanl.c
newlib/libc/sys/linux/config.h
newlib/libc/sys/linux/configure
newlib/libc/sys/linux/configure.in
newlib/libc/sys/linux/confstr.c
newlib/libc/sys/linux/confstr.h
newlib/libc/sys/linux/crt1.c
newlib/libc/sys/linux/ctermid.c
newlib/libc/sys/linux/dl/Makefile.am
newlib/libc/sys/linux/dl/Makefile.in
newlib/libc/sys/linux/dl/abi-tag.h
newlib/libc/sys/linux/dl/atomicity.h
newlib/libc/sys/linux/dl/dl-addr.c
newlib/libc/sys/linux/dl/dl-cache.c
newlib/libc/sys/linux/dl/dl-cache.h
newlib/libc/sys/linux/dl/dl-close.c
newlib/libc/sys/linux/dl/dl-debug.c
newlib/libc/sys/linux/dl/dl-deps.c
newlib/libc/sys/linux/dl/dl-dst.h
newlib/libc/sys/linux/dl/dl-error.c
newlib/libc/sys/linux/dl/dl-fini.c
newlib/libc/sys/linux/dl/dl-init.c
newlib/libc/sys/linux/dl/dl-iteratephdr.c
newlib/libc/sys/linux/dl/dl-libc.c
newlib/libc/sys/linux/dl/dl-librecon.h
newlib/libc/sys/linux/dl/dl-load.c
newlib/libc/sys/linux/dl/dl-local.h
newlib/libc/sys/linux/dl/dl-lookup.c
newlib/libc/sys/linux/dl/dl-lookupcfg.h
newlib/libc/sys/linux/dl/dl-minimal.c
newlib/libc/sys/linux/dl/dl-misc.c
newlib/libc/sys/linux/dl/dl-object.c
newlib/libc/sys/linux/dl/dl-open.c
newlib/libc/sys/linux/dl/dl-osinfo.h
newlib/libc/sys/linux/dl/dl-profile.c
newlib/libc/sys/linux/dl/dl-profstub.c
newlib/libc/sys/linux/dl/dl-reloc.c
newlib/libc/sys/linux/dl/dl-runtime.c
newlib/libc/sys/linux/dl/dl-support.c
newlib/libc/sys/linux/dl/dl-sym.c
newlib/libc/sys/linux/dl/dl-version.c
newlib/libc/sys/linux/dl/do-lookup.h
newlib/libc/sys/linux/dl/do-rel.h
newlib/libc/sys/linux/dl/dynamic-link.h
newlib/libc/sys/linux/dl/kernel-features.h
newlib/libc/sys/linux/dl/ldsodefs.h
newlib/libc/sys/linux/dl/libintl.h
newlib/libc/sys/linux/dl/trusted-dirs.h
newlib/libc/sys/linux/dl/unsecvars.h
newlib/libc/sys/linux/fclean.c
newlib/libc/sys/linux/flockfile.c
newlib/libc/sys/linux/fpathconf.c
newlib/libc/sys/linux/free.c
newlib/libc/sys/linux/freer.c
newlib/libc/sys/linux/fstab.c
newlib/libc/sys/linux/fstatvfs.c
newlib/libc/sys/linux/fstatvfs64.c
newlib/libc/sys/linux/ftok.c
newlib/libc/sys/linux/ftw.c
newlib/libc/sys/linux/ftw64.c
newlib/libc/sys/linux/funlockfile.c
newlib/libc/sys/linux/getdate.c
newlib/libc/sys/linux/getdate_err.c
newlib/libc/sys/linux/gethostid.c
newlib/libc/sys/linux/gethostname.c
newlib/libc/sys/linux/getlogin.c
newlib/libc/sys/linux/getopt.c
newlib/libc/sys/linux/getopt1.c
newlib/libc/sys/linux/getpwent.c
newlib/libc/sys/linux/getreent.c
newlib/libc/sys/linux/getrlimit64.c
newlib/libc/sys/linux/getwd.c
newlib/libc/sys/linux/hp-timing.h
newlib/libc/sys/linux/iconv/Makefile.am
newlib/libc/sys/linux/iconv/Makefile.in
newlib/libc/sys/linux/iconv/categories.def
newlib/libc/sys/linux/iconv/dummy-repertoire.c
newlib/libc/sys/linux/iconv/gconv.c
newlib/libc/sys/linux/iconv/gconv_builtin.c
newlib/libc/sys/linux/iconv/gconv_builtin.h
newlib/libc/sys/linux/iconv/gconv_cache.c
newlib/libc/sys/linux/iconv/gconv_charset.h
newlib/libc/sys/linux/iconv/gconv_close.c
newlib/libc/sys/linux/iconv/gconv_conf.c
newlib/libc/sys/linux/iconv/gconv_db.c
newlib/libc/sys/linux/iconv/gconv_dl.c
newlib/libc/sys/linux/iconv/gconv_int.h
newlib/libc/sys/linux/iconv/gconv_open.c
newlib/libc/sys/linux/iconv/gconv_simple.c
newlib/libc/sys/linux/iconv/gconv_trans.c
newlib/libc/sys/linux/iconv/hash-string.h
newlib/libc/sys/linux/iconv/iconv.c
newlib/libc/sys/linux/iconv/iconv.h
newlib/libc/sys/linux/iconv/iconv_charmap.c
newlib/libc/sys/linux/iconv/iconv_close.c
newlib/libc/sys/linux/iconv/iconv_open.c
newlib/libc/sys/linux/iconv/iconvconfig.h
newlib/libc/sys/linux/iconv/loadinfo.h
newlib/libc/sys/linux/iconv/localeinfo.h
newlib/libc/sys/linux/iconv/loop.c
newlib/libc/sys/linux/iconv/skeleton.c
newlib/libc/sys/linux/ids.c
newlib/libc/sys/linux/include/argp.h
newlib/libc/sys/linux/include/arpa/ftp.h
newlib/libc/sys/linux/include/arpa/inet.h
newlib/libc/sys/linux/include/arpa/nameser.h
newlib/libc/sys/linux/include/arpa/nameser_compat.h
newlib/libc/sys/linux/include/arpa/telnet.h
newlib/libc/sys/linux/include/arpa/tftp.h
newlib/libc/sys/linux/include/bp-sym.h
newlib/libc/sys/linux/include/cmathcalls.h
newlib/libc/sys/linux/include/complex.h
newlib/libc/sys/linux/include/dl-hash.h
newlib/libc/sys/linux/include/dlfcn.h
newlib/libc/sys/linux/include/fnmatch.h
newlib/libc/sys/linux/include/gconv.h
newlib/libc/sys/linux/include/getopt.h
newlib/libc/sys/linux/include/glob.h
newlib/libc/sys/linux/include/hesiod.h
newlib/libc/sys/linux/include/iconv.h
newlib/libc/sys/linux/include/ifaddrs.h
newlib/libc/sys/linux/include/limits.h
newlib/libc/sys/linux/include/link.h
newlib/libc/sys/linux/include/ltdl.h
newlib/libc/sys/linux/include/malloc.h
newlib/libc/sys/linux/include/mcheck.h
newlib/libc/sys/linux/include/mqueue.h
newlib/libc/sys/linux/include/namespace.h
newlib/libc/sys/linux/include/net/bpf.h
newlib/libc/sys/linux/include/net/bpf_compat.h
newlib/libc/sys/linux/include/net/bpfdesc.h
newlib/libc/sys/linux/include/net/bridge.h
newlib/libc/sys/linux/include/net/ethernet.h
newlib/libc/sys/linux/include/net/fddi.h
newlib/libc/sys/linux/include/net/if.h
newlib/libc/sys/linux/include/net/if_arc.h
newlib/libc/sys/linux/include/net/if_arp.h
newlib/libc/sys/linux/include/net/if_dl.h
newlib/libc/sys/linux/include/net/if_gif.h
newlib/libc/sys/linux/include/net/if_ieee80211.h
newlib/libc/sys/linux/include/net/if_llc.h
newlib/libc/sys/linux/include/net/if_mib.h
newlib/libc/sys/linux/include/net/if_ppp.h
newlib/libc/sys/linux/include/net/if_slvar.h
newlib/libc/sys/linux/include/net/if_sppp.h
newlib/libc/sys/linux/include/net/if_stf.h
newlib/libc/sys/linux/include/net/if_tap.h
newlib/libc/sys/linux/include/net/if_tapvar.h
newlib/libc/sys/linux/include/net/if_tun.h
newlib/libc/sys/linux/include/net/if_tunvar.h
newlib/libc/sys/linux/include/net/if_types.h
newlib/libc/sys/linux/include/net/if_var.h
newlib/libc/sys/linux/include/net/if_vlan_var.h
newlib/libc/sys/linux/include/net/intrq.h
newlib/libc/sys/linux/include/net/iso88025.h
newlib/libc/sys/linux/include/net/net_osdep.h
newlib/libc/sys/linux/include/net/netisr.h
newlib/libc/sys/linux/include/net/pfil.h
newlib/libc/sys/linux/include/net/pfkeyv2.h
newlib/libc/sys/linux/include/net/ppp_comp.h
newlib/libc/sys/linux/include/net/ppp_defs.h
newlib/libc/sys/linux/include/net/radix.h
newlib/libc/sys/linux/include/net/raw_cb.h
newlib/libc/sys/linux/include/net/route.h
newlib/libc/sys/linux/include/net/slcompress.h
newlib/libc/sys/linux/include/net/slip.h
newlib/libc/sys/linux/include/net/zlib.h
newlib/libc/sys/linux/include/netconfig.h
newlib/libc/sys/linux/include/netdb.h
newlib/libc/sys/linux/include/netinet/icmp6.h
newlib/libc/sys/linux/include/netinet/icmp_var.h
newlib/libc/sys/linux/include/netinet/if_ether.h
newlib/libc/sys/linux/include/netinet/igmp.h
newlib/libc/sys/linux/include/netinet/igmp_var.h
newlib/libc/sys/linux/include/netinet/in.h
newlib/libc/sys/linux/include/netinet/in_gif.h
newlib/libc/sys/linux/include/netinet/in_pcb.h
newlib/libc/sys/linux/include/netinet/in_systm.h
newlib/libc/sys/linux/include/netinet/in_var.h
newlib/libc/sys/linux/include/netinet/ip.h
newlib/libc/sys/linux/include/netinet/ip6.h
newlib/libc/sys/linux/include/netinet/ip_dummynet.h
newlib/libc/sys/linux/include/netinet/ip_ecn.h
newlib/libc/sys/linux/include/netinet/ip_encap.h
newlib/libc/sys/linux/include/netinet/ip_fw.h
newlib/libc/sys/linux/include/netinet/ip_icmp.h
newlib/libc/sys/linux/include/netinet/ip_mroute.h
newlib/libc/sys/linux/include/netinet/ip_var.h
newlib/libc/sys/linux/include/netinet/ipprotosw.h
newlib/libc/sys/linux/include/netinet/tcp.h
newlib/libc/sys/linux/include/netinet/tcp_debug.h
newlib/libc/sys/linux/include/netinet/tcp_fsm.h
newlib/libc/sys/linux/include/netinet/tcp_seq.h
newlib/libc/sys/linux/include/netinet/tcp_timer.h
newlib/libc/sys/linux/include/netinet/tcp_var.h
newlib/libc/sys/linux/include/netinet/tcpip.h
newlib/libc/sys/linux/include/netinet/udp.h
newlib/libc/sys/linux/include/netinet/udp_var.h
newlib/libc/sys/linux/include/netinet6/ah.h
newlib/libc/sys/linux/include/netinet6/ah6.h
newlib/libc/sys/linux/include/netinet6/esp.h
newlib/libc/sys/linux/include/netinet6/esp6.h
newlib/libc/sys/linux/include/netinet6/esp_rijndael.h
newlib/libc/sys/linux/include/netinet6/icmp6.h
newlib/libc/sys/linux/include/netinet6/in6.h
newlib/libc/sys/linux/include/netinet6/in6_gif.h
newlib/libc/sys/linux/include/netinet6/in6_ifattach.h
newlib/libc/sys/linux/include/netinet6/in6_pcb.h
newlib/libc/sys/linux/include/netinet6/in6_prefix.h
newlib/libc/sys/linux/include/netinet6/in6_var.h
newlib/libc/sys/linux/include/netinet6/ip6.h
newlib/libc/sys/linux/include/netinet6/ip6_ecn.h
newlib/libc/sys/linux/include/netinet6/ip6_fw.h
newlib/libc/sys/linux/include/netinet6/ip6_mroute.h
newlib/libc/sys/linux/include/netinet6/ip6_var.h
newlib/libc/sys/linux/include/netinet6/ip6protosw.h
newlib/libc/sys/linux/include/netinet6/ipcomp.h
newlib/libc/sys/linux/include/netinet6/ipcomp6.h
newlib/libc/sys/linux/include/netinet6/ipsec.h
newlib/libc/sys/linux/include/netinet6/ipsec6.h
newlib/libc/sys/linux/include/netinet6/mld6_var.h
newlib/libc/sys/linux/include/netinet6/nd6.h
newlib/libc/sys/linux/include/netinet6/pim6.h
newlib/libc/sys/linux/include/netinet6/pim6_var.h
newlib/libc/sys/linux/include/netinet6/raw_ip6.h
newlib/libc/sys/linux/include/netinet6/scope6_var.h
newlib/libc/sys/linux/include/netinet6/tcp6_var.h
newlib/libc/sys/linux/include/netinet6/udp6_var.h
newlib/libc/sys/linux/include/netns/idp.h
newlib/libc/sys/linux/include/netns/idp_var.h
newlib/libc/sys/linux/include/netns/ns.h
newlib/libc/sys/linux/include/netns/ns_error.h
newlib/libc/sys/linux/include/netns/ns_if.h
newlib/libc/sys/linux/include/netns/ns_pcb.h
newlib/libc/sys/linux/include/netns/sp.h
newlib/libc/sys/linux/include/netns/spidp.h
newlib/libc/sys/linux/include/netns/spp_debug.h
newlib/libc/sys/linux/include/netns/spp_timer.h
newlib/libc/sys/linux/include/netns/spp_var.h
newlib/libc/sys/linux/include/paths.h
newlib/libc/sys/linux/include/pthread.h
newlib/libc/sys/linux/include/regex.h
newlib/libc/sys/linux/include/resolv.h
newlib/libc/sys/linux/include/rpc/Makefile
newlib/libc/sys/linux/include/rpc/auth.h
newlib/libc/sys/linux/include/rpc/auth_des.h
newlib/libc/sys/linux/include/rpc/auth_kerb.h
newlib/libc/sys/linux/include/rpc/auth_unix.h
newlib/libc/sys/linux/include/rpc/clnt.h
newlib/libc/sys/linux/include/rpc/clnt_soc.h
newlib/libc/sys/linux/include/rpc/clnt_stat.h
newlib/libc/sys/linux/include/rpc/des.h
newlib/libc/sys/linux/include/rpc/des_crypt.h
newlib/libc/sys/linux/include/rpc/nettype.h
newlib/libc/sys/linux/include/rpc/pmap_clnt.h
newlib/libc/sys/linux/include/rpc/pmap_prot.h
newlib/libc/sys/linux/include/rpc/pmap_rmt.h
newlib/libc/sys/linux/include/rpc/raw.h
newlib/libc/sys/linux/include/rpc/rpc.h
newlib/libc/sys/linux/include/rpc/rpc_com.h
newlib/libc/sys/linux/include/rpc/rpc_msg.h
newlib/libc/sys/linux/include/rpc/rpcb_clnt.h
newlib/libc/sys/linux/include/rpc/rpcb_prot.h
newlib/libc/sys/linux/include/rpc/rpcb_prot.x
newlib/libc/sys/linux/include/rpc/rpcent.h
newlib/libc/sys/linux/include/rpc/svc.h
newlib/libc/sys/linux/include/rpc/svc_auth.h
newlib/libc/sys/linux/include/rpc/svc_dg.h
newlib/libc/sys/linux/include/rpc/svc_soc.h
newlib/libc/sys/linux/include/rpc/types.h
newlib/libc/sys/linux/include/rpc/xdr.h
newlib/libc/sys/linux/include/rune.h
newlib/libc/sys/linux/include/runetype.h
newlib/libc/sys/linux/include/sched.h
newlib/libc/sys/linux/include/semaphore.h
newlib/libc/sys/linux/include/setjmp.h
newlib/libc/sys/linux/include/setlocale.h
newlib/libc/sys/linux/include/stdint.h
newlib/libc/sys/linux/include/time.h
newlib/libc/sys/linux/include/un-namespace.h
newlib/libc/sys/linux/include/unistd.h
newlib/libc/sys/linux/include/wordexp.h
newlib/libc/sys/linux/inode.c
newlib/libc/sys/linux/internal_statvfs.c
newlib/libc/sys/linux/intl/Makefile.am
newlib/libc/sys/linux/intl/Makefile.in
newlib/libc/sys/linux/intl/bindtextdom.c
newlib/libc/sys/linux/intl/catgets.c
newlib/libc/sys/linux/intl/catgetsinfo.h
newlib/libc/sys/linux/intl/config.h
newlib/libc/sys/linux/intl/dcgettext.c
newlib/libc/sys/linux/intl/dcigettext.c
newlib/libc/sys/linux/intl/dcngettext.c
newlib/libc/sys/linux/intl/dgettext.c
newlib/libc/sys/linux/intl/dngettext.c
newlib/libc/sys/linux/intl/explodename.c
newlib/libc/sys/linux/intl/finddomain.c
newlib/libc/sys/linux/intl/gettext.c
newlib/libc/sys/linux/intl/gettext.h
newlib/libc/sys/linux/intl/gettextP.h
newlib/libc/sys/linux/intl/hash-string.h
newlib/libc/sys/linux/intl/l10nflist.c
newlib/libc/sys/linux/intl/lcl_stpcpy.c
newlib/libc/sys/linux/intl/loadinfo.h
newlib/libc/sys/linux/intl/loadmsgcat.c
newlib/libc/sys/linux/intl/localealias.c
newlib/libc/sys/linux/intl/ngettext.c
newlib/libc/sys/linux/intl/open_catalog.c
newlib/libc/sys/linux/intl/plural.c
newlib/libc/sys/linux/intl/plural.y
newlib/libc/sys/linux/intl/textdomain.c
newlib/libc/sys/linux/io.c
newlib/libc/sys/linux/io64.c
newlib/libc/sys/linux/ipc.c
newlib/libc/sys/linux/isatty.c
newlib/libc/sys/linux/kernel_sigaction.h
newlib/libc/sys/linux/libc-internal.h
newlib/libc/sys/linux/libc-symbols.h
newlib/libc/sys/linux/libc-tsd.h
newlib/libc/sys/linux/libintl.h
newlib/libc/sys/linux/linux.c
newlib/libc/sys/linux/linux_fsinfo.h
newlib/libc/sys/linux/linuxthreads/LICENSE
newlib/libc/sys/linux/linuxthreads/Makefile.am
newlib/libc/sys/linux/linuxthreads/Makefile.in
newlib/libc/sys/linux/linuxthreads/aclocal.m4
newlib/libc/sys/linux/linuxthreads/attr.c
newlib/libc/sys/linux/linuxthreads/barrier.c
newlib/libc/sys/linux/linuxthreads/bits/initspin.h
newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h
newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h
newlib/libc/sys/linux/linuxthreads/bits/local_lim.h
newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h
newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h
newlib/libc/sys/linux/linuxthreads/bits/sigthread.h
newlib/libc/sys/linux/linuxthreads/bp-sym.h
newlib/libc/sys/linux/linuxthreads/cancel.c
newlib/libc/sys/linux/linuxthreads/condvar.c
newlib/libc/sys/linux/linuxthreads/config.h
newlib/libc/sys/linux/linuxthreads/configure
newlib/libc/sys/linux/linuxthreads/configure.in
newlib/libc/sys/linux/linuxthreads/defs.awk
newlib/libc/sys/linux/linuxthreads/ecmutex.c
newlib/libc/sys/linux/linuxthreads/events.c
newlib/libc/sys/linux/linuxthreads/getcpuclockid.c
newlib/libc/sys/linux/linuxthreads/getreent.c
newlib/libc/sys/linux/linuxthreads/internals.h
newlib/libc/sys/linux/linuxthreads/join.c
newlib/libc/sys/linux/linuxthreads/joinrace.c
newlib/libc/sys/linux/linuxthreads/kernel-features.h
newlib/libc/sys/linux/linuxthreads/libc-internal.h
newlib/libc/sys/linux/linuxthreads/libc-symbols.h
newlib/libc/sys/linux/linuxthreads/linuxthreads.texi
newlib/libc/sys/linux/linuxthreads/lockfile.c
newlib/libc/sys/linux/linuxthreads/machine/Makefile.am
newlib/libc/sys/linux/linuxthreads/machine/Makefile.in
newlib/libc/sys/linux/linuxthreads/machine/aclocal.m4
newlib/libc/sys/linux/linuxthreads/machine/configure
newlib/libc/sys/linux/linuxthreads/machine/configure.in
newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h
newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am
newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in
newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m4
newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h
newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S
newlib/libc/sys/linux/linuxthreads/machine/i386/configure
newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in
newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S
newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h
newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c
newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h
newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h
newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h
newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S
newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h
newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h
newlib/libc/sys/linux/linuxthreads/manager.c
newlib/libc/sys/linux/linuxthreads/mq_notify.c
newlib/libc/sys/linux/linuxthreads/mutex.c
newlib/libc/sys/linux/linuxthreads/no-tsd.c
newlib/libc/sys/linux/linuxthreads/oldsemaphore.c
newlib/libc/sys/linux/linuxthreads/posix-timer.h
newlib/libc/sys/linux/linuxthreads/prio.c
newlib/libc/sys/linux/linuxthreads/proc_service.h
newlib/libc/sys/linux/linuxthreads/pt-machine.c
newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c
newlib/libc/sys/linux/linuxthreads/ptclock_settime.c
newlib/libc/sys/linux/linuxthreads/ptfork.c
newlib/libc/sys/linux/linuxthreads/pthread.c
newlib/libc/sys/linux/linuxthreads/ptlongjmp.c
newlib/libc/sys/linux/linuxthreads/queue.h
newlib/libc/sys/linux/linuxthreads/reent.c
newlib/libc/sys/linux/linuxthreads/reqsyscalls.c
newlib/libc/sys/linux/linuxthreads/restart.h
newlib/libc/sys/linux/linuxthreads/rwlock.c
newlib/libc/sys/linux/linuxthreads/semaphore.c
newlib/libc/sys/linux/linuxthreads/semaphore.h
newlib/libc/sys/linux/linuxthreads/shlib-compat.h
newlib/libc/sys/linux/linuxthreads/signals.c
newlib/libc/sys/linux/linuxthreads/specific.c
newlib/libc/sys/linux/linuxthreads/spinlock.c
newlib/libc/sys/linux/linuxthreads/spinlock.h
newlib/libc/sys/linux/linuxthreads/sysctl.c
newlib/libc/sys/linux/linuxthreads/td_init.c
newlib/libc/sys/linux/linuxthreads/td_log.c
newlib/libc/sys/linux/linuxthreads/td_symbol_list.c
newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c
newlib/libc/sys/linux/linuxthreads/td_ta_delete.c
newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c
newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c
newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c
newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c
newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c
newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c
newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c
newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c
newlib/libc/sys/linux/linuxthreads/td_ta_new.c
newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c
newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c
newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c
newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c
newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c
newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c
newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c
newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c
newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c
newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c
newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c
newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c
newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c
newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c
newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c
newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c
newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c
newlib/libc/sys/linux/linuxthreads/td_thr_validate.c
newlib/libc/sys/linux/linuxthreads/testrtsig.h
newlib/libc/sys/linux/linuxthreads/thread_db.h
newlib/libc/sys/linux/linuxthreads/thread_dbP.h
newlib/libc/sys/linux/linuxthreads/timer_create.c
newlib/libc/sys/linux/linuxthreads/timer_delete.c
newlib/libc/sys/linux/linuxthreads/timer_getoverr.c
newlib/libc/sys/linux/linuxthreads/timer_gettime.c
newlib/libc/sys/linux/linuxthreads/timer_routines.c
newlib/libc/sys/linux/linuxthreads/timer_settime.c
newlib/libc/sys/linux/linuxthreads/tst-cancel.c
newlib/libc/sys/linux/linuxthreads/tst-context.c
newlib/libc/sys/linux/linuxthreads/tststack.c
newlib/libc/sys/linux/linuxthreads/unload.c
newlib/libc/sys/linux/linuxthreads/weaks.c
newlib/libc/sys/linux/linuxthreads/wrapsyscall.c
newlib/libc/sys/linux/machine/Makefile.am
newlib/libc/sys/linux/machine/Makefile.in
newlib/libc/sys/linux/machine/aclocal.m4
newlib/libc/sys/linux/machine/configure
newlib/libc/sys/linux/machine/configure.in
newlib/libc/sys/linux/machine/hp-timing.h
newlib/libc/sys/linux/machine/i386/Makefile.am
newlib/libc/sys/linux/machine/i386/Makefile.in
newlib/libc/sys/linux/machine/i386/aclocal.m4
newlib/libc/sys/linux/machine/i386/atomic.h
newlib/libc/sys/linux/machine/i386/configure
newlib/libc/sys/linux/machine/i386/configure.in
newlib/libc/sys/linux/machine/i386/crt0.c
newlib/libc/sys/linux/machine/i386/dl-machine.h
newlib/libc/sys/linux/machine/i386/dl-procinfo.c
newlib/libc/sys/linux/machine/i386/dl-procinfo.h
newlib/libc/sys/linux/machine/i386/get_clockfreq.c
newlib/libc/sys/linux/machine/i386/getpagesize.c
newlib/libc/sys/linux/machine/i386/hp-timing.c
newlib/libc/sys/linux/machine/i386/hp-timing.h
newlib/libc/sys/linux/machine/i386/huge_val.h
newlib/libc/sys/linux/machine/i386/i386mach.h
newlib/libc/sys/linux/machine/i386/include/endian.h
newlib/libc/sys/linux/machine/i386/include/param.h
newlib/libc/sys/linux/machine/i386/include/setjmp.h
newlib/libc/sys/linux/machine/i386/include/termios.h
newlib/libc/sys/linux/machine/i386/setjmp.S
newlib/libc/sys/linux/machine/i386/sigaction.c
newlib/libc/sys/linux/machine/i386/sigstack.h
newlib/libc/sys/linux/machine/i386/socketcall.h
newlib/libc/sys/linux/machine/i386/syscall.h
newlib/libc/sys/linux/machine/i386/sysdep.h
newlib/libc/sys/linux/machine/i386/weakalias.h
newlib/libc/sys/linux/malign.c
newlib/libc/sys/linux/malignr.c
newlib/libc/sys/linux/mallinfor.c
newlib/libc/sys/linux/malloc.c
newlib/libc/sys/linux/mallocr.c
newlib/libc/sys/linux/malloptr.c
newlib/libc/sys/linux/mallstatsr.c
newlib/libc/sys/linux/mcheck.c
newlib/libc/sys/linux/mhooks.h
newlib/libc/sys/linux/mmap.c
newlib/libc/sys/linux/mntent.c
newlib/libc/sys/linux/mntent_r.c
newlib/libc/sys/linux/mq_close.c
newlib/libc/sys/linux/mq_getattr.c
newlib/libc/sys/linux/mq_notify.c
newlib/libc/sys/linux/mq_open.c
newlib/libc/sys/linux/mq_receive.c
newlib/libc/sys/linux/mq_send.c
newlib/libc/sys/linux/mq_setattr.c
newlib/libc/sys/linux/mq_unlink.c
newlib/libc/sys/linux/mqlocal.h
newlib/libc/sys/linux/msize.c
newlib/libc/sys/linux/msizer.c
newlib/libc/sys/linux/mstats.c
newlib/libc/sys/linux/mtrim.c
newlib/libc/sys/linux/mtrimr.c
newlib/libc/sys/linux/net/Makefile.am
newlib/libc/sys/linux/net/Makefile.in
newlib/libc/sys/linux/net/XXX-lookup.c
newlib/libc/sys/linux/net/addr2ascii.c
newlib/libc/sys/linux/net/alias-lookup.c
newlib/libc/sys/linux/net/aliases.h
newlib/libc/sys/linux/net/ascii2addr.c
newlib/libc/sys/linux/net/base64.c
newlib/libc/sys/linux/net/check_pf.c
newlib/libc/sys/linux/net/databases.def
newlib/libc/sys/linux/net/digits_dots.c
newlib/libc/sys/linux/net/ether_aton.c
newlib/libc/sys/linux/net/ether_aton_r.c
newlib/libc/sys/linux/net/ether_hton.c
newlib/libc/sys/linux/net/ether_line.c
newlib/libc/sys/linux/net/ether_ntoa.c
newlib/libc/sys/linux/net/ether_ntoa_r.c
newlib/libc/sys/linux/net/ether_ntoh.c
newlib/libc/sys/linux/net/etherent.h
newlib/libc/sys/linux/net/ethers-lookup.c
newlib/libc/sys/linux/net/function.def
newlib/libc/sys/linux/net/getXXbyYY.c
newlib/libc/sys/linux/net/getXXbyYY_r.c
newlib/libc/sys/linux/net/getXXent.c
newlib/libc/sys/linux/net/getXXent_r.c
newlib/libc/sys/linux/net/getaddrinfo.c
newlib/libc/sys/linux/net/getaliasent.c
newlib/libc/sys/linux/net/getaliasent_r.c
newlib/libc/sys/linux/net/getaliasname.c
newlib/libc/sys/linux/net/getaliasname_r.c
newlib/libc/sys/linux/net/gethstbyad.c
newlib/libc/sys/linux/net/gethstbyad_r.c
newlib/libc/sys/linux/net/gethstbynm.c
newlib/libc/sys/linux/net/gethstbynm2.c
newlib/libc/sys/linux/net/gethstbynm2_r.c
newlib/libc/sys/linux/net/gethstbynm_r.c
newlib/libc/sys/linux/net/gethstent.c
newlib/libc/sys/linux/net/gethstent_r.c
newlib/libc/sys/linux/net/getnameinfo.c
newlib/libc/sys/linux/net/getnetbyad.c
newlib/libc/sys/linux/net/getnetbyad_r.c
newlib/libc/sys/linux/net/getnetbynm.c
newlib/libc/sys/linux/net/getnetbynm_r.c
newlib/libc/sys/linux/net/getnetent.c
newlib/libc/sys/linux/net/getnetent_r.c
newlib/libc/sys/linux/net/getnetgrent.c
newlib/libc/sys/linux/net/getnetgrent_r.c
newlib/libc/sys/linux/net/getnssent.c
newlib/libc/sys/linux/net/getnssent_r.c
newlib/libc/sys/linux/net/getproto.c
newlib/libc/sys/linux/net/getproto_r.c
newlib/libc/sys/linux/net/getprtent.c
newlib/libc/sys/linux/net/getprtent_r.c
newlib/libc/sys/linux/net/getprtname.c
newlib/libc/sys/linux/net/getprtname_r.c
newlib/libc/sys/linux/net/getrpcbyname.c
newlib/libc/sys/linux/net/getrpcbyname_r.c
newlib/libc/sys/linux/net/getrpcbynumber.c
newlib/libc/sys/linux/net/getrpcbynumber_r.c
newlib/libc/sys/linux/net/getrpcent.c
newlib/libc/sys/linux/net/getrpcent_r.c
newlib/libc/sys/linux/net/getservent.c
newlib/libc/sys/linux/net/getservent_r.c
newlib/libc/sys/linux/net/getsrvbynm.c
newlib/libc/sys/linux/net/getsrvbynm_r.c
newlib/libc/sys/linux/net/getsrvbypt.c
newlib/libc/sys/linux/net/getsrvbypt_r.c
newlib/libc/sys/linux/net/grp-lookup.c
newlib/libc/sys/linux/net/herrno.c
newlib/libc/sys/linux/net/hosts-lookup.c
newlib/libc/sys/linux/net/ifaddrs.h
newlib/libc/sys/linux/net/ifname.c
newlib/libc/sys/linux/net/ifreq.c
newlib/libc/sys/linux/net/ifreq.h
newlib/libc/sys/linux/net/in6_addr.c
newlib/libc/sys/linux/net/inet6_option.c
newlib/libc/sys/linux/net/inet_addr.c
newlib/libc/sys/linux/net/inet_lnaof.c
newlib/libc/sys/linux/net/inet_mkadr.c
newlib/libc/sys/linux/net/inet_net.c
newlib/libc/sys/linux/net/inet_net_ntop.c
newlib/libc/sys/linux/net/inet_net_pton.c
newlib/libc/sys/linux/net/inet_neta.c
newlib/libc/sys/linux/net/inet_netof.c
newlib/libc/sys/linux/net/inet_ntoa.c
newlib/libc/sys/linux/net/inet_ntop.c
newlib/libc/sys/linux/net/inet_pton.c
newlib/libc/sys/linux/net/issetugid-stub.c
newlib/libc/sys/linux/net/key-lookup.c
newlib/libc/sys/linux/net/local.h
newlib/libc/sys/linux/net/netgroup.h
newlib/libc/sys/linux/net/netgrp-lookup.c
newlib/libc/sys/linux/net/network-lookup.c
newlib/libc/sys/linux/net/not-cancel.h
newlib/libc/sys/linux/net/ns_name.c
newlib/libc/sys/linux/net/ns_netint.c
newlib/libc/sys/linux/net/ns_parse.c
newlib/libc/sys/linux/net/ns_print.c
newlib/libc/sys/linux/net/ns_samedomain.c
newlib/libc/sys/linux/net/ns_ttl.c
newlib/libc/sys/linux/net/nsap_addr.c
newlib/libc/sys/linux/net/nscd-types.h
newlib/libc/sys/linux/net/nscd/nscd-client.h
newlib/libc/sys/linux/net/nscd/nscd_proto.h
newlib/libc/sys/linux/net/nss.h
newlib/libc/sys/linux/net/nsswitch.c
newlib/libc/sys/linux/net/nsswitch.h
newlib/libc/sys/linux/net/opensock.c
newlib/libc/sys/linux/net/proto-lookup.c
newlib/libc/sys/linux/net/pwd-lookup.c
newlib/libc/sys/linux/net/rcmd.c
newlib/libc/sys/linux/net/rcmdsh.c
newlib/libc/sys/linux/net/recv.c
newlib/libc/sys/linux/net/res_comp.c
newlib/libc/sys/linux/net/res_data.c
newlib/libc/sys/linux/net/res_debug.c
newlib/libc/sys/linux/net/res_debug.h
newlib/libc/sys/linux/net/res_hconf.c
newlib/libc/sys/linux/net/res_hconf.h
newlib/libc/sys/linux/net/res_init.c
newlib/libc/sys/linux/net/res_libc.c
newlib/libc/sys/linux/net/res_mkquery.c
newlib/libc/sys/linux/net/res_query.c
newlib/libc/sys/linux/net/res_send.c
newlib/libc/sys/linux/net/rexec.c
newlib/libc/sys/linux/net/rpc-lookup.c
newlib/libc/sys/linux/net/ruserpass.c
newlib/libc/sys/linux/net/send.c
newlib/libc/sys/linux/net/service-lookup.c
newlib/libc/sys/linux/net/spwd-lookup.c
newlib/libc/sys/linux/net/un-namespace.h
newlib/libc/sys/linux/ntp_gettime.c
newlib/libc/sys/linux/pathconf.c
newlib/libc/sys/linux/pread.c
newlib/libc/sys/linux/pread64.c
newlib/libc/sys/linux/process.c
newlib/libc/sys/linux/prof-freq.c
newlib/libc/sys/linux/profile.c
newlib/libc/sys/linux/psignal.c
newlib/libc/sys/linux/pvallocr.c
newlib/libc/sys/linux/pwrite.c
newlib/libc/sys/linux/pwrite64.c
newlib/libc/sys/linux/raise.c
newlib/libc/sys/linux/readdir64.c
newlib/libc/sys/linux/realloc.c
newlib/libc/sys/linux/reallocr.c
newlib/libc/sys/linux/realpath.c
newlib/libc/sys/linux/rename.c
newlib/libc/sys/linux/resource.c
newlib/libc/sys/linux/scandir64.c
newlib/libc/sys/linux/sched.c
newlib/libc/sys/linux/select.c
newlib/libc/sys/linux/seteuid.c
newlib/libc/sys/linux/sethostid.c
newlib/libc/sys/linux/sethostname.c
newlib/libc/sys/linux/setrlimit64.c
newlib/libc/sys/linux/shared.ld
newlib/libc/sys/linux/shlib-compat.h
newlib/libc/sys/linux/shm_open.c
newlib/libc/sys/linux/shm_unlink.c
newlib/libc/sys/linux/sig.c
newlib/libc/sys/linux/sigaction.c
newlib/libc/sys/linux/siglongjmp.c
newlib/libc/sys/linux/signal.c
newlib/libc/sys/linux/sigqueue.c
newlib/libc/sys/linux/sigset.c
newlib/libc/sys/linux/sigwait.c
newlib/libc/sys/linux/sleep.c
newlib/libc/sys/linux/socket.c
newlib/libc/sys/linux/sockops.h
newlib/libc/sys/linux/stack.c
newlib/libc/sys/linux/statvfs.c
newlib/libc/sys/linux/statvfs64.c
newlib/libc/sys/linux/strsignal.c
newlib/libc/sys/linux/strverscmp.c
newlib/libc/sys/linux/sys/_types.h
newlib/libc/sys/linux/sys/cdefs.h
newlib/libc/sys/linux/sys/dirent.h
newlib/libc/sys/linux/sys/dlfcn.h
newlib/libc/sys/linux/sys/elfclass.h
newlib/libc/sys/linux/sys/errno.h
newlib/libc/sys/linux/sys/event.h
newlib/libc/sys/linux/sys/fcntl.h
newlib/libc/sys/linux/sys/features.h
newlib/libc/sys/linux/sys/file.h
newlib/libc/sys/linux/sys/ioccom.h
newlib/libc/sys/linux/sys/ioctl.h
newlib/libc/sys/linux/sys/libc-lock.h
newlib/libc/sys/linux/sys/libc-tsd.h
newlib/libc/sys/linux/sys/link.h
newlib/libc/sys/linux/sys/linux_time.h
newlib/libc/sys/linux/sys/lock.h
newlib/libc/sys/linux/sys/param.h
newlib/libc/sys/linux/sys/resource.h
newlib/libc/sys/linux/sys/select.h
newlib/libc/sys/linux/sys/signal.h
newlib/libc/sys/linux/sys/socket.h
newlib/libc/sys/linux/sys/sockio.h
newlib/libc/sys/linux/sys/stat.h
newlib/libc/sys/linux/sys/stdint.h
newlib/libc/sys/linux/sys/stdio.h
newlib/libc/sys/linux/sys/string.h
newlib/libc/sys/linux/sys/termios.h
newlib/libc/sys/linux/sys/time.h
newlib/libc/sys/linux/sys/types.h
newlib/libc/sys/linux/sys/unistd.h
newlib/libc/sys/linux/sys/utime.h
newlib/libc/sys/linux/sys/utmp.h
newlib/libc/sys/linux/sys/utsname.h
newlib/libc/sys/linux/sys/wait.h
newlib/libc/sys/linux/sysconf.c
newlib/libc/sys/linux/sysctl.c
newlib/libc/sys/linux/systat.c
newlib/libc/sys/linux/system.c
newlib/libc/sys/linux/tcdrain.c
newlib/libc/sys/linux/tcsendbrk.c
newlib/libc/sys/linux/termios.c
newlib/libc/sys/linux/thread-m.h
newlib/libc/sys/linux/time.c
newlib/libc/sys/linux/ttyname_r.c
newlib/libc/sys/linux/usleep.c
newlib/libc/sys/linux/utimes.c
newlib/libc/sys/linux/vallocr.c
newlib/libc/sys/linux/versionsort.c
newlib/libc/sys/linux/versionsort64.c
newlib/libc/sys/linux/wait.c
newlib/libc/sys/m88kbug/Makefile.am
newlib/libc/sys/m88kbug/Makefile.in
newlib/libc/sys/m88kbug/aclocal.m4
newlib/libc/sys/m88kbug/configure
newlib/libc/sys/m88kbug/configure.in
newlib/libc/sys/m88kbug/crt0.c
newlib/libc/sys/m88kbug/sys/systraps.h
newlib/libc/sys/m88kbug/syscalls.c
newlib/libc/sys/mmixware/Makefile.am
newlib/libc/sys/mmixware/Makefile.in
newlib/libc/sys/mmixware/_exit.c
newlib/libc/sys/mmixware/access.c
newlib/libc/sys/mmixware/aclocal.m4
newlib/libc/sys/mmixware/chmod.c
newlib/libc/sys/mmixware/chown.c
newlib/libc/sys/mmixware/close.c
newlib/libc/sys/mmixware/configure
newlib/libc/sys/mmixware/configure.in
newlib/libc/sys/mmixware/creat.c
newlib/libc/sys/mmixware/crt0.c
newlib/libc/sys/mmixware/execv.c
newlib/libc/sys/mmixware/execve.c
newlib/libc/sys/mmixware/fork.c
newlib/libc/sys/mmixware/fstat.c
newlib/libc/sys/mmixware/getpid.c
newlib/libc/sys/mmixware/gettime.c
newlib/libc/sys/mmixware/isatty.c
newlib/libc/sys/mmixware/kill.c
newlib/libc/sys/mmixware/link.c
newlib/libc/sys/mmixware/lseek.c
newlib/libc/sys/mmixware/open.c
newlib/libc/sys/mmixware/pipe.c
newlib/libc/sys/mmixware/read.c
newlib/libc/sys/mmixware/sbrk.c
newlib/libc/sys/mmixware/setjmp.S
newlib/libc/sys/mmixware/stat.c
newlib/libc/sys/mmixware/sys/syscall.h
newlib/libc/sys/mmixware/time.c
newlib/libc/sys/mmixware/times.c
newlib/libc/sys/mmixware/unlink.c
newlib/libc/sys/mmixware/utime.c
newlib/libc/sys/mmixware/wait.c
newlib/libc/sys/mmixware/write.c
newlib/libc/sys/netware/Makefile.am
newlib/libc/sys/netware/Makefile.in
newlib/libc/sys/netware/aclocal.m4
newlib/libc/sys/netware/configure
newlib/libc/sys/netware/configure.in
newlib/libc/sys/netware/crt0.c
newlib/libc/sys/netware/getpid.c
newlib/libc/sys/netware/link.c
newlib/libc/sys/rdos/Makefile.am
newlib/libc/sys/rdos/Makefile.in
newlib/libc/sys/rdos/aclocal.m4
newlib/libc/sys/rdos/chown.c
newlib/libc/sys/rdos/close.c
newlib/libc/sys/rdos/config.h
newlib/libc/sys/rdos/configure
newlib/libc/sys/rdos/configure.in
newlib/libc/sys/rdos/crt0.S
newlib/libc/sys/rdos/execve.c
newlib/libc/sys/rdos/fork.c
newlib/libc/sys/rdos/fstat.c
newlib/libc/sys/rdos/getenv.c
newlib/libc/sys/rdos/getpid.c
newlib/libc/sys/rdos/gettod.c
newlib/libc/sys/rdos/isatty.c
newlib/libc/sys/rdos/kill.c
newlib/libc/sys/rdos/link.c
newlib/libc/sys/rdos/lseek.c
newlib/libc/sys/rdos/open.c
newlib/libc/sys/rdos/rdos.S
newlib/libc/sys/rdos/rdos.h
newlib/libc/sys/rdos/rdoshelp.c
newlib/libc/sys/rdos/read.c
newlib/libc/sys/rdos/readlink.c
newlib/libc/sys/rdos/sbrk.c
newlib/libc/sys/rdos/stat.c
newlib/libc/sys/rdos/symlink.c
newlib/libc/sys/rdos/times.c
newlib/libc/sys/rdos/unlink.c
newlib/libc/sys/rdos/user.def
newlib/libc/sys/rdos/wait.c
newlib/libc/sys/rdos/write.c
newlib/libc/sys/rtems/Makefile.am
newlib/libc/sys/rtems/Makefile.in
newlib/libc/sys/rtems/aclocal.m4
newlib/libc/sys/rtems/configure
newlib/libc/sys/rtems/configure.in
newlib/libc/sys/rtems/crt0.c
newlib/libc/sys/rtems/dummysys.c
newlib/libc/sys/rtems/include/limits.h
newlib/libc/sys/rtems/machine/limits.h
newlib/libc/sys/rtems/machine/param.h
newlib/libc/sys/rtems/sys/dirent.h
newlib/libc/sys/rtems/sys/param.h
newlib/libc/sys/rtems/sys/queue.h
newlib/libc/sys/rtems/sys/syslimits.h
newlib/libc/sys/rtems/sys/utime.h
newlib/libc/sys/sh/Makefile.am
newlib/libc/sys/sh/Makefile.in
newlib/libc/sys/sh/aclocal.m4
newlib/libc/sys/sh/configure
newlib/libc/sys/sh/configure.in
newlib/libc/sys/sh/creat.c
newlib/libc/sys/sh/crt0.S
newlib/libc/sys/sh/ftruncate.c
newlib/libc/sys/sh/sys/syscall.h
newlib/libc/sys/sh/syscalls.c
newlib/libc/sys/sh/trap.S
newlib/libc/sys/sh/truncate.c
newlib/libc/sys/sparc64/Makefile.am
newlib/libc/sys/sparc64/Makefile.in
newlib/libc/sys/sparc64/_exit.S
newlib/libc/sys/sparc64/_main.c
newlib/libc/sys/sparc64/aclocal.m4
newlib/libc/sys/sparc64/cerror.S
newlib/libc/sys/sparc64/closedir.c
newlib/libc/sys/sparc64/configure
newlib/libc/sys/sparc64/configure.in
newlib/libc/sys/sparc64/creat.c
newlib/libc/sys/sparc64/crt0.S
newlib/libc/sys/sparc64/dup2.S
newlib/libc/sys/sparc64/execve.S
newlib/libc/sys/sparc64/ieee.c
newlib/libc/sys/sparc64/isatty.c
newlib/libc/sys/sparc64/lstat.S
newlib/libc/sys/sparc64/opendir.c
newlib/libc/sys/sparc64/readdir.c
newlib/libc/sys/sparc64/rewinddir.c
newlib/libc/sys/sparc64/sbrk.S
newlib/libc/sys/sparc64/scandir.c
newlib/libc/sys/sparc64/seekdir.c
newlib/libc/sys/sparc64/sigsetjmp.S
newlib/libc/sys/sparc64/stat.S
newlib/libc/sys/sparc64/sys/dirent.h
newlib/libc/sys/sparc64/sys/fcntl.h
newlib/libc/sys/sparc64/sys/file.h
newlib/libc/sys/sparc64/sys/stat.h
newlib/libc/sys/sparc64/sys/syscall.h
newlib/libc/sys/sparc64/sys/syscallasm.h
newlib/libc/sys/sparc64/sys/termios.h
newlib/libc/sys/sparc64/sys/time.h
newlib/libc/sys/sparc64/sys/utime.h
newlib/libc/sys/sparc64/sys/utmp.h
newlib/libc/sys/sparc64/sys/wait.h
newlib/libc/sys/sparc64/telldir.c
newlib/libc/sys/sparc64/template.S
newlib/libc/sys/sparc64/template_r.S
newlib/libc/sys/sparc64/utime.S
newlib/libc/sys/sparc64/utime2.c
newlib/libc/sys/sparc64/wait.S
newlib/libc/sys/sun4/Makefile.am
newlib/libc/sys/sun4/Makefile.in
newlib/libc/sys/sun4/_main.c
newlib/libc/sys/sun4/aclocal.m4
newlib/libc/sys/sun4/configure
newlib/libc/sys/sun4/configure.in
newlib/libc/sys/sun4/ieee.c
newlib/libc/sys/sun4/sys/dirent.h
newlib/libc/sys/sun4/sys/file.h
newlib/libc/sys/sun4/sys/termios.h
newlib/libc/sys/sun4/sys/utime.h
newlib/libc/sys/sun4/sys/utmp.h
newlib/libc/sys/sun4/sys/wait.h
newlib/libc/sys/sysmec/Makefile.am
newlib/libc/sys/sysmec/Makefile.in
newlib/libc/sys/sysmec/_exit.c
newlib/libc/sys/sysmec/access.c
newlib/libc/sys/sysmec/aclocal.m4
newlib/libc/sys/sysmec/chmod.c
newlib/libc/sys/sysmec/chown.c
newlib/libc/sys/sysmec/close.c
newlib/libc/sys/sysmec/configure
newlib/libc/sys/sysmec/configure.in
newlib/libc/sys/sysmec/creat.c
newlib/libc/sys/sysmec/crt0.S
newlib/libc/sys/sysmec/crt1.c
newlib/libc/sys/sysmec/execv.c
newlib/libc/sys/sysmec/execve.c
newlib/libc/sys/sysmec/fork.c
newlib/libc/sys/sysmec/fstat.c
newlib/libc/sys/sysmec/getpid.c
newlib/libc/sys/sysmec/gettime.c
newlib/libc/sys/sysmec/isatty.c
newlib/libc/sys/sysmec/kill.c
newlib/libc/sys/sysmec/lseek.c
newlib/libc/sys/sysmec/open.c
newlib/libc/sys/sysmec/pipe.c
newlib/libc/sys/sysmec/read.c
newlib/libc/sys/sysmec/sbrk.c
newlib/libc/sys/sysmec/stat.c
newlib/libc/sys/sysmec/sys/syscall.h
newlib/libc/sys/sysmec/time.c
newlib/libc/sys/sysmec/times.c
newlib/libc/sys/sysmec/trap.S
newlib/libc/sys/sysmec/unlink.c
newlib/libc/sys/sysmec/utime.c
newlib/libc/sys/sysmec/wait.c
newlib/libc/sys/sysmec/write.c
newlib/libc/sys/sysnec810/Makefile.am
newlib/libc/sys/sysnec810/Makefile.in
newlib/libc/sys/sysnec810/aclocal.m4
newlib/libc/sys/sysnec810/configure
newlib/libc/sys/sysnec810/configure.in
newlib/libc/sys/sysnec810/crt0.S
newlib/libc/sys/sysnec810/io.S
newlib/libc/sys/sysnec810/misc.c
newlib/libc/sys/sysnec810/sbrk.c
newlib/libc/sys/sysnec810/write.c
newlib/libc/sys/sysnecv850/Makefile.am
newlib/libc/sys/sysnecv850/Makefile.in
newlib/libc/sys/sysnecv850/_exit.c
newlib/libc/sys/sysnecv850/access.c
newlib/libc/sys/sysnecv850/aclocal.m4
newlib/libc/sys/sysnecv850/chmod.c
newlib/libc/sys/sysnecv850/chown.c
newlib/libc/sys/sysnecv850/close.c
newlib/libc/sys/sysnecv850/configure
newlib/libc/sys/sysnecv850/configure.in
newlib/libc/sys/sysnecv850/creat.c
newlib/libc/sys/sysnecv850/crt0.S
newlib/libc/sys/sysnecv850/crt1.c
newlib/libc/sys/sysnecv850/execv.c
newlib/libc/sys/sysnecv850/execve.c
newlib/libc/sys/sysnecv850/fork.c
newlib/libc/sys/sysnecv850/fstat.c
newlib/libc/sys/sysnecv850/getpid.c
newlib/libc/sys/sysnecv850/gettime.c
newlib/libc/sys/sysnecv850/isatty.c
newlib/libc/sys/sysnecv850/kill.c
newlib/libc/sys/sysnecv850/link.c
newlib/libc/sys/sysnecv850/lseek.c
newlib/libc/sys/sysnecv850/open.c
newlib/libc/sys/sysnecv850/pipe.c
newlib/libc/sys/sysnecv850/read.c
newlib/libc/sys/sysnecv850/sbrk.c
newlib/libc/sys/sysnecv850/stat.c
newlib/libc/sys/sysnecv850/sys/syscall.h
newlib/libc/sys/sysnecv850/time.c
newlib/libc/sys/sysnecv850/times.c
newlib/libc/sys/sysnecv850/trap.S
newlib/libc/sys/sysnecv850/unlink.c
newlib/libc/sys/sysnecv850/utime.c
newlib/libc/sys/sysnecv850/wait.c
newlib/libc/sys/sysnecv850/write.c
newlib/libc/sys/sysvi386/Makefile.am
newlib/libc/sys/sysvi386/Makefile.in
newlib/libc/sys/sysvi386/_exit.S
newlib/libc/sys/sysvi386/_longjmp.S
newlib/libc/sys/sysvi386/_setjmp.S
newlib/libc/sys/sysvi386/access.S
newlib/libc/sys/sysvi386/aclocal.m4
newlib/libc/sys/sysvi386/alarm.S
newlib/libc/sys/sysvi386/brk.S
newlib/libc/sys/sysvi386/cerror.S
newlib/libc/sys/sysvi386/chdir.S
newlib/libc/sys/sysvi386/chmod.S
newlib/libc/sys/sysvi386/close.S
newlib/libc/sys/sysvi386/closedir.c
newlib/libc/sys/sysvi386/configure
newlib/libc/sys/sysvi386/configure.in
newlib/libc/sys/sysvi386/crt0.c
newlib/libc/sys/sysvi386/dup.c
newlib/libc/sys/sysvi386/dup2.c
newlib/libc/sys/sysvi386/exec.c
newlib/libc/sys/sysvi386/execve.S
newlib/libc/sys/sysvi386/fcntl.S
newlib/libc/sys/sysvi386/fork.S
newlib/libc/sys/sysvi386/fpathconf.S
newlib/libc/sys/sysvi386/fps.S
newlib/libc/sys/sysvi386/fpx.c
newlib/libc/sys/sysvi386/fstat.S
newlib/libc/sys/sysvi386/getdents.S
newlib/libc/sys/sysvi386/getegid.S
newlib/libc/sys/sysvi386/geteuid.S
newlib/libc/sys/sysvi386/getgid.S
newlib/libc/sys/sysvi386/getgroups.S
newlib/libc/sys/sysvi386/getpid.S
newlib/libc/sys/sysvi386/getuid.S
newlib/libc/sys/sysvi386/ioctl.S
newlib/libc/sys/sysvi386/isatty.c
newlib/libc/sys/sysvi386/kill.S
newlib/libc/sys/sysvi386/link.S
newlib/libc/sys/sysvi386/lseek.S
newlib/libc/sys/sysvi386/mkdir.S
newlib/libc/sys/sysvi386/open.S
newlib/libc/sys/sysvi386/opendir.c
newlib/libc/sys/sysvi386/pathconf.S
newlib/libc/sys/sysvi386/pause.S
newlib/libc/sys/sysvi386/pipe.S
newlib/libc/sys/sysvi386/read.S
newlib/libc/sys/sysvi386/readdir.c
newlib/libc/sys/sysvi386/rename.S
newlib/libc/sys/sysvi386/rewinddir.c
newlib/libc/sys/sysvi386/rmdir.S
newlib/libc/sys/sysvi386/sbrk.c
newlib/libc/sys/sysvi386/scandir.c
newlib/libc/sys/sysvi386/seekdir.c
newlib/libc/sys/sysvi386/setgid.S
newlib/libc/sys/sysvi386/setuid.S
newlib/libc/sys/sysvi386/sigaction.S
newlib/libc/sys/sysvi386/signal.S
newlib/libc/sys/sysvi386/sigprocmask.S
newlib/libc/sys/sysvi386/sleep.c
newlib/libc/sys/sysvi386/speed.c
newlib/libc/sys/sysvi386/stat.S
newlib/libc/sys/sysvi386/sys/dirent.h
newlib/libc/sys/sysvi386/sys/setjmp.h
newlib/libc/sys/sysvi386/sys/termio.h
newlib/libc/sys/sysvi386/sys/termios.h
newlib/libc/sys/sysvi386/sys/utime.h
newlib/libc/sys/sysvi386/sys/utmp.h
newlib/libc/sys/sysvi386/sys/wait.h
newlib/libc/sys/sysvi386/sysconf.S
newlib/libc/sys/sysvi386/tcgetattr.c
newlib/libc/sys/sysvi386/tcline.c
newlib/libc/sys/sysvi386/tcsetattr.c
newlib/libc/sys/sysvi386/telldir.c
newlib/libc/sys/sysvi386/time.S
newlib/libc/sys/sysvi386/times.S
newlib/libc/sys/sysvi386/unlink.S
newlib/libc/sys/sysvi386/utime.S
newlib/libc/sys/sysvi386/wait.S
newlib/libc/sys/sysvi386/waitpid.S
newlib/libc/sys/sysvi386/write.S
newlib/libc/sys/sysvnecv70/Makefile.am
newlib/libc/sys/sysvnecv70/Makefile.in
newlib/libc/sys/sysvnecv70/aclocal.m4
newlib/libc/sys/sysvnecv70/cerror.S
newlib/libc/sys/sysvnecv70/close.S
newlib/libc/sys/sysvnecv70/configure
newlib/libc/sys/sysvnecv70/configure.in
newlib/libc/sys/sysvnecv70/crt0.S
newlib/libc/sys/sysvnecv70/exit.S
newlib/libc/sys/sysvnecv70/fps.S
newlib/libc/sys/sysvnecv70/fpx.c
newlib/libc/sys/sysvnecv70/fstat.S
newlib/libc/sys/sysvnecv70/ioctl.S
newlib/libc/sys/sysvnecv70/isatty.S
newlib/libc/sys/sysvnecv70/lseek.S
newlib/libc/sys/sysvnecv70/open.S
newlib/libc/sys/sysvnecv70/read.S
newlib/libc/sys/sysvnecv70/sbrk.S
newlib/libc/sys/sysvnecv70/sysv60.S
newlib/libc/sys/sysvnecv70/sysvnecv70.tex
newlib/libc/sys/sysvnecv70/write.S
newlib/libc/sys/tic80/Makefile.am
newlib/libc/sys/tic80/Makefile.in
newlib/libc/sys/tic80/aclocal.m4
newlib/libc/sys/tic80/configure
newlib/libc/sys/tic80/configure.in
newlib/libc/sys/tic80/crt0.c
newlib/libc/sys/w65/Makefile.am
newlib/libc/sys/w65/Makefile.in
newlib/libc/sys/w65/aclocal.m4
newlib/libc/sys/w65/configure
newlib/libc/sys/w65/configure.in
newlib/libc/sys/w65/crt0.c
newlib/libc/sys/w65/sys/syscall.h
newlib/libc/sys/w65/syscalls.c
newlib/libc/sys/w65/trap.c
newlib/libc/sys/z8ksim/Makefile.am
newlib/libc/sys/z8ksim/Makefile.in
newlib/libc/sys/z8ksim/aclocal.m4
newlib/libc/sys/z8ksim/configure
newlib/libc/sys/z8ksim/configure.in
newlib/libc/sys/z8ksim/crt0.c
newlib/libc/sys/z8ksim/glue.c
newlib/libc/sys/z8ksim/sys/syscall.h
newlib/libc/syscalls/Makefile.am
newlib/libc/syscalls/Makefile.in
newlib/libc/syscalls/sysclose.c
newlib/libc/syscalls/sysexecve.c
newlib/libc/syscalls/sysfcntl.c
newlib/libc/syscalls/sysfork.c
newlib/libc/syscalls/sysfstat.c
newlib/libc/syscalls/sysgetpid.c
newlib/libc/syscalls/sysgettod.c
newlib/libc/syscalls/sysisatty.c
newlib/libc/syscalls/syskill.c
newlib/libc/syscalls/syslink.c
newlib/libc/syscalls/syslseek.c
newlib/libc/syscalls/sysopen.c
newlib/libc/syscalls/sysread.c
newlib/libc/syscalls/syssbrk.c
newlib/libc/syscalls/sysstat.c
newlib/libc/syscalls/systimes.c
newlib/libc/syscalls/sysunlink.c
newlib/libc/syscalls/syswait.c
newlib/libc/syscalls/syswrite.c
newlib/libc/time/Makefile.am
newlib/libc/time/Makefile.in
newlib/libc/time/asctime.c
newlib/libc/time/asctime_r.c
newlib/libc/time/clock.c
newlib/libc/time/ctime.c
newlib/libc/time/ctime_r.c
newlib/libc/time/difftime.c
newlib/libc/time/gettzinfo.c
newlib/libc/time/gmtime.c
newlib/libc/time/gmtime_r.c
newlib/libc/time/lcltime.c
newlib/libc/time/lcltime_r.c
newlib/libc/time/local.h
newlib/libc/time/mktime.c
newlib/libc/time/mktm_r.c
newlib/libc/time/strftime.c
newlib/libc/time/strptime.c
newlib/libc/time/time.c
newlib/libc/time/time.tex
newlib/libc/time/tzlock.c
newlib/libc/time/tzset.c
newlib/libc/time/tzset_r.c
newlib/libc/time/tzvars.c
newlib/libc/time/wcsftime.c
newlib/libc/unix/Makefile.am
newlib/libc/unix/Makefile.in
newlib/libc/unix/basename.c
newlib/libc/unix/dirname.c
newlib/libc/unix/getcwd.c
newlib/libc/unix/getlogin.c
newlib/libc/unix/getpass.c
newlib/libc/unix/getpwent.c
newlib/libc/unix/getut.c
newlib/libc/unix/pread.c
newlib/libc/unix/pwrite.c
newlib/libc/unix/sigset.c
newlib/libc/unix/ttyname.c
newlib/libc/unix/ttyname.h
newlib/libc/unix/ttyname_r.c
newlib/libm/Makefile.am
newlib/libm/Makefile.in
newlib/libm/aclocal.m4
newlib/libm/common/Makefile.am
newlib/libm/common/Makefile.in
newlib/libm/common/acoshl.c
newlib/libm/common/acosl.c
newlib/libm/common/asinhl.c
newlib/libm/common/asinl.c
newlib/libm/common/atan2l.c
newlib/libm/common/atanhl.c
newlib/libm/common/atanl.c
newlib/libm/common/cbrtl.c
newlib/libm/common/ceill.c
newlib/libm/common/copysignl.c
newlib/libm/common/coshl.c
newlib/libm/common/cosl.c
newlib/libm/common/erfcl.c
newlib/libm/common/erfl.c
newlib/libm/common/exp2l.c
newlib/libm/common/expl.c
newlib/libm/common/expm1l.c
newlib/libm/common/fabsl.c
newlib/libm/common/fdiml.c
newlib/libm/common/fdlibm.h
newlib/libm/common/floorl.c
newlib/libm/common/fmal.c
newlib/libm/common/fmaxl.c
newlib/libm/common/fminl.c
newlib/libm/common/fmodl.c
newlib/libm/common/frexpl.c
newlib/libm/common/hypotl.c
newlib/libm/common/ilogbl.c
newlib/libm/common/isgreater.c
newlib/libm/common/ldexpl.c
newlib/libm/common/lgammal.c
newlib/libm/common/llrintl.c
newlib/libm/common/llroundl.c
newlib/libm/common/local.h
newlib/libm/common/log10l.c
newlib/libm/common/log1pl.c
newlib/libm/common/logl.c
newlib/libm/common/lrintl.c
newlib/libm/common/lroundl.c
newlib/libm/common/modfl.c
newlib/libm/common/nanl.c
newlib/libm/common/nearbyintl.c
newlib/libm/common/nextafterl.c
newlib/libm/common/powl.c
newlib/libm/common/remainderl.c
newlib/libm/common/remquol.c
newlib/libm/common/rintl.c
newlib/libm/common/roundl.c
newlib/libm/common/s_cbrt.c
newlib/libm/common/s_copysign.c
newlib/libm/common/s_exp10.c
newlib/libm/common/s_expm1.c
newlib/libm/common/s_fdim.c
newlib/libm/common/s_finite.c
newlib/libm/common/s_fma.c
newlib/libm/common/s_fmax.c
newlib/libm/common/s_fmin.c
newlib/libm/common/s_fpclassify.c
newlib/libm/common/s_ilogb.c
newlib/libm/common/s_infconst.c
newlib/libm/common/s_infinity.c
newlib/libm/common/s_isinf.c
newlib/libm/common/s_isinfd.c
newlib/libm/common/s_isnan.c
newlib/libm/common/s_isnand.c
newlib/libm/common/s_lib_ver.c
newlib/libm/common/s_llrint.c
newlib/libm/common/s_llround.c
newlib/libm/common/s_log1p.c
newlib/libm/common/s_log2.c
newlib/libm/common/s_logb.c
newlib/libm/common/s_lrint.c
newlib/libm/common/s_lround.c
newlib/libm/common/s_matherr.c
newlib/libm/common/s_modf.c
newlib/libm/common/s_nan.c
newlib/libm/common/s_nearbyint.c
newlib/libm/common/s_nextafter.c
newlib/libm/common/s_pow10.c
newlib/libm/common/s_remquo.c
newlib/libm/common/s_rint.c
newlib/libm/common/s_round.c
newlib/libm/common/s_scalbln.c
newlib/libm/common/s_scalbn.c
newlib/libm/common/s_signbit.c
newlib/libm/common/s_trunc.c
newlib/libm/common/scalblnl.c
newlib/libm/common/scalbnl.c
newlib/libm/common/sf_cbrt.c
newlib/libm/common/sf_copysign.c
newlib/libm/common/sf_exp10.c
newlib/libm/common/sf_expm1.c
newlib/libm/common/sf_fdim.c
newlib/libm/common/sf_finite.c
newlib/libm/common/sf_fma.c
newlib/libm/common/sf_fmax.c
newlib/libm/common/sf_fmin.c
newlib/libm/common/sf_fpclassify.c
newlib/libm/common/sf_ilogb.c
newlib/libm/common/sf_infinity.c
newlib/libm/common/sf_isinf.c
newlib/libm/common/sf_isinff.c
newlib/libm/common/sf_isnan.c
newlib/libm/common/sf_isnanf.c
newlib/libm/common/sf_llrint.c
newlib/libm/common/sf_llround.c
newlib/libm/common/sf_log1p.c
newlib/libm/common/sf_log2.c
newlib/libm/common/sf_logb.c
newlib/libm/common/sf_lrint.c
newlib/libm/common/sf_lround.c
newlib/libm/common/sf_modf.c
newlib/libm/common/sf_nan.c
newlib/libm/common/sf_nearbyint.c
newlib/libm/common/sf_nextafter.c
newlib/libm/common/sf_pow10.c
newlib/libm/common/sf_remquo.c
newlib/libm/common/sf_rint.c
newlib/libm/common/sf_round.c
newlib/libm/common/sf_scalbln.c
newlib/libm/common/sf_scalbn.c
newlib/libm/common/sf_trunc.c
newlib/libm/common/sinhl.c
newlib/libm/common/sinl.c
newlib/libm/common/sqrtl.c
newlib/libm/common/tanhl.c
newlib/libm/common/tanl.c
newlib/libm/common/tgammal.c
newlib/libm/common/truncl.c
newlib/libm/config.h.in
newlib/libm/configure
newlib/libm/configure.in
newlib/libm/libm.texinfo
newlib/libm/machine/Makefile.am
newlib/libm/machine/Makefile.in
newlib/libm/machine/aclocal.m4
newlib/libm/machine/configure
newlib/libm/machine/configure.in
newlib/libm/machine/i386/Makefile.am
newlib/libm/machine/i386/Makefile.in
newlib/libm/machine/i386/aclocal.m4
newlib/libm/machine/i386/configure
newlib/libm/machine/i386/configure.in
newlib/libm/machine/i386/f_atan2.S
newlib/libm/machine/i386/f_atan2f.S
newlib/libm/machine/i386/f_exp.c
newlib/libm/machine/i386/f_expf.c
newlib/libm/machine/i386/f_frexp.S
newlib/libm/machine/i386/f_frexpf.S
newlib/libm/machine/i386/f_ldexp.S
newlib/libm/machine/i386/f_ldexpf.S
newlib/libm/machine/i386/f_llrint.c
newlib/libm/machine/i386/f_llrintf.c
newlib/libm/machine/i386/f_llrintl.c
newlib/libm/machine/i386/f_log.S
newlib/libm/machine/i386/f_log10.S
newlib/libm/machine/i386/f_log10f.S
newlib/libm/machine/i386/f_logf.S
newlib/libm/machine/i386/f_lrint.c
newlib/libm/machine/i386/f_lrintf.c
newlib/libm/machine/i386/f_lrintl.c
newlib/libm/machine/i386/f_math.h
newlib/libm/machine/i386/f_pow.c
newlib/libm/machine/i386/f_powf.c
newlib/libm/machine/i386/f_rint.c
newlib/libm/machine/i386/f_rintf.c
newlib/libm/machine/i386/f_rintl.c
newlib/libm/machine/i386/f_tan.S
newlib/libm/machine/i386/f_tanf.S
newlib/libm/machine/i386/i386mach.h
newlib/libm/machine/spu/Makefile.am
newlib/libm/machine/spu/Makefile.in
newlib/libm/machine/spu/aclocal.m4
newlib/libm/machine/spu/configure
newlib/libm/machine/spu/configure.in
newlib/libm/machine/spu/fe_dfl_env.c
newlib/libm/machine/spu/feclearexcept.c
newlib/libm/machine/spu/fegetenv.c
newlib/libm/machine/spu/fegetexceptflag.c
newlib/libm/machine/spu/fegetround.c
newlib/libm/machine/spu/feholdexcept.c
newlib/libm/machine/spu/feraiseexcept.c
newlib/libm/machine/spu/fesetenv.c
newlib/libm/machine/spu/fesetexceptflag.c
newlib/libm/machine/spu/fesetround.c
newlib/libm/machine/spu/fetestexcept.c
newlib/libm/machine/spu/feupdateenv.c
newlib/libm/machine/spu/headers/acos.h
newlib/libm/machine/spu/headers/acosd2.h
newlib/libm/machine/spu/headers/acosf.h
newlib/libm/machine/spu/headers/acosf4.h
newlib/libm/machine/spu/headers/acosh.h
newlib/libm/machine/spu/headers/acoshd2.h
newlib/libm/machine/spu/headers/acoshf.h
newlib/libm/machine/spu/headers/acoshf4.h
newlib/libm/machine/spu/headers/asin.h
newlib/libm/machine/spu/headers/asind2.h
newlib/libm/machine/spu/headers/asinf.h
newlib/libm/machine/spu/headers/asinf4.h
newlib/libm/machine/spu/headers/asinh.h
newlib/libm/machine/spu/headers/asinhd2.h
newlib/libm/machine/spu/headers/asinhf.h
newlib/libm/machine/spu/headers/asinhf4.h
newlib/libm/machine/spu/headers/atan.h
newlib/libm/machine/spu/headers/atan2.h
newlib/libm/machine/spu/headers/atan2d2.h
newlib/libm/machine/spu/headers/atan2f.h
newlib/libm/machine/spu/headers/atan2f4.h
newlib/libm/machine/spu/headers/atand2.h
newlib/libm/machine/spu/headers/atanf.h
newlib/libm/machine/spu/headers/atanf4.h
newlib/libm/machine/spu/headers/atanh.h
newlib/libm/machine/spu/headers/atanhd2.h
newlib/libm/machine/spu/headers/atanhf.h
newlib/libm/machine/spu/headers/atanhf4.h
newlib/libm/machine/spu/headers/cbrt.h
newlib/libm/machine/spu/headers/cbrtf.h
newlib/libm/machine/spu/headers/ceil.h
newlib/libm/machine/spu/headers/ceilf.h
newlib/libm/machine/spu/headers/copysign.h
newlib/libm/machine/spu/headers/copysignf.h
newlib/libm/machine/spu/headers/cos.h
newlib/libm/machine/spu/headers/cos_sin.h
newlib/libm/machine/spu/headers/cosd2.h
newlib/libm/machine/spu/headers/cosf.h
newlib/libm/machine/spu/headers/cosf4.h
newlib/libm/machine/spu/headers/cosh.h
newlib/libm/machine/spu/headers/coshd2.h
newlib/libm/machine/spu/headers/coshf.h
newlib/libm/machine/spu/headers/coshf4.h
newlib/libm/machine/spu/headers/divd2.h
newlib/libm/machine/spu/headers/divf4.h
newlib/libm/machine/spu/headers/dom_chkd_less_than.h
newlib/libm/machine/spu/headers/dom_chkd_negone_one.h
newlib/libm/machine/spu/headers/dom_chkf_less_than.h
newlib/libm/machine/spu/headers/dom_chkf_negone_one.h
newlib/libm/machine/spu/headers/erf.h
newlib/libm/machine/spu/headers/erf_utils.h
newlib/libm/machine/spu/headers/erfc.h
newlib/libm/machine/spu/headers/erfcd2.h
newlib/libm/machine/spu/headers/erfcf.h
newlib/libm/machine/spu/headers/erfcf4.h
newlib/libm/machine/spu/headers/erfd2.h
newlib/libm/machine/spu/headers/erff.h
newlib/libm/machine/spu/headers/erff4.h
newlib/libm/machine/spu/headers/exp.h
newlib/libm/machine/spu/headers/exp2.h
newlib/libm/machine/spu/headers/exp2d2.h
newlib/libm/machine/spu/headers/exp2f.h
newlib/libm/machine/spu/headers/exp2f4.h
newlib/libm/machine/spu/headers/expd2.h
newlib/libm/machine/spu/headers/expf.h
newlib/libm/machine/spu/headers/expf4.h
newlib/libm/machine/spu/headers/expm1.h
newlib/libm/machine/spu/headers/expm1d2.h
newlib/libm/machine/spu/headers/expm1f.h
newlib/libm/machine/spu/headers/expm1f4.h
newlib/libm/machine/spu/headers/fabs.h
newlib/libm/machine/spu/headers/fabsf.h
newlib/libm/machine/spu/headers/fdim.h
newlib/libm/machine/spu/headers/fdimf.h
newlib/libm/machine/spu/headers/feclearexcept.h
newlib/libm/machine/spu/headers/fefpscr.h
newlib/libm/machine/spu/headers/fegetenv.h
newlib/libm/machine/spu/headers/fegetexceptflag.h
newlib/libm/machine/spu/headers/fegetround.h
newlib/libm/machine/spu/headers/feholdexcept.h
newlib/libm/machine/spu/headers/feraiseexcept.h
newlib/libm/machine/spu/headers/fesetenv.h
newlib/libm/machine/spu/headers/fesetexceptflag.h
newlib/libm/machine/spu/headers/fesetround.h
newlib/libm/machine/spu/headers/fetestexcept.h
newlib/libm/machine/spu/headers/feupdateenv.h
newlib/libm/machine/spu/headers/floor.h
newlib/libm/machine/spu/headers/floord2.h
newlib/libm/machine/spu/headers/floorf.h
newlib/libm/machine/spu/headers/floorf4.h
newlib/libm/machine/spu/headers/fma.h
newlib/libm/machine/spu/headers/fmaf.h
newlib/libm/machine/spu/headers/fmax.h
newlib/libm/machine/spu/headers/fmaxf.h
newlib/libm/machine/spu/headers/fmin.h
newlib/libm/machine/spu/headers/fminf.h
newlib/libm/machine/spu/headers/fmod.h
newlib/libm/machine/spu/headers/fmodf.h
newlib/libm/machine/spu/headers/frexp.h
newlib/libm/machine/spu/headers/frexpf.h
newlib/libm/machine/spu/headers/hypot.h
newlib/libm/machine/spu/headers/hypotd2.h
newlib/libm/machine/spu/headers/hypotf.h
newlib/libm/machine/spu/headers/hypotf4.h
newlib/libm/machine/spu/headers/ilogb.h
newlib/libm/machine/spu/headers/ilogbf.h
newlib/libm/machine/spu/headers/isnan.h
newlib/libm/machine/spu/headers/isnand2.h
newlib/libm/machine/spu/headers/isnanf.h
newlib/libm/machine/spu/headers/isnanf4.h
newlib/libm/machine/spu/headers/ldexp.h
newlib/libm/machine/spu/headers/ldexpd2.h
newlib/libm/machine/spu/headers/ldexpf.h
newlib/libm/machine/spu/headers/ldexpf4.h
newlib/libm/machine/spu/headers/lgamma.h
newlib/libm/machine/spu/headers/lgammad2.h
newlib/libm/machine/spu/headers/lgammaf.h
newlib/libm/machine/spu/headers/lgammaf4.h
newlib/libm/machine/spu/headers/llrint.h
newlib/libm/machine/spu/headers/llrintf.h
newlib/libm/machine/spu/headers/llround.h
newlib/libm/machine/spu/headers/llroundf.h
newlib/libm/machine/spu/headers/log.h
newlib/libm/machine/spu/headers/log10.h
newlib/libm/machine/spu/headers/log10d2.h
newlib/libm/machine/spu/headers/log10f.h
newlib/libm/machine/spu/headers/log1p.h
newlib/libm/machine/spu/headers/log1pd2.h
newlib/libm/machine/spu/headers/log1pf.h
newlib/libm/machine/spu/headers/log1pf4.h
newlib/libm/machine/spu/headers/log2.h
newlib/libm/machine/spu/headers/log2d2.h
newlib/libm/machine/spu/headers/log2f.h
newlib/libm/machine/spu/headers/log2f4.h
newlib/libm/machine/spu/headers/logbf.h
newlib/libm/machine/spu/headers/logbf4.h
newlib/libm/machine/spu/headers/logd2.h
newlib/libm/machine/spu/headers/logf.h
newlib/libm/machine/spu/headers/logf4.h
newlib/libm/machine/spu/headers/lrint.h
newlib/libm/machine/spu/headers/lrintf.h
newlib/libm/machine/spu/headers/lround.h
newlib/libm/machine/spu/headers/lroundf.h
newlib/libm/machine/spu/headers/nearbyint.h
newlib/libm/machine/spu/headers/nearbyintf.h
newlib/libm/machine/spu/headers/nearbyintf4.h
newlib/libm/machine/spu/headers/nextafter.h
newlib/libm/machine/spu/headers/nextafterd2.h
newlib/libm/machine/spu/headers/nextafterf.h
newlib/libm/machine/spu/headers/nextafterf4.h
newlib/libm/machine/spu/headers/pow.h
newlib/libm/machine/spu/headers/powd2.h
newlib/libm/machine/spu/headers/powf.h
newlib/libm/machine/spu/headers/powf4.h
newlib/libm/machine/spu/headers/recipd2.h
newlib/libm/machine/spu/headers/recipf4.h
newlib/libm/machine/spu/headers/remainder.h
newlib/libm/machine/spu/headers/remainderf.h
newlib/libm/machine/spu/headers/remquo.h
newlib/libm/machine/spu/headers/remquof.h
newlib/libm/machine/spu/headers/rint.h
newlib/libm/machine/spu/headers/rintf.h
newlib/libm/machine/spu/headers/rintf4.h
newlib/libm/machine/spu/headers/round.h
newlib/libm/machine/spu/headers/roundf.h
newlib/libm/machine/spu/headers/scalbn.h
newlib/libm/machine/spu/headers/scalbnf.h
newlib/libm/machine/spu/headers/scalbnf4.h
newlib/libm/machine/spu/headers/signbit.h
newlib/libm/machine/spu/headers/signbitd2.h
newlib/libm/machine/spu/headers/simdmath.h
newlib/libm/machine/spu/headers/sin.h
newlib/libm/machine/spu/headers/sincos.h
newlib/libm/machine/spu/headers/sincosd2.h
newlib/libm/machine/spu/headers/sincosf.h
newlib/libm/machine/spu/headers/sincosf4.h
newlib/libm/machine/spu/headers/sind2.h
newlib/libm/machine/spu/headers/sinf.h
newlib/libm/machine/spu/headers/sinf4.h
newlib/libm/machine/spu/headers/sinh.h
newlib/libm/machine/spu/headers/sinhd2.h
newlib/libm/machine/spu/headers/sinhf.h
newlib/libm/machine/spu/headers/sinhf4.h
newlib/libm/machine/spu/headers/sqrt.h
newlib/libm/machine/spu/headers/sqrtd2.h
newlib/libm/machine/spu/headers/sqrtf.h
newlib/libm/machine/spu/headers/sqrtf4.h
newlib/libm/machine/spu/headers/tan.h
newlib/libm/machine/spu/headers/tand2.h
newlib/libm/machine/spu/headers/tanf.h
newlib/libm/machine/spu/headers/tanf4.h
newlib/libm/machine/spu/headers/tanh.h
newlib/libm/machine/spu/headers/tanhd2.h
newlib/libm/machine/spu/headers/tanhf.h
newlib/libm/machine/spu/headers/tanhf4.h
newlib/libm/machine/spu/headers/tgamma.h
newlib/libm/machine/spu/headers/tgammad2.h
newlib/libm/machine/spu/headers/tgammaf.h
newlib/libm/machine/spu/headers/tgammaf4.h
newlib/libm/machine/spu/headers/trunc.h
newlib/libm/machine/spu/headers/truncd2.h
newlib/libm/machine/spu/headers/truncf.h
newlib/libm/machine/spu/headers/truncf4.h
newlib/libm/machine/spu/headers/vec_literal.h
newlib/libm/machine/spu/llrint.c
newlib/libm/machine/spu/llrintf.c
newlib/libm/machine/spu/llround.c
newlib/libm/machine/spu/llroundf.c
newlib/libm/machine/spu/log2.c
newlib/libm/machine/spu/log2f.c
newlib/libm/machine/spu/s_asinh.c
newlib/libm/machine/spu/s_atan.c
newlib/libm/machine/spu/s_cbrt.c
newlib/libm/machine/spu/s_ceil.c
newlib/libm/machine/spu/s_copysign.c
newlib/libm/machine/spu/s_cos.c
newlib/libm/machine/spu/s_erf.c
newlib/libm/machine/spu/s_expm1.c
newlib/libm/machine/spu/s_fabs.c
newlib/libm/machine/spu/s_fdim.c
newlib/libm/machine/spu/s_floor.c
newlib/libm/machine/spu/s_fma.c
newlib/libm/machine/spu/s_fmax.c
newlib/libm/machine/spu/s_fmin.c
newlib/libm/machine/spu/s_frexp.c
newlib/libm/machine/spu/s_ilogb.c
newlib/libm/machine/spu/s_isnan.c
newlib/libm/machine/spu/s_ldexp.c
newlib/libm/machine/spu/s_log1p.c
newlib/libm/machine/spu/s_lrint.c
newlib/libm/machine/spu/s_lround.c
newlib/libm/machine/spu/s_nearbyint.c
newlib/libm/machine/spu/s_nextafter.c
newlib/libm/machine/spu/s_remquo.c
newlib/libm/machine/spu/s_rint.c
newlib/libm/machine/spu/s_round.c
newlib/libm/machine/spu/s_scalbn.c
newlib/libm/machine/spu/s_sin.c
newlib/libm/machine/spu/s_tan.c
newlib/libm/machine/spu/s_tanh.c
newlib/libm/machine/spu/s_trunc.c
newlib/libm/machine/spu/sf_asinh.c
newlib/libm/machine/spu/sf_atan.c
newlib/libm/machine/spu/sf_cbrt.c
newlib/libm/machine/spu/sf_ceil.c
newlib/libm/machine/spu/sf_copysign.c
newlib/libm/machine/spu/sf_cos.c
newlib/libm/machine/spu/sf_erf.c
newlib/libm/machine/spu/sf_expm1.c
newlib/libm/machine/spu/sf_fabs.c
newlib/libm/machine/spu/sf_fdim.c
newlib/libm/machine/spu/sf_finite.c
newlib/libm/machine/spu/sf_floor.c
newlib/libm/machine/spu/sf_fma.c
newlib/libm/machine/spu/sf_fmax.c
newlib/libm/machine/spu/sf_fmin.c
newlib/libm/machine/spu/sf_fpclassify.c
newlib/libm/machine/spu/sf_frexp.c
newlib/libm/machine/spu/sf_ilogb.c
newlib/libm/machine/spu/sf_isinf.c
newlib/libm/machine/spu/sf_isinff.c
newlib/libm/machine/spu/sf_isnan.c
newlib/libm/machine/spu/sf_isnanf.c
newlib/libm/machine/spu/sf_ldexp.c
newlib/libm/machine/spu/sf_log1p.c
newlib/libm/machine/spu/sf_logb.c
newlib/libm/machine/spu/sf_lrint.c
newlib/libm/machine/spu/sf_lround.c
newlib/libm/machine/spu/sf_nan.c
newlib/libm/machine/spu/sf_nearbyint.c
newlib/libm/machine/spu/sf_nextafter.c
newlib/libm/machine/spu/sf_remquo.c
newlib/libm/machine/spu/sf_rint.c
newlib/libm/machine/spu/sf_round.c
newlib/libm/machine/spu/sf_scalbn.c
newlib/libm/machine/spu/sf_sin.c
newlib/libm/machine/spu/sf_tan.c
newlib/libm/machine/spu/sf_tanh.c
newlib/libm/machine/spu/sf_trunc.c
newlib/libm/machine/spu/w_acos.c
newlib/libm/machine/spu/w_acosh.c
newlib/libm/machine/spu/w_asin.c
newlib/libm/machine/spu/w_atan2.c
newlib/libm/machine/spu/w_atanh.c
newlib/libm/machine/spu/w_cosh.c
newlib/libm/machine/spu/w_exp.c
newlib/libm/machine/spu/w_exp2.c
newlib/libm/machine/spu/w_fmod.c
newlib/libm/machine/spu/w_hypot.c
newlib/libm/machine/spu/w_lgamma.c
newlib/libm/machine/spu/w_log.c
newlib/libm/machine/spu/w_log10.c
newlib/libm/machine/spu/w_pow.c
newlib/libm/machine/spu/w_remainder.c
newlib/libm/machine/spu/w_sincos.c
newlib/libm/machine/spu/w_sinh.c
newlib/libm/machine/spu/w_sqrt.c
newlib/libm/machine/spu/w_tgamma.c
newlib/libm/machine/spu/wf_acos.c
newlib/libm/machine/spu/wf_acosh.c
newlib/libm/machine/spu/wf_asin.c
newlib/libm/machine/spu/wf_atan2.c
newlib/libm/machine/spu/wf_atanh.c
newlib/libm/machine/spu/wf_cosh.c
newlib/libm/machine/spu/wf_exp.c
newlib/libm/machine/spu/wf_exp2.c
newlib/libm/machine/spu/wf_fmod.c
newlib/libm/machine/spu/wf_hypot.c
newlib/libm/machine/spu/wf_lgamma.c
newlib/libm/machine/spu/wf_log.c
newlib/libm/machine/spu/wf_log10.c
newlib/libm/machine/spu/wf_pow.c
newlib/libm/machine/spu/wf_remainder.c
newlib/libm/machine/spu/wf_sincos.c
newlib/libm/machine/spu/wf_sinh.c
newlib/libm/machine/spu/wf_sqrt.c
newlib/libm/machine/spu/wf_tgamma.c
newlib/libm/math/Makefile.am
newlib/libm/math/Makefile.in
newlib/libm/math/e_acos.c
newlib/libm/math/e_acosh.c
newlib/libm/math/e_asin.c
newlib/libm/math/e_atan2.c
newlib/libm/math/e_atanh.c
newlib/libm/math/e_cosh.c
newlib/libm/math/e_exp.c
newlib/libm/math/e_fmod.c
newlib/libm/math/e_hypot.c
newlib/libm/math/e_j0.c
newlib/libm/math/e_j1.c
newlib/libm/math/e_jn.c
newlib/libm/math/e_log.c
newlib/libm/math/e_log10.c
newlib/libm/math/e_pow.c
newlib/libm/math/e_rem_pio2.c
newlib/libm/math/e_remainder.c
newlib/libm/math/e_scalb.c
newlib/libm/math/e_sinh.c
newlib/libm/math/e_sqrt.c
newlib/libm/math/ef_acos.c
newlib/libm/math/ef_acosh.c
newlib/libm/math/ef_asin.c
newlib/libm/math/ef_atan2.c
newlib/libm/math/ef_atanh.c
newlib/libm/math/ef_cosh.c
newlib/libm/math/ef_exp.c
newlib/libm/math/ef_fmod.c
newlib/libm/math/ef_hypot.c
newlib/libm/math/ef_j0.c
newlib/libm/math/ef_j1.c
newlib/libm/math/ef_jn.c
newlib/libm/math/ef_log.c
newlib/libm/math/ef_log10.c
newlib/libm/math/ef_pow.c
newlib/libm/math/ef_rem_pio2.c
newlib/libm/math/ef_remainder.c
newlib/libm/math/ef_scalb.c
newlib/libm/math/ef_sinh.c
newlib/libm/math/ef_sqrt.c
newlib/libm/math/er_gamma.c
newlib/libm/math/er_lgamma.c
newlib/libm/math/erf_gamma.c
newlib/libm/math/erf_lgamma.c
newlib/libm/math/k_cos.c
newlib/libm/math/k_rem_pio2.c
newlib/libm/math/k_sin.c
newlib/libm/math/k_standard.c
newlib/libm/math/k_tan.c
newlib/libm/math/kf_cos.c
newlib/libm/math/kf_rem_pio2.c
newlib/libm/math/kf_sin.c
newlib/libm/math/kf_tan.c
newlib/libm/math/math.tex
newlib/libm/math/s_asinh.c
newlib/libm/math/s_atan.c
newlib/libm/math/s_ceil.c
newlib/libm/math/s_cos.c
newlib/libm/math/s_erf.c
newlib/libm/math/s_fabs.c
newlib/libm/math/s_floor.c
newlib/libm/math/s_frexp.c
newlib/libm/math/s_ldexp.c
newlib/libm/math/s_signif.c
newlib/libm/math/s_sin.c
newlib/libm/math/s_tan.c
newlib/libm/math/s_tanh.c
newlib/libm/math/sf_asinh.c
newlib/libm/math/sf_atan.c
newlib/libm/math/sf_ceil.c
newlib/libm/math/sf_cos.c
newlib/libm/math/sf_erf.c
newlib/libm/math/sf_fabs.c
newlib/libm/math/sf_floor.c
newlib/libm/math/sf_frexp.c
newlib/libm/math/sf_ldexp.c
newlib/libm/math/sf_signif.c
newlib/libm/math/sf_sin.c
newlib/libm/math/sf_tan.c
newlib/libm/math/sf_tanh.c
newlib/libm/math/w_acos.c
newlib/libm/math/w_acosh.c
newlib/libm/math/w_asin.c
newlib/libm/math/w_atan2.c
newlib/libm/math/w_atanh.c
newlib/libm/math/w_cabs.c
newlib/libm/math/w_cosh.c
newlib/libm/math/w_drem.c
newlib/libm/math/w_exp.c
newlib/libm/math/w_exp2.c
newlib/libm/math/w_fmod.c
newlib/libm/math/w_gamma.c
newlib/libm/math/w_hypot.c
newlib/libm/math/w_j0.c
newlib/libm/math/w_j1.c
newlib/libm/math/w_jn.c
newlib/libm/math/w_lgamma.c
newlib/libm/math/w_log.c
newlib/libm/math/w_log10.c
newlib/libm/math/w_pow.c
newlib/libm/math/w_remainder.c
newlib/libm/math/w_scalb.c
newlib/libm/math/w_sincos.c
newlib/libm/math/w_sinh.c
newlib/libm/math/w_sqrt.c
newlib/libm/math/w_tgamma.c
newlib/libm/math/wf_acos.c
newlib/libm/math/wf_acosh.c
newlib/libm/math/wf_asin.c
newlib/libm/math/wf_atan2.c
newlib/libm/math/wf_atanh.c
newlib/libm/math/wf_cabs.c
newlib/libm/math/wf_cosh.c
newlib/libm/math/wf_drem.c
newlib/libm/math/wf_exp.c
newlib/libm/math/wf_exp2.c
newlib/libm/math/wf_fmod.c
newlib/libm/math/wf_gamma.c
newlib/libm/math/wf_hypot.c
newlib/libm/math/wf_j0.c
newlib/libm/math/wf_j1.c
newlib/libm/math/wf_jn.c
newlib/libm/math/wf_lgamma.c
newlib/libm/math/wf_log.c
newlib/libm/math/wf_log10.c
newlib/libm/math/wf_pow.c
newlib/libm/math/wf_remainder.c
newlib/libm/math/wf_scalb.c
newlib/libm/math/wf_sincos.c
newlib/libm/math/wf_sinh.c
newlib/libm/math/wf_sqrt.c
newlib/libm/math/wf_tgamma.c
newlib/libm/math/wr_gamma.c
newlib/libm/math/wr_lgamma.c
newlib/libm/math/wrf_gamma.c
newlib/libm/math/wrf_lgamma.c
newlib/libm/mathfp/Makefile.am
newlib/libm/mathfp/Makefile.in
newlib/libm/mathfp/e_acosh.c
newlib/libm/mathfp/e_atanh.c
newlib/libm/mathfp/e_hypot.c
newlib/libm/mathfp/e_j0.c
newlib/libm/mathfp/e_j1.c
newlib/libm/mathfp/e_remainder.c
newlib/libm/mathfp/e_scalb.c
newlib/libm/mathfp/ef_acosh.c
newlib/libm/mathfp/ef_atanh.c
newlib/libm/mathfp/ef_hypot.c
newlib/libm/mathfp/ef_j0.c
newlib/libm/mathfp/ef_j1.c
newlib/libm/mathfp/ef_remainder.c
newlib/libm/mathfp/ef_scalb.c
newlib/libm/mathfp/er_gamma.c
newlib/libm/mathfp/er_lgamma.c
newlib/libm/mathfp/erf_gamma.c
newlib/libm/mathfp/erf_lgamma.c
newlib/libm/mathfp/mathfp.tex
newlib/libm/mathfp/s_acos.c
newlib/libm/mathfp/s_asin.c
newlib/libm/mathfp/s_asine.c
newlib/libm/mathfp/s_asinh.c
newlib/libm/mathfp/s_atan.c
newlib/libm/mathfp/s_atan2.c
newlib/libm/mathfp/s_atangent.c
newlib/libm/mathfp/s_ceil.c
newlib/libm/mathfp/s_cos.c
newlib/libm/mathfp/s_cosh.c
newlib/libm/mathfp/s_erf.c
newlib/libm/mathfp/s_exp.c
newlib/libm/mathfp/s_exp2.c
newlib/libm/mathfp/s_fabs.c
newlib/libm/mathfp/s_floor.c
newlib/libm/mathfp/s_fmod.c
newlib/libm/mathfp/s_frexp.c
newlib/libm/mathfp/s_ispos.c
newlib/libm/mathfp/s_ldexp.c
newlib/libm/mathfp/s_log.c
newlib/libm/mathfp/s_log10.c
newlib/libm/mathfp/s_logarithm.c
newlib/libm/mathfp/s_mathcnst.c
newlib/libm/mathfp/s_numtest.c
newlib/libm/mathfp/s_pow.c
newlib/libm/mathfp/s_signif.c
newlib/libm/mathfp/s_sin.c
newlib/libm/mathfp/s_sincos.c
newlib/libm/mathfp/s_sine.c
newlib/libm/mathfp/s_sineh.c
newlib/libm/mathfp/s_sinf.c
newlib/libm/mathfp/s_sinh.c
newlib/libm/mathfp/s_sqrt.c
newlib/libm/mathfp/s_tan.c
newlib/libm/mathfp/s_tanh.c
newlib/libm/mathfp/s_tgamma.c
newlib/libm/mathfp/sf_acos.c
newlib/libm/mathfp/sf_asin.c
newlib/libm/mathfp/sf_asine.c
newlib/libm/mathfp/sf_asinh.c
newlib/libm/mathfp/sf_atan.c
newlib/libm/mathfp/sf_atan2.c
newlib/libm/mathfp/sf_atangent.c
newlib/libm/mathfp/sf_ceil.c
newlib/libm/mathfp/sf_cos.c
newlib/libm/mathfp/sf_cosh.c
newlib/libm/mathfp/sf_erf.c
newlib/libm/mathfp/sf_exp.c
newlib/libm/mathfp/sf_exp2.c
newlib/libm/mathfp/sf_fabs.c
newlib/libm/mathfp/sf_floor.c
newlib/libm/mathfp/sf_fmod.c
newlib/libm/mathfp/sf_frexp.c
newlib/libm/mathfp/sf_ispos.c
newlib/libm/mathfp/sf_ldexp.c
newlib/libm/mathfp/sf_log.c
newlib/libm/mathfp/sf_log10.c
newlib/libm/mathfp/sf_logarithm.c
newlib/libm/mathfp/sf_numtest.c
newlib/libm/mathfp/sf_pow.c
newlib/libm/mathfp/sf_signif.c
newlib/libm/mathfp/sf_sin.c
newlib/libm/mathfp/sf_sincos.c
newlib/libm/mathfp/sf_sine.c
newlib/libm/mathfp/sf_sineh.c
newlib/libm/mathfp/sf_sinh.c
newlib/libm/mathfp/sf_sqrt.c
newlib/libm/mathfp/sf_tan.c
newlib/libm/mathfp/sf_tanh.c
newlib/libm/mathfp/sf_tgamma.c
newlib/libm/mathfp/w_cabs.c
newlib/libm/mathfp/w_drem.c
newlib/libm/mathfp/w_jn.c
newlib/libm/mathfp/wf_cabs.c
newlib/libm/mathfp/wf_drem.c
newlib/libm/mathfp/wf_jn.c
newlib/libm/mathfp/zmath.h
newlib/libm/test/Makefile.in
newlib/libm/test/acos_vec.c
newlib/libm/test/acosf_vec.c
newlib/libm/test/acosh_vec.c
newlib/libm/test/acoshf_vec.c
newlib/libm/test/asin_vec.c
newlib/libm/test/asinf_vec.c
newlib/libm/test/asinh_vec.c
newlib/libm/test/asinhf_vec.c
newlib/libm/test/atan2_vec.c
newlib/libm/test/atan2f_vec.c
newlib/libm/test/atan_vec.c
newlib/libm/test/atanf_vec.c
newlib/libm/test/atanh_vec.c
newlib/libm/test/atanhf_vec.c
newlib/libm/test/ceil_vec.c
newlib/libm/test/ceilf_vec.c
newlib/libm/test/conv_vec.c
newlib/libm/test/convert.c
newlib/libm/test/cos_vec.c
newlib/libm/test/cosf_vec.c
newlib/libm/test/cosh_vec.c
newlib/libm/test/coshf_vec.c
newlib/libm/test/dcvt.c
newlib/libm/test/dvec.c
newlib/libm/test/erf_vec.c
newlib/libm/test/erfc_vec.c
newlib/libm/test/erfcf_vec.c
newlib/libm/test/erff_vec.c
newlib/libm/test/exp_vec.c
newlib/libm/test/expf_vec.c
newlib/libm/test/fabs_vec.c
newlib/libm/test/fabsf_vec.c
newlib/libm/test/floor_vec.c
newlib/libm/test/floorf_vec.c
newlib/libm/test/fmod_vec.c
newlib/libm/test/fmodf_vec.c
newlib/libm/test/gamma_vec.c
newlib/libm/test/gammaf_vec.c
newlib/libm/test/hypot_vec.c
newlib/libm/test/hypotf_vec.c
newlib/libm/test/iconv_vec.c
newlib/libm/test/j0_vec.c
newlib/libm/test/j0f_vec.c
newlib/libm/test/j1_vec.c
newlib/libm/test/j1f_vec.c
newlib/libm/test/jn_vec.c
newlib/libm/test/jnf_vec.c
newlib/libm/test/log10_vec.c
newlib/libm/test/log10f_vec.c
newlib/libm/test/log1p_vec.c
newlib/libm/test/log1pf_vec.c
newlib/libm/test/log2_vec.c
newlib/libm/test/log2f_vec.c
newlib/libm/test/log_vec.c
newlib/libm/test/logf_vec.c
newlib/libm/test/math.c
newlib/libm/test/math2.c
newlib/libm/test/sin_vec.c
newlib/libm/test/sinf_vec.c
newlib/libm/test/sinh_vec.c
newlib/libm/test/sinhf_vec.c
newlib/libm/test/sprint_ivec.c
newlib/libm/test/sprint_vec.c
newlib/libm/test/sqrt_vec.c
newlib/libm/test/sqrtf_vec.c
newlib/libm/test/string.c
newlib/libm/test/tan_vec.c
newlib/libm/test/tanf_vec.c
newlib/libm/test/tanh_vec.c
newlib/libm/test/tanhf_vec.c
newlib/libm/test/test.c
newlib/libm/test/test.h
newlib/libm/test/test_ieee.c
newlib/libm/test/test_is.c
newlib/libm/test/y0_vec.c
newlib/libm/test/y0f_vec.c
newlib/libm/test/y1_vec.c
newlib/libm/test/y1f_vec.c
newlib/libm/test/yn_vec.c
newlib/libm/test/ynf_vec.c
newlib/newlib.hin
newlib/stamp-h.in
newlib/testsuite/config/default.exp
newlib/testsuite/include/check.h
newlib/testsuite/lib/checkoutput.exp
newlib/testsuite/lib/flags.exp
newlib/testsuite/lib/newlib.exp
newlib/testsuite/lib/passfail.exp
newlib/testsuite/newlib.elix/elix.exp
newlib/testsuite/newlib.elix/tmmap.c
newlib/testsuite/newlib.iconv/iconv.exp
newlib/testsuite/newlib.iconv/iconvjp.c
newlib/testsuite/newlib.iconv/iconvnm.c
newlib/testsuite/newlib.iconv/iconvru.c
newlib/testsuite/newlib.locale/UTF-8.c
newlib/testsuite/newlib.locale/UTF-8.exp
newlib/testsuite/newlib.locale/locale.exp
newlib/testsuite/newlib.search/hsearchtest.c
newlib/testsuite/newlib.search/hsearchtest.exp
newlib/testsuite/newlib.stdlib/atexit.c
newlib/testsuite/newlib.stdlib/atexit.exp
newlib/testsuite/newlib.stdlib/size_max.c
newlib/testsuite/newlib.stdlib/stdlib.exp
newlib/testsuite/newlib.string/memmove1.c
newlib/testsuite/newlib.string/string.exp
newlib/testsuite/newlib.string/tstring.c
newlib/testsuite/newlib.wctype/tiswctype.c
newlib/testsuite/newlib.wctype/twctrans.c
newlib/testsuite/newlib.wctype/twctype.c
newlib/testsuite/newlib.wctype/wctype.exp
winsup/COPYING
winsup/CYGWIN_LICENSE
winsup/ChangeLog
winsup/Makefile.common
winsup/Makefile.in
winsup/README
winsup/acinclude.m4
winsup/aclocal.m4
winsup/configure
winsup/configure.in
winsup/cygserver/ChangeLog
winsup/cygserver/Makefile.in
winsup/cygserver/README
winsup/cygserver/aclocal.m4
winsup/cygserver/bsd_helper.cc
winsup/cygserver/bsd_helper.h
winsup/cygserver/bsd_log.cc
winsup/cygserver/bsd_log.h
winsup/cygserver/bsd_mutex.cc
winsup/cygserver/bsd_mutex.h
winsup/cygserver/client.cc
winsup/cygserver/configure
winsup/cygserver/configure.in
winsup/cygserver/cygserver-config
winsup/cygserver/cygserver.cc
winsup/cygserver/cygserver.conf
winsup/cygserver/msg.cc
winsup/cygserver/process.cc
winsup/cygserver/process.h
winsup/cygserver/sem.cc
winsup/cygserver/setpwd.cc
winsup/cygserver/shm.cc
winsup/cygserver/sysv_msg.cc
winsup/cygserver/sysv_sem.cc
winsup/cygserver/sysv_shm.cc
winsup/cygserver/threaded_queue.cc
winsup/cygserver/threaded_queue.h
winsup/cygserver/transport.cc
winsup/cygserver/transport.h
winsup/cygserver/transport_pipes.cc
winsup/cygserver/transport_pipes.h
winsup/cygserver/woutsup.h
winsup/cygwin/ChangeLog
winsup/cygwin/ChangeLog-1995
winsup/cygwin/ChangeLog-1996
winsup/cygwin/ChangeLog-1997
winsup/cygwin/ChangeLog-1998
winsup/cygwin/ChangeLog-1999
winsup/cygwin/ChangeLog-2000
winsup/cygwin/ChangeLog-2001
winsup/cygwin/ChangeLog-2002
winsup/cygwin/ChangeLog-2003
winsup/cygwin/ChangeLog-2004
winsup/cygwin/ChangeLog-2005
winsup/cygwin/ChangeLog-2006
winsup/cygwin/ChangeLog-2007
winsup/cygwin/ChangeLog-2008
winsup/cygwin/Makefile.in
winsup/cygwin/ROADMAP
winsup/cygwin/acconfig.h
winsup/cygwin/aclocal.m4
winsup/cygwin/analyze_sigfe
winsup/cygwin/assert.cc
winsup/cygwin/autoload.cc
winsup/cygwin/automode.c
winsup/cygwin/binmode.c
winsup/cygwin/child_info.h
winsup/cygwin/config.h.in
winsup/cygwin/config/i386/profile.h
winsup/cygwin/configure
winsup/cygwin/configure.in
winsup/cygwin/cpuid.h
winsup/cygwin/crt0.c
winsup/cygwin/ctype.cc
winsup/cygwin/cxx.cc
winsup/cygwin/cygerrno.h
winsup/cygwin/cygheap.cc
winsup/cygwin/cygheap.h
winsup/cygwin/cygheap_malloc.h
winsup/cygwin/cyglsa.h
winsup/cygwin/cygmagic
winsup/cygwin/cygmalloc.h
winsup/cygwin/cygserver.h
winsup/cygwin/cygserver_ipc.h
winsup/cygwin/cygserver_msg.h
winsup/cygwin/cygserver_sem.h
winsup/cygwin/cygserver_setpwd.h
winsup/cygwin/cygserver_shm.h
winsup/cygwin/cygthread.cc
winsup/cygwin/cygthread.h
winsup/cygwin/cygtls.cc
winsup/cygwin/cygtls.h
winsup/cygwin/cygwin-cxx.h
winsup/cygwin/cygwin-shilka
winsup/cygwin/cygwin.din
winsup/cygwin/cygwin.sc
winsup/cygwin/cygwin_version.h
winsup/cygwin/dcrt0.cc
winsup/cygwin/debug.cc
winsup/cygwin/debug.h
winsup/cygwin/devices.cc
winsup/cygwin/devices.h
winsup/cygwin/devices.in
winsup/cygwin/dir.cc
winsup/cygwin/dlfcn.cc
winsup/cygwin/dll_init.cc
winsup/cygwin/dll_init.h
winsup/cygwin/dll_init.sgml
winsup/cygwin/dllfixdbg
winsup/cygwin/dlmalloc.c
winsup/cygwin/dlmalloc.h
winsup/cygwin/dtable.cc
winsup/cygwin/dtable.h
winsup/cygwin/dtable.sgml
winsup/cygwin/environ.cc
winsup/cygwin/environ.h
winsup/cygwin/errno.cc
winsup/cygwin/exceptions.cc
winsup/cygwin/exec.cc
winsup/cygwin/external.cc
winsup/cygwin/external.sgml
winsup/cygwin/fcntl.cc
winsup/cygwin/fhandler.cc
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_clipboard.cc
winsup/cygwin/fhandler_console.cc
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/fhandler_dsp.cc
winsup/cygwin/fhandler_fifo.cc
winsup/cygwin/fhandler_floppy.cc
winsup/cygwin/fhandler_mailslot.cc
winsup/cygwin/fhandler_mem.cc
winsup/cygwin/fhandler_netdrive.cc
winsup/cygwin/fhandler_nodevice.cc
winsup/cygwin/fhandler_proc.cc
winsup/cygwin/fhandler_process.cc
winsup/cygwin/fhandler_procnet.cc
winsup/cygwin/fhandler_random.cc
winsup/cygwin/fhandler_raw.cc
winsup/cygwin/fhandler_registry.cc
winsup/cygwin/fhandler_serial.cc
winsup/cygwin/fhandler_socket.cc
winsup/cygwin/fhandler_tape.cc
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/fhandler_tty.cc
winsup/cygwin/fhandler_virtual.cc
winsup/cygwin/fhandler_virtual.h
winsup/cygwin/fhandler_windows.cc
winsup/cygwin/fhandler_zero.cc
winsup/cygwin/flock.cc
winsup/cygwin/fork.cc
winsup/cygwin/gcrt0.c
winsup/cygwin/gendef
winsup/cygwin/gendevices
winsup/cygwin/gentls_offsets
winsup/cygwin/glob.cc
winsup/cygwin/glob_pattern_p.cc
winsup/cygwin/globals.cc
winsup/cygwin/gmon.c
winsup/cygwin/gmon.h
winsup/cygwin/grp.cc
winsup/cygwin/heap.cc
winsup/cygwin/heap.h
winsup/cygwin/hires.h
winsup/cygwin/hookapi.cc
winsup/cygwin/how-autoload-works.txt
winsup/cygwin/how-cygheap-works.txt
winsup/cygwin/how-cygtls-works.txt
winsup/cygwin/how-fhandlers-work.txt
winsup/cygwin/how-signals-work.txt
winsup/cygwin/how-spawn-works.txt
winsup/cygwin/how-to-debug-cygwin.txt
winsup/cygwin/how-vfork-works.txt
winsup/cygwin/include/a.out.h
winsup/cygwin/include/arpa/ftp.h
winsup/cygwin/include/arpa/inet.h
winsup/cygwin/include/arpa/nameser.h
winsup/cygwin/include/arpa/nameser_compat.h
winsup/cygwin/include/arpa/telnet.h
winsup/cygwin/include/asm/byteorder.h
winsup/cygwin/include/asm/socket.h
winsup/cygwin/include/asm/types.h
winsup/cygwin/include/attr/xattr.h
winsup/cygwin/include/bits/wordsize.h
winsup/cygwin/include/byteswap.h
winsup/cygwin/include/cygwin/_types.h
winsup/cygwin/include/cygwin/acl.h
winsup/cygwin/include/cygwin/config.h
winsup/cygwin/include/cygwin/core_dump.h
winsup/cygwin/include/cygwin/cygwin_dll.h
winsup/cygwin/include/cygwin/fs.h
winsup/cygwin/include/cygwin/grp.h
winsup/cygwin/include/cygwin/hdreg.h
winsup/cygwin/include/cygwin/icmp.h
winsup/cygwin/include/cygwin/if.h
winsup/cygwin/include/cygwin/in.h
winsup/cygwin/include/cygwin/in6.h
winsup/cygwin/include/cygwin/in_systm.h
winsup/cygwin/include/cygwin/ipc.h
winsup/cygwin/include/cygwin/kd.h
winsup/cygwin/include/cygwin/msg.h
winsup/cygwin/include/cygwin/mtio.h
winsup/cygwin/include/cygwin/rdevio.h
winsup/cygwin/include/cygwin/sem.h
winsup/cygwin/include/cygwin/shm.h
winsup/cygwin/include/cygwin/signal.h
winsup/cygwin/include/cygwin/socket.h
winsup/cygwin/include/cygwin/sockios.h
winsup/cygwin/include/cygwin/stat.h
winsup/cygwin/include/cygwin/stdlib.h
winsup/cygwin/include/cygwin/sys_time.h
winsup/cygwin/include/cygwin/sysproto.h
winsup/cygwin/include/cygwin/time.h
winsup/cygwin/include/cygwin/types.h
winsup/cygwin/include/cygwin/utmp.h
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/include/cygwin/wait.h
winsup/cygwin/include/dlfcn.h
winsup/cygwin/include/elf.h
winsup/cygwin/include/endian.h
winsup/cygwin/include/err.h
winsup/cygwin/include/exceptions.h
winsup/cygwin/include/fcntl.h
winsup/cygwin/include/features.h
winsup/cygwin/include/fnmatch.h
winsup/cygwin/include/fts.h
winsup/cygwin/include/ftw.h
winsup/cygwin/include/getopt.h
winsup/cygwin/include/glob.h
winsup/cygwin/include/icmp.h
winsup/cygwin/include/ifaddrs.h
winsup/cygwin/include/inttypes.h
winsup/cygwin/include/io.h
winsup/cygwin/include/lastlog.h
winsup/cygwin/include/libgen.h
winsup/cygwin/include/limits.h
winsup/cygwin/include/machine/stdlib.h
winsup/cygwin/include/mapi.h
winsup/cygwin/include/memory.h
winsup/cygwin/include/mntent.h
winsup/cygwin/include/mqueue.h
winsup/cygwin/include/net/if.h
winsup/cygwin/include/netdb.h
winsup/cygwin/include/netinet/in.h
winsup/cygwin/include/netinet/in_systm.h
winsup/cygwin/include/netinet/ip.h
winsup/cygwin/include/netinet/ip_icmp.h
winsup/cygwin/include/netinet/tcp.h
winsup/cygwin/include/netinet/udp.h
winsup/cygwin/include/paths.h
winsup/cygwin/include/poll.h
winsup/cygwin/include/pthread.h
winsup/cygwin/include/pty.h
winsup/cygwin/include/resolv.h
winsup/cygwin/include/sched.h
winsup/cygwin/include/search.h
winsup/cygwin/include/semaphore.h
winsup/cygwin/include/stdint.h
winsup/cygwin/include/strings.h
winsup/cygwin/include/sys/acl.h
winsup/cygwin/include/sys/copying.dj
winsup/cygwin/include/sys/cygwin.h
winsup/cygwin/include/sys/dirent.h
winsup/cygwin/include/sys/elf32.h
winsup/cygwin/include/sys/elf64.h
winsup/cygwin/include/sys/elf_common.h
winsup/cygwin/include/sys/elf_generic.h
winsup/cygwin/include/sys/file.h
winsup/cygwin/include/sys/ioctl.h
winsup/cygwin/include/sys/ipc.h
winsup/cygwin/include/sys/kd.h
winsup/cygwin/include/sys/lock.h
winsup/cygwin/include/sys/mman.h
winsup/cygwin/include/sys/mount.h
winsup/cygwin/include/sys/msg.h
winsup/cygwin/include/sys/mtio.h
winsup/cygwin/include/sys/param.h
winsup/cygwin/include/sys/poll.h
winsup/cygwin/include/sys/procfs.h
winsup/cygwin/include/sys/queue.h
winsup/cygwin/include/sys/resource.h
winsup/cygwin/include/sys/sched.h
winsup/cygwin/include/sys/select.h
winsup/cygwin/include/sys/sem.h
winsup/cygwin/include/sys/shm.h
winsup/cygwin/include/sys/smallprint.h
winsup/cygwin/include/sys/socket.h
winsup/cygwin/include/sys/soundcard.h
winsup/cygwin/include/sys/statfs.h
winsup/cygwin/include/sys/statvfs.h
winsup/cygwin/include/sys/stdio.h
winsup/cygwin/include/sys/strace.h
winsup/cygwin/include/sys/syslimits.h
winsup/cygwin/include/sys/syslog.h
winsup/cygwin/include/sys/sysmacros.h
winsup/cygwin/include/sys/sysproto.h
winsup/cygwin/include/sys/termio.h
winsup/cygwin/include/sys/termios.h
winsup/cygwin/include/sys/ttychars.h
winsup/cygwin/include/sys/uio.h
winsup/cygwin/include/sys/un.h
winsup/cygwin/include/sys/utime.h
winsup/cygwin/include/sys/utmp.h
winsup/cygwin/include/sys/utsname.h
winsup/cygwin/include/sys/vfs.h
winsup/cygwin/include/sys/wait.h
winsup/cygwin/include/sysexits.h
winsup/cygwin/include/syslog.h
winsup/cygwin/include/termio.h
winsup/cygwin/include/tzfile.h
winsup/cygwin/include/utmpx.h
winsup/cygwin/include/wait.h
winsup/cygwin/init.cc
winsup/cygwin/ioctl.cc
winsup/cygwin/ipc.cc
winsup/cygwin/kernel32.cc
winsup/cygwin/lib/_cygwin_crt0_common.cc
winsup/cygwin/lib/crt0.h
winsup/cygwin/lib/cygwin_attach_dll.c
winsup/cygwin/lib/cygwin_crt0.c
winsup/cygwin/lib/dll_entry.c
winsup/cygwin/lib/dll_main.cc
winsup/cygwin/lib/libcmain.c
winsup/cygwin/lib/premain0.c
winsup/cygwin/lib/premain1.c
winsup/cygwin/lib/premain2.c
winsup/cygwin/lib/premain3.c
winsup/cygwin/lib/pseudo-reloc.c
winsup/cygwin/libc/bsdlib.cc
winsup/cygwin/libc/fnmatch.c
winsup/cygwin/libc/fts.c
winsup/cygwin/libc/ftw.c
winsup/cygwin/libc/getopt.c
winsup/cygwin/libc/inet_addr.c
winsup/cygwin/libc/inet_network.c
winsup/cygwin/libc/minires-os-if.c
winsup/cygwin/libc/minires.c
winsup/cygwin/libc/minires.h
winsup/cygwin/libc/nftw.c
winsup/cygwin/libc/rcmd.cc
winsup/cygwin/libc/rexec.cc
winsup/cygwin/libc/strptime.cc
winsup/cygwin/libc/xsique.cc
winsup/cygwin/libstdcxx_wrapper.cc
winsup/cygwin/localtime.cc
winsup/cygwin/lsearch.cc
winsup/cygwin/malloc.cc
winsup/cygwin/malloc_wrapper.cc
winsup/cygwin/mcount.c
winsup/cygwin/miscfuncs.cc
winsup/cygwin/miscfuncs.h
winsup/cygwin/mkglobals_h
winsup/cygwin/mkimport
winsup/cygwin/mkstatic
winsup/cygwin/mktemp.cc
winsup/cygwin/mkvers.sh
winsup/cygwin/mmap.cc
winsup/cygwin/mmap_helper.h
winsup/cygwin/mount.cc
winsup/cygwin/mount.h
winsup/cygwin/msg.cc
winsup/cygwin/mtinfo.h
winsup/cygwin/net.cc
winsup/cygwin/netdb.cc
winsup/cygwin/nfs.cc
winsup/cygwin/nfs.h
winsup/cygwin/ntdll.h
winsup/cygwin/ntea.cc
winsup/cygwin/passwd.cc
winsup/cygwin/path.cc
winsup/cygwin/path.h
winsup/cygwin/path.sgml
winsup/cygwin/perprocess.h
winsup/cygwin/pinfo.cc
winsup/cygwin/pinfo.h
winsup/cygwin/pipe.cc
winsup/cygwin/poll.cc
winsup/cygwin/posix.sgml
winsup/cygwin/posix_ipc.cc
winsup/cygwin/profil.c
winsup/cygwin/profil.h
winsup/cygwin/pseudo-reloc.cc
winsup/cygwin/pthread.cc
winsup/cygwin/pwdgrp.h
winsup/cygwin/random.cc
winsup/cygwin/regex/COPYRIGHT
winsup/cygwin/regex/cclass.h
winsup/cygwin/regex/cname.h
winsup/cygwin/regex/engine.c
winsup/cygwin/regex/engine.ih
winsup/cygwin/regex/mkh
winsup/cygwin/regex/regcomp.c
winsup/cygwin/regex/regcomp.ih
winsup/cygwin/regex/regerror.c
winsup/cygwin/regex/regerror.ih
winsup/cygwin/regex/regex.3
winsup/cygwin/regex/regex.7
winsup/cygwin/regex/regex.h
winsup/cygwin/regex/regex2.h
winsup/cygwin/regex/regexec.c
winsup/cygwin/regex/regfree.c
winsup/cygwin/regex/tests
winsup/cygwin/regex/utils.h
winsup/cygwin/registry.cc
winsup/cygwin/registry.h
winsup/cygwin/resource.cc
winsup/cygwin/scandir.cc
winsup/cygwin/sched.cc
winsup/cygwin/sec_acl.cc
winsup/cygwin/sec_auth.cc
winsup/cygwin/sec_helper.cc
winsup/cygwin/security.cc
winsup/cygwin/security.h
winsup/cygwin/security.sgml
winsup/cygwin/select.cc
winsup/cygwin/select.h
winsup/cygwin/sem.cc
winsup/cygwin/setlsapwd.cc
winsup/cygwin/shared.cc
winsup/cygwin/shared_info.h
winsup/cygwin/shm.cc
winsup/cygwin/signal.cc
winsup/cygwin/sigproc.cc
winsup/cygwin/sigproc.h
winsup/cygwin/smallprint.cc
winsup/cygwin/sortdin
winsup/cygwin/spawn.cc
winsup/cygwin/speclib
winsup/cygwin/stackdump.sgml
winsup/cygwin/strace.cc
winsup/cygwin/strfuncs.cc
winsup/cygwin/string.h
winsup/cygwin/strsep.cc
winsup/cygwin/strsig.cc
winsup/cygwin/sync.cc
winsup/cygwin/sync.h
winsup/cygwin/syscalls.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/syslog.cc
winsup/cygwin/termios.cc
winsup/cygwin/textmode.c
winsup/cygwin/textreadmode.c
winsup/cygwin/thread.cc
winsup/cygwin/thread.h
winsup/cygwin/timer.cc
winsup/cygwin/times.cc
winsup/cygwin/tls_pbuf.cc
winsup/cygwin/tls_pbuf.h
winsup/cygwin/tlsoffsets.h
winsup/cygwin/tty.cc
winsup/cygwin/tty.h
winsup/cygwin/tz_posixrules.h
winsup/cygwin/uinfo.cc
winsup/cygwin/uname.cc
winsup/cygwin/wait.cc
winsup/cygwin/wchar.h
winsup/cygwin/winbase.h
winsup/cygwin/wincap.cc
winsup/cygwin/wincap.h
winsup/cygwin/window.cc
winsup/cygwin/winf.cc
winsup/cygwin/winf.h
winsup/cygwin/wininfo.h
winsup/cygwin/winsup.h
winsup/cygwin/winver.rc
winsup/doc/ChangeLog
winsup/doc/Makefile.in
winsup/doc/README
winsup/doc/aclocal.m4
winsup/doc/configure
winsup/doc/configure.in
winsup/doc/cygserver.sgml
winsup/doc/cygwin-api.in.sgml
winsup/doc/cygwin-ug-net.in.sgml
winsup/doc/cygwin-ug.in.sgml
winsup/doc/cygwin.dsl
winsup/doc/cygwinenv.sgml
winsup/doc/dll.sgml
winsup/doc/doctool.c
winsup/doc/doctool.txt
winsup/doc/effectively.sgml
winsup/doc/faq-api.xml
winsup/doc/faq-programming.xml
winsup/doc/faq-resources.xml
winsup/doc/faq-sections.xml
winsup/doc/faq-setup.xml
winsup/doc/faq-using.xml
winsup/doc/faq-what.xml
winsup/doc/faq.xml
winsup/doc/fhandler-tut.txt
winsup/doc/filemodes.sgml
winsup/doc/gcc.sgml
winsup/doc/gdb.sgml
winsup/doc/legal.sgml
winsup/doc/new-features.sgml
winsup/doc/ntsec.sgml
winsup/doc/overview.sgml
winsup/doc/overview2.sgml
winsup/doc/pathnames.sgml
winsup/doc/programming.sgml
winsup/doc/setup-net.sgml
winsup/doc/setup.sgml
winsup/doc/setup2.sgml
winsup/doc/textbinary.sgml
winsup/doc/using.sgml
winsup/doc/windres.sgml
winsup/lsaauth/ChangeLog
winsup/lsaauth/Makefile.in
winsup/lsaauth/aclocal.m4
winsup/lsaauth/configure
winsup/lsaauth/configure.in
winsup/lsaauth/cyglsa-config
winsup/lsaauth/cyglsa.c
winsup/lsaauth/cyglsa.din
winsup/lsaauth/cyglsa64.dll
winsup/lsaauth/make-64bit-version-with-visual-c.bat
winsup/lsaauth/mslsa.def
winsup/mingw/CONTRIBUTORS
winsup/mingw/CRT_fp10.c
winsup/mingw/CRT_fp8.c
winsup/mingw/CRT_noglob.c
winsup/mingw/CRTfmode.c
winsup/mingw/CRTglob.c
winsup/mingw/CRTinit.c
winsup/mingw/ChangeLog
winsup/mingw/DISCLAIMER
winsup/mingw/Makefile.in
winsup/mingw/README
winsup/mingw/TODO
winsup/mingw/aclocal.m4
winsup/mingw/binmode.c
winsup/mingw/config.guess
winsup/mingw/config.sub
winsup/mingw/configure
winsup/mingw/configure.in
winsup/mingw/cpu_features.c
winsup/mingw/cpu_features.h
winsup/mingw/crt1.c
winsup/mingw/crtdll.def
winsup/mingw/crtmt.c
winsup/mingw/crtst.c
winsup/mingw/dllcrt1.c
winsup/mingw/dllmain.c
winsup/mingw/gccmain.c
winsup/mingw/include/_mingw.h
winsup/mingw/include/assert.h
winsup/mingw/include/complex.h
winsup/mingw/include/conio.h
winsup/mingw/include/ctype.h
winsup/mingw/include/dir.h
winsup/mingw/include/direct.h
winsup/mingw/include/dirent.h
winsup/mingw/include/dos.h
winsup/mingw/include/errno.h
winsup/mingw/include/excpt.h
winsup/mingw/include/fcntl.h
winsup/mingw/include/fenv.h
winsup/mingw/include/float.h
winsup/mingw/include/getopt.h
winsup/mingw/include/inttypes.h
winsup/mingw/include/io.h
winsup/mingw/include/libgen.h
winsup/mingw/include/limits.h
winsup/mingw/include/locale.h
winsup/mingw/include/malloc.h
winsup/mingw/include/math.h
winsup/mingw/include/mbctype.h
winsup/mingw/include/mbstring.h
winsup/mingw/include/mem.h
winsup/mingw/include/memory.h
winsup/mingw/include/process.h
winsup/mingw/include/search.h
winsup/mingw/include/setjmp.h
winsup/mingw/include/share.h
winsup/mingw/include/signal.h
winsup/mingw/include/stdint.h
winsup/mingw/include/stdio.h
winsup/mingw/include/stdlib.h
winsup/mingw/include/string.h
winsup/mingw/include/strings.h
winsup/mingw/include/sys/fcntl.h
winsup/mingw/include/sys/file.h
winsup/mingw/include/sys/locking.h
winsup/mingw/include/sys/param.h
winsup/mingw/include/sys/stat.h
winsup/mingw/include/sys/time.h
winsup/mingw/include/sys/timeb.h
winsup/mingw/include/sys/types.h
winsup/mingw/include/sys/unistd.h
winsup/mingw/include/sys/utime.h
winsup/mingw/include/tchar.h
winsup/mingw/include/time.h
winsup/mingw/include/unistd.h
winsup/mingw/include/utime.h
winsup/mingw/include/values.h
winsup/mingw/include/varargs.h
winsup/mingw/include/wchar.h
winsup/mingw/include/wctype.h
winsup/mingw/init.c
winsup/mingw/install-sh
winsup/mingw/isascii.c
winsup/mingw/iscsym.c
winsup/mingw/iscsymf.c
winsup/mingw/jamfile
winsup/mingw/main.c
winsup/mingw/man/dirname.man
winsup/mingw/mingwex/Makefile.in
winsup/mingw/mingwex/_Exit.c
winsup/mingw/mingwex/atoll.c
winsup/mingw/mingwex/basename.c
winsup/mingw/mingwex/btowc.c
winsup/mingw/mingwex/complex/cabs.c
winsup/mingw/mingwex/complex/cabsf.c
winsup/mingw/mingwex/complex/cabsl.c
winsup/mingw/mingwex/complex/cacos.c
winsup/mingw/mingwex/complex/cacosf.c
winsup/mingw/mingwex/complex/cacosh.c
winsup/mingw/mingwex/complex/cacoshf.c
winsup/mingw/mingwex/complex/cacoshl.c
winsup/mingw/mingwex/complex/cacosl.c
winsup/mingw/mingwex/complex/carg.c
winsup/mingw/mingwex/complex/cargf.c
winsup/mingw/mingwex/complex/cargl.c
winsup/mingw/mingwex/complex/casin.c
winsup/mingw/mingwex/complex/casinf.c
winsup/mingw/mingwex/complex/casinh.c
winsup/mingw/mingwex/complex/casinhf.c
winsup/mingw/mingwex/complex/casinhl.c
winsup/mingw/mingwex/complex/casinl.c
winsup/mingw/mingwex/complex/catan.c
winsup/mingw/mingwex/complex/catanf.c
winsup/mingw/mingwex/complex/catanh.c
winsup/mingw/mingwex/complex/catanhf.c
winsup/mingw/mingwex/complex/catanhl.c
winsup/mingw/mingwex/complex/catanl.c
winsup/mingw/mingwex/complex/ccos.c
winsup/mingw/mingwex/complex/ccosf.c
winsup/mingw/mingwex/complex/ccosh.c
winsup/mingw/mingwex/complex/ccoshf.c
winsup/mingw/mingwex/complex/ccoshl.c
winsup/mingw/mingwex/complex/ccosl.c
winsup/mingw/mingwex/complex/cexp.c
winsup/mingw/mingwex/complex/cexpf.c
winsup/mingw/mingwex/complex/cexpl.c
winsup/mingw/mingwex/complex/cimag.c
winsup/mingw/mingwex/complex/cimagf.c
winsup/mingw/mingwex/complex/cimagl.c
winsup/mingw/mingwex/complex/clog.c
winsup/mingw/mingwex/complex/clogf.c
winsup/mingw/mingwex/complex/clogl.c
winsup/mingw/mingwex/complex/cpow.c
winsup/mingw/mingwex/complex/cpowf.c
winsup/mingw/mingwex/complex/cpowl.c
winsup/mingw/mingwex/complex/cproj.c
winsup/mingw/mingwex/complex/cprojf.c
winsup/mingw/mingwex/complex/cprojl.c
winsup/mingw/mingwex/complex/creal.c
winsup/mingw/mingwex/complex/crealf.c
winsup/mingw/mingwex/complex/creall.c
winsup/mingw/mingwex/complex/csin.c
winsup/mingw/mingwex/complex/csinf.c
winsup/mingw/mingwex/complex/csinh.c
winsup/mingw/mingwex/complex/csinhf.c
winsup/mingw/mingwex/complex/csinhl.c
winsup/mingw/mingwex/complex/csinl.c
winsup/mingw/mingwex/complex/csqrt.c
winsup/mingw/mingwex/complex/csqrtf.c
winsup/mingw/mingwex/complex/csqrtl.c
winsup/mingw/mingwex/complex/ctan.c
winsup/mingw/mingwex/complex/ctanf.c
winsup/mingw/mingwex/complex/ctanh.c
winsup/mingw/mingwex/complex/ctanhf.c
winsup/mingw/mingwex/complex/ctanhl.c
winsup/mingw/mingwex/complex/ctanl.c
winsup/mingw/mingwex/dirent.c
winsup/mingw/mingwex/dirname.c
winsup/mingw/mingwex/feclearexcept.c
winsup/mingw/mingwex/fegetenv.c
winsup/mingw/mingwex/fegetexceptflag.c
winsup/mingw/mingwex/fegetround.c
winsup/mingw/mingwex/feholdexcept.c
winsup/mingw/mingwex/feraiseexcept.c
winsup/mingw/mingwex/fesetenv.c
winsup/mingw/mingwex/fesetexceptflag.c
winsup/mingw/mingwex/fesetround.c
winsup/mingw/mingwex/fetestexcept.c
winsup/mingw/mingwex/feupdateenv.c
winsup/mingw/mingwex/ftruncate.c
winsup/mingw/mingwex/fwide.c
winsup/mingw/mingwex/gdtoa/README
winsup/mingw/mingwex/gdtoa/README.mingw
winsup/mingw/mingwex/gdtoa/arithchk.c
winsup/mingw/mingwex/gdtoa/dmisc.c
winsup/mingw/mingwex/gdtoa/dtoa.c
winsup/mingw/mingwex/gdtoa/g__fmt.c
winsup/mingw/mingwex/gdtoa/g_dfmt.c
winsup/mingw/mingwex/gdtoa/g_ffmt.c
winsup/mingw/mingwex/gdtoa/g_xfmt.c
winsup/mingw/mingwex/gdtoa/gd_arith.h
winsup/mingw/mingwex/gdtoa/gd_qnan.h
winsup/mingw/mingwex/gdtoa/gdtoa.c
winsup/mingw/mingwex/gdtoa/gdtoa.h
winsup/mingw/mingwex/gdtoa/gdtoa_fltrnds.h
winsup/mingw/mingwex/gdtoa/gdtoaimp.h
winsup/mingw/mingwex/gdtoa/gethex.c
winsup/mingw/mingwex/gdtoa/gmisc.c
winsup/mingw/mingwex/gdtoa/hd_init.c
winsup/mingw/mingwex/gdtoa/hexnan.c
winsup/mingw/mingwex/gdtoa/misc.c
winsup/mingw/mingwex/gdtoa/qnan.c
winsup/mingw/mingwex/gdtoa/smisc.c
winsup/mingw/mingwex/gdtoa/strtodg.c
winsup/mingw/mingwex/gdtoa/strtodnrp.c
winsup/mingw/mingwex/gdtoa/strtof.c
winsup/mingw/mingwex/gdtoa/strtopx.c
winsup/mingw/mingwex/gdtoa/sum.c
winsup/mingw/mingwex/gdtoa/ulp.c
winsup/mingw/mingwex/getopt.c
winsup/mingw/mingwex/gettimeofday.c
winsup/mingw/mingwex/imaxabs.c
winsup/mingw/mingwex/imaxdiv.c
winsup/mingw/mingwex/isblank.c
winsup/mingw/mingwex/iswblank.c
winsup/mingw/mingwex/lltoa.c
winsup/mingw/mingwex/lltow.c
winsup/mingw/mingwex/math/acosf.c
winsup/mingw/mingwex/math/acosh.c
winsup/mingw/mingwex/math/acoshf.c
winsup/mingw/mingwex/math/acoshl.c
winsup/mingw/mingwex/math/acosl.c
winsup/mingw/mingwex/math/asinf.c
winsup/mingw/mingwex/math/asinh.c
winsup/mingw/mingwex/math/asinhf.c
winsup/mingw/mingwex/math/asinhl.c
winsup/mingw/mingwex/math/asinl.c
winsup/mingw/mingwex/math/atan2f.c
winsup/mingw/mingwex/math/atan2l.c
winsup/mingw/mingwex/math/atanf.c
winsup/mingw/mingwex/math/atanh.c
winsup/mingw/mingwex/math/atanhf.c
winsup/mingw/mingwex/math/atanhl.c
winsup/mingw/mingwex/math/atanl.c
winsup/mingw/mingwex/math/cbrt.c
winsup/mingw/mingwex/math/cbrtf.c
winsup/mingw/mingwex/math/cbrtl.c
winsup/mingw/mingwex/math/ceilf.S
winsup/mingw/mingwex/math/ceill.S
winsup/mingw/mingwex/math/cephes_mconf.h
winsup/mingw/mingwex/math/copysign.S
winsup/mingw/mingwex/math/copysignf.S
winsup/mingw/mingwex/math/copysignl.S
winsup/mingw/mingwex/math/cosf.S
winsup/mingw/mingwex/math/coshf.c
winsup/mingw/mingwex/math/coshl.c
winsup/mingw/mingwex/math/cosl.S
winsup/mingw/mingwex/math/erfl.c
winsup/mingw/mingwex/math/exp2.S
winsup/mingw/mingwex/math/exp2f.S
winsup/mingw/mingwex/math/exp2l.S
winsup/mingw/mingwex/math/expf.c
winsup/mingw/mingwex/math/expl.c
winsup/mingw/mingwex/math/expm1.c
winsup/mingw/mingwex/math/expm1f.c
winsup/mingw/mingwex/math/expm1l.c
winsup/mingw/mingwex/math/fabs.c
winsup/mingw/mingwex/math/fabsf.c
winsup/mingw/mingwex/math/fabsl.c
winsup/mingw/mingwex/math/fastmath.h
winsup/mingw/mingwex/math/fdim.c
winsup/mingw/mingwex/math/fdimf.c
winsup/mingw/mingwex/math/fdiml.c
winsup/mingw/mingwex/math/floorf.S
winsup/mingw/mingwex/math/floorl.S
winsup/mingw/mingwex/math/fma.S
winsup/mingw/mingwex/math/fmaf.S
winsup/mingw/mingwex/math/fmal.c
winsup/mingw/mingwex/math/fmax.c
winsup/mingw/mingwex/math/fmaxf.c
winsup/mingw/mingwex/math/fmaxl.c
winsup/mingw/mingwex/math/fmin.c
winsup/mingw/mingwex/math/fminf.c
winsup/mingw/mingwex/math/fminl.c
winsup/mingw/mingwex/math/fmodf.c
winsup/mingw/mingwex/math/fmodl.c
winsup/mingw/mingwex/math/fp_consts.c
winsup/mingw/mingwex/math/fp_consts.h
winsup/mingw/mingwex/math/fp_constsf.c
winsup/mingw/mingwex/math/fp_constsl.c
winsup/mingw/mingwex/math/fpclassify.c
winsup/mingw/mingwex/math/fpclassifyf.c
winsup/mingw/mingwex/math/fpclassifyl.c
winsup/mingw/mingwex/math/frexpf.c
winsup/mingw/mingwex/math/frexpl.S
winsup/mingw/mingwex/math/fucom.c
winsup/mingw/mingwex/math/hypotf.c
winsup/mingw/mingwex/math/hypotl.c
winsup/mingw/mingwex/math/ilogb.S
winsup/mingw/mingwex/math/ilogbf.S
winsup/mingw/mingwex/math/ilogbl.S
winsup/mingw/mingwex/math/isnan.c
winsup/mingw/mingwex/math/isnanf.c
winsup/mingw/mingwex/math/isnanl.c
winsup/mingw/mingwex/math/ldexpf.c
winsup/mingw/mingwex/math/ldexpl.c
winsup/mingw/mingwex/math/lgamma.c
winsup/mingw/mingwex/math/lgammaf.c
winsup/mingw/mingwex/math/lgammal.c
winsup/mingw/mingwex/math/llrint.c
winsup/mingw/mingwex/math/llrintf.c
winsup/mingw/mingwex/math/llrintl.c
winsup/mingw/mingwex/math/log10f.S
winsup/mingw/mingwex/math/log10l.S
winsup/mingw/mingwex/math/log1p.S
winsup/mingw/mingwex/math/log1pf.S
winsup/mingw/mingwex/math/log1pl.S
winsup/mingw/mingwex/math/log2.S
winsup/mingw/mingwex/math/log2f.S
winsup/mingw/mingwex/math/log2l.S
winsup/mingw/mingwex/math/logb.c
winsup/mingw/mingwex/math/logbf.c
winsup/mingw/mingwex/math/logbl.c
winsup/mingw/mingwex/math/logf.S
winsup/mingw/mingwex/math/logl.S
winsup/mingw/mingwex/math/lrint.c
winsup/mingw/mingwex/math/lrintf.c
winsup/mingw/mingwex/math/lrintl.c
winsup/mingw/mingwex/math/lround_generic.c
winsup/mingw/mingwex/math/modff.c
winsup/mingw/mingwex/math/modfl.c
winsup/mingw/mingwex/math/nearbyint.S
winsup/mingw/mingwex/math/nearbyintf.S
winsup/mingw/mingwex/math/nearbyintl.S
winsup/mingw/mingwex/math/nextafterf.c
winsup/mingw/mingwex/math/nextafterl.c
winsup/mingw/mingwex/math/nexttoward.c
winsup/mingw/mingwex/math/nexttowardf.c
winsup/mingw/mingwex/math/pow.c
winsup/mingw/mingwex/math/powf.c
winsup/mingw/mingwex/math/powi.c
winsup/mingw/mingwex/math/powif.c
winsup/mingw/mingwex/math/powil.c
winsup/mingw/mingwex/math/powl.c
winsup/mingw/mingwex/math/remainder.S
winsup/mingw/mingwex/math/remainderf.S
winsup/mingw/mingwex/math/remainderl.S
winsup/mingw/mingwex/math/remquo.S
winsup/mingw/mingwex/math/remquof.S
winsup/mingw/mingwex/math/remquol.S
winsup/mingw/mingwex/math/rint.c
winsup/mingw/mingwex/math/rintf.c
winsup/mingw/mingwex/math/rintl.c
winsup/mingw/mingwex/math/round_generic.c
winsup/mingw/mingwex/math/round_internal.h
winsup/mingw/mingwex/math/s_erf.c
winsup/mingw/mingwex/math/scalbn.S
winsup/mingw/mingwex/math/scalbnf.S
winsup/mingw/mingwex/math/scalbnl.S
winsup/mingw/mingwex/math/sf_erf.c
winsup/mingw/mingwex/math/signbit.c
winsup/mingw/mingwex/math/signbitf.c
winsup/mingw/mingwex/math/signbitl.c
winsup/mingw/mingwex/math/sinf.S
winsup/mingw/mingwex/math/sinhf.c
winsup/mingw/mingwex/math/sinhl.c
winsup/mingw/mingwex/math/sinl.S
winsup/mingw/mingwex/math/sqrtf.c
winsup/mingw/mingwex/math/sqrtl.c
winsup/mingw/mingwex/math/tanf.S
winsup/mingw/mingwex/math/tanhf.c
winsup/mingw/mingwex/math/tanhl.c
winsup/mingw/mingwex/math/tanl.S
winsup/mingw/mingwex/math/tgamma.c
winsup/mingw/mingwex/math/tgammaf.c
winsup/mingw/mingwex/math/tgammal.c
winsup/mingw/mingwex/math/trunc.c
winsup/mingw/mingwex/math/truncf.c
winsup/mingw/mingwex/math/truncl.c
winsup/mingw/mingwex/mb_wc_common.h
winsup/mingw/mingwex/mbrtowc.c
winsup/mingw/mingwex/mbsinit.c
winsup/mingw/mingwex/mingw-aligned-malloc.c
winsup/mingw/mingwex/mingw-fseek.c
winsup/mingw/mingwex/sitest.c
winsup/mingw/mingwex/stdio/fopen64.c
winsup/mingw/mingwex/stdio/fprintf.c
winsup/mingw/mingwex/stdio/fseeko64.c
winsup/mingw/mingwex/stdio/ftello64.c
winsup/mingw/mingwex/stdio/lseek64.c
winsup/mingw/mingwex/stdio/pformat.c
winsup/mingw/mingwex/stdio/pformat.h
winsup/mingw/mingwex/stdio/printf.c
winsup/mingw/mingwex/stdio/snprintf.c
winsup/mingw/mingwex/stdio/snwprintf.c
winsup/mingw/mingwex/stdio/sprintf.c
winsup/mingw/mingwex/stdio/vfprintf.c
winsup/mingw/mingwex/stdio/vfscanf.c
winsup/mingw/mingwex/stdio/vfwscanf.c
winsup/mingw/mingwex/stdio/vprintf.c
winsup/mingw/mingwex/stdio/vscanf.c
winsup/mingw/mingwex/stdio/vsnprintf.c
winsup/mingw/mingwex/stdio/vsnwprintf.c
winsup/mingw/mingwex/stdio/vsprintf.c
winsup/mingw/mingwex/stdio/vsscanf.c
winsup/mingw/mingwex/stdio/vswscanf.c
winsup/mingw/mingwex/stdio/vwscanf.c
winsup/mingw/mingwex/strtoimax.c
winsup/mingw/mingwex/strtoumax.c
winsup/mingw/mingwex/tdelete.c
winsup/mingw/mingwex/testwmem.c
winsup/mingw/mingwex/tfind.c
winsup/mingw/mingwex/tsearch.c
winsup/mingw/mingwex/tst-aligned-malloc.c
winsup/mingw/mingwex/twalk.c
winsup/mingw/mingwex/ulltoa.c
winsup/mingw/mingwex/ulltow.c
winsup/mingw/mingwex/usleep.c
winsup/mingw/mingwex/wcrtomb.c
winsup/mingw/mingwex/wcstof.c
winsup/mingw/mingwex/wcstoimax.c
winsup/mingw/mingwex/wcstold.c
winsup/mingw/mingwex/wcstoumax.c
winsup/mingw/mingwex/wctob.c
winsup/mingw/mingwex/wctrans.c
winsup/mingw/mingwex/wctype.c
winsup/mingw/mingwex/wdirent.c
winsup/mingw/mingwex/wmemchr.c
winsup/mingw/mingwex/wmemcmp.c
winsup/mingw/mingwex/wmemcpy.c
winsup/mingw/mingwex/wmemmove.c
winsup/mingw/mingwex/wmemset.c
winsup/mingw/mingwex/wtoll.c
winsup/mingw/mkinstalldirs
winsup/mingw/moldname.def.in
winsup/mingw/msvcrt.def.in
winsup/mingw/mthr.c
winsup/mingw/mthr_init.c
winsup/mingw/mthr_stub.c
winsup/mingw/ofmt_stub.s
winsup/mingw/profile/COPYING
winsup/mingw/profile/CYGWIN_LICENSE
winsup/mingw/profile/Makefile.in
winsup/mingw/profile/gcrt0.c
winsup/mingw/profile/gmon.c
winsup/mingw/profile/gmon.h
winsup/mingw/profile/mcount.c
winsup/mingw/profile/profil.c
winsup/mingw/profile/profil.h
winsup/mingw/profile/profile.h
winsup/mingw/pseudo-reloc-list.c
winsup/mingw/pseudo-reloc.c
winsup/mingw/readme.txt
winsup/mingw/samples/dirent/jamfile
winsup/mingw/samples/dirent/test.c
winsup/mingw/samples/dirent/wtest.c
winsup/mingw/samples/dlltest/dll.c
winsup/mingw/samples/dlltest/dll.def
winsup/mingw/samples/dlltest/dll.h
winsup/mingw/samples/dlltest/exe.c
winsup/mingw/samples/dlltest/exe.exp
winsup/mingw/samples/dlltest/expexe.c
winsup/mingw/samples/dlltest/expexe.def
winsup/mingw/samples/dlltest/jamfile
winsup/mingw/samples/dlltest/loaddll.c
winsup/mingw/samples/dlltest/loadexe.c
winsup/mingw/samples/dlltest/readme.txt
winsup/mingw/samples/dlltest/silly.cpp
winsup/mingw/samples/dlltest/silly.def
winsup/mingw/samples/dlltest/silly.exp
winsup/mingw/samples/dlltest/silly.h
winsup/mingw/samples/dlltest/sillydll.cpp
winsup/mingw/samples/filehand/filehand.c
winsup/mingw/samples/filehand/jamfile
winsup/mingw/samples/filehand/junk.txt
winsup/mingw/samples/fixargv/fixargv.c
winsup/mingw/samples/fixargv/fixargv.h
winsup/mingw/samples/fixargv/readme.txt
winsup/mingw/samples/fmode/all.c
winsup/mingw/samples/fmode/jamfile
winsup/mingw/samples/fmode/readme.txt
winsup/mingw/samples/fmode/test.c
winsup/mingw/samples/fmode/test2.c
winsup/mingw/samples/globbing/glob.c
winsup/mingw/samples/globbing/jamfile
winsup/mingw/samples/globbing/noglob.c
winsup/mingw/samples/globbing/readme.txt
winsup/mingw/samples/print/jamfile
winsup/mingw/samples/print/prntest.c
winsup/mingw/samples/seh/eh3.c
winsup/mingw/samples/seh/exutil.c
winsup/mingw/samples/seh/exutil.def
winsup/mingw/samples/seh/exutil.h
winsup/mingw/samples/seh/jamfile
winsup/mingw/samples/seh/sehfix.c
winsup/mingw/samples/seh/sehsub.c
winsup/mingw/samples/seh/sehtest.c
winsup/mingw/samples/simpledll/dll.c
winsup/mingw/samples/simpledll/dll.cpp
winsup/mingw/samples/simpledll/dll.def
winsup/mingw/samples/simpledll/exe.c
winsup/mingw/samples/simpledll/jamfile
winsup/mingw/samples/simpledll/makedll.bat
winsup/mingw/samples/test/jamfile
winsup/mingw/samples/test/test.c
winsup/mingw/samples/wintest/jamfile
winsup/mingw/samples/wintest/test.c
winsup/mingw/strcasecmp.c
winsup/mingw/strncasecmp.c
winsup/mingw/test_headers.c
winsup/mingw/toascii.c
winsup/mingw/txtmode.c
winsup/mingw/wcscmpi.c
winsup/testsuite/ChangeLog
winsup/testsuite/Makefile.in
winsup/testsuite/README
winsup/testsuite/aclocal.m4
winsup/testsuite/config/default.exp
winsup/testsuite/configure
winsup/testsuite/configure.in
winsup/testsuite/cygrun.c
winsup/testsuite/libltp/include/dataascii.h
winsup/testsuite/libltp/include/databin.h
winsup/testsuite/libltp/include/file_lock.h
winsup/testsuite/libltp/include/forker.h
winsup/testsuite/libltp/include/open_flags.h
winsup/testsuite/libltp/include/pattern.h
winsup/testsuite/libltp/include/random_range.h
winsup/testsuite/libltp/include/rmobj.h
winsup/testsuite/libltp/include/search_path.h
winsup/testsuite/libltp/include/str_to_bytes.h
winsup/testsuite/libltp/include/string_to_tokens.h
winsup/testsuite/libltp/include/test.h
winsup/testsuite/libltp/include/tlibio.h
winsup/testsuite/libltp/include/usctest.h
winsup/testsuite/libltp/include/write_log.h
winsup/testsuite/libltp/lib/dataascii.c
winsup/testsuite/libltp/lib/databin.c
winsup/testsuite/libltp/lib/datapid.c
winsup/testsuite/libltp/lib/forker.c
winsup/testsuite/libltp/lib/get_high_address.c
winsup/testsuite/libltp/lib/libtestsuite.c
winsup/testsuite/libltp/lib/open_flags.c
winsup/testsuite/libltp/lib/parse_opts.c
winsup/testsuite/libltp/lib/pattern.c
winsup/testsuite/libltp/lib/rmobj.c
winsup/testsuite/libltp/lib/search_path.c
winsup/testsuite/libltp/lib/str_to_bytes.c
winsup/testsuite/libltp/lib/string_to_tokens.c
winsup/testsuite/libltp/lib/tst_res.c
winsup/testsuite/libltp/lib/tst_sig.c
winsup/testsuite/libltp/lib/tst_tmpdir.c
winsup/testsuite/libltp/lib/write_log.c
winsup/testsuite/winsup.api/checksignal.c
winsup/testsuite/winsup.api/crlf.c
winsup/testsuite/winsup.api/cygload.cc
winsup/testsuite/winsup.api/cygload.exp
winsup/testsuite/winsup.api/cygload.h
winsup/testsuite/winsup.api/devdsp.c
winsup/testsuite/winsup.api/devdsp_okay.h
winsup/testsuite/winsup.api/devzero.c
winsup/testsuite/winsup.api/iospeed.c
winsup/testsuite/winsup.api/known_bugs.tcl
winsup/testsuite/winsup.api/ltp/access01.c
winsup/testsuite/winsup.api/ltp/access03.c
winsup/testsuite/winsup.api/ltp/access04.c
winsup/testsuite/winsup.api/ltp/access05.c
winsup/testsuite/winsup.api/ltp/alarm01.c
winsup/testsuite/winsup.api/ltp/alarm02.c
winsup/testsuite/winsup.api/ltp/alarm03.c
winsup/testsuite/winsup.api/ltp/alarm07.c
winsup/testsuite/winsup.api/ltp/asyncio02.c
winsup/testsuite/winsup.api/ltp/chdir02.c
winsup/testsuite/winsup.api/ltp/chdir04.c
winsup/testsuite/winsup.api/ltp/chmod01.c
winsup/testsuite/winsup.api/ltp/chmod02.c
winsup/testsuite/winsup.api/ltp/chown01.c
winsup/testsuite/winsup.api/ltp/close01.c
winsup/testsuite/winsup.api/ltp/close02.c
winsup/testsuite/winsup.api/ltp/close08.c
winsup/testsuite/winsup.api/ltp/creat01.c
winsup/testsuite/winsup.api/ltp/creat03.c
winsup/testsuite/winsup.api/ltp/creat09.c
winsup/testsuite/winsup.api/ltp/dup01.c
winsup/testsuite/winsup.api/ltp/dup02.c
winsup/testsuite/winsup.api/ltp/dup03.c
winsup/testsuite/winsup.api/ltp/dup04.c
winsup/testsuite/winsup.api/ltp/dup05.c
winsup/testsuite/winsup.api/ltp/execl01.c
winsup/testsuite/winsup.api/ltp/execle01.c
winsup/testsuite/winsup.api/ltp/execlp01.c
winsup/testsuite/winsup.api/ltp/execv01.c
winsup/testsuite/winsup.api/ltp/execve01.c
winsup/testsuite/winsup.api/ltp/execvp01.c
winsup/testsuite/winsup.api/ltp/exit01.c
winsup/testsuite/winsup.api/ltp/exit02.c
winsup/testsuite/winsup.api/ltp/fchdir01.c
winsup/testsuite/winsup.api/ltp/fchdir02.c
winsup/testsuite/winsup.api/ltp/fchmod01.c
winsup/testsuite/winsup.api/ltp/fchown01.c
winsup/testsuite/winsup.api/ltp/fcntl02.c
winsup/testsuite/winsup.api/ltp/fcntl03.c
winsup/testsuite/winsup.api/ltp/fcntl04.c
winsup/testsuite/winsup.api/ltp/fcntl05.c
winsup/testsuite/winsup.api/ltp/fcntl07.c
winsup/testsuite/winsup.api/ltp/fcntl07B.c
winsup/testsuite/winsup.api/ltp/fcntl08.c
winsup/testsuite/winsup.api/ltp/fcntl09.c
winsup/testsuite/winsup.api/ltp/fcntl10.c
winsup/testsuite/winsup.api/ltp/fork01.c
winsup/testsuite/winsup.api/ltp/fork02.c
winsup/testsuite/winsup.api/ltp/fork03.c
winsup/testsuite/winsup.api/ltp/fork04.c
winsup/testsuite/winsup.api/ltp/fork06.c
winsup/testsuite/winsup.api/ltp/fork07.c
winsup/testsuite/winsup.api/ltp/fork09.c
winsup/testsuite/winsup.api/ltp/fork10.c
winsup/testsuite/winsup.api/ltp/fork11.c
winsup/testsuite/winsup.api/ltp/fpathconf01.c
winsup/testsuite/winsup.api/ltp/fstat01.c
winsup/testsuite/winsup.api/ltp/fstat02.c
winsup/testsuite/winsup.api/ltp/fstat03.c
winsup/testsuite/winsup.api/ltp/fstat04.c
winsup/testsuite/winsup.api/ltp/fsync01.c
winsup/testsuite/winsup.api/ltp/ftruncate01.c
winsup/testsuite/winsup.api/ltp/ftruncate02.c
winsup/testsuite/winsup.api/ltp/ftruncate03.c
winsup/testsuite/winsup.api/ltp/getegid01.c
winsup/testsuite/winsup.api/ltp/geteuid01.c
winsup/testsuite/winsup.api/ltp/getgid01.c
winsup/testsuite/winsup.api/ltp/getgid02.c
winsup/testsuite/winsup.api/ltp/getgid03.c
winsup/testsuite/winsup.api/ltp/getgroups01.c
winsup/testsuite/winsup.api/ltp/getgroups02.c
winsup/testsuite/winsup.api/ltp/gethostid01.c
winsup/testsuite/winsup.api/ltp/gethostname01.c
winsup/testsuite/winsup.api/ltp/getpgid01.c
winsup/testsuite/winsup.api/ltp/getpgid02.c
winsup/testsuite/winsup.api/ltp/getpgrp01.c
winsup/testsuite/winsup.api/ltp/getpid01.c
winsup/testsuite/winsup.api/ltp/getpid02.c
winsup/testsuite/winsup.api/ltp/getppid01.c
winsup/testsuite/winsup.api/ltp/getppid02.c
winsup/testsuite/winsup.api/ltp/getuid01.c
winsup/testsuite/winsup.api/ltp/getuid02.c
winsup/testsuite/winsup.api/ltp/getuid03.c
winsup/testsuite/winsup.api/ltp/kill01.c
winsup/testsuite/winsup.api/ltp/kill02.c
winsup/testsuite/winsup.api/ltp/kill03.c
winsup/testsuite/winsup.api/ltp/kill04.c
winsup/testsuite/winsup.api/ltp/kill09.c
winsup/testsuite/winsup.api/ltp/link02.c
winsup/testsuite/winsup.api/ltp/link03.c
winsup/testsuite/winsup.api/ltp/link04.c
winsup/testsuite/winsup.api/ltp/link05.c
winsup/testsuite/winsup.api/ltp/lseek01.c
winsup/testsuite/winsup.api/ltp/lseek02.c
winsup/testsuite/winsup.api/ltp/lseek03.c
winsup/testsuite/winsup.api/ltp/lseek04.c
winsup/testsuite/winsup.api/ltp/lseek05.c
winsup/testsuite/winsup.api/ltp/lseek06.c
winsup/testsuite/winsup.api/ltp/lseek07.c
winsup/testsuite/winsup.api/ltp/lseek08.c
winsup/testsuite/winsup.api/ltp/lseek09.c
winsup/testsuite/winsup.api/ltp/lseek10.c
winsup/testsuite/winsup.api/ltp/lstat02.c
winsup/testsuite/winsup.api/ltp/mkdir01.c
winsup/testsuite/winsup.api/ltp/mkdir08.c
winsup/testsuite/winsup.api/ltp/mknod01.c
winsup/testsuite/winsup.api/ltp/mmap001.c
winsup/testsuite/winsup.api/ltp/mmap02.c
winsup/testsuite/winsup.api/ltp/mmap03.c
winsup/testsuite/winsup.api/ltp/mmap04.c
winsup/testsuite/winsup.api/ltp/mmap05.c
winsup/testsuite/winsup.api/ltp/mmap06.c
winsup/testsuite/winsup.api/ltp/mmap07.c
winsup/testsuite/winsup.api/ltp/mmap08.c
winsup/testsuite/winsup.api/ltp/munmap01.c
winsup/testsuite/winsup.api/ltp/munmap02.c
winsup/testsuite/winsup.api/ltp/nice05.c
winsup/testsuite/winsup.api/ltp/open02.c
winsup/testsuite/winsup.api/ltp/open03.c
winsup/testsuite/winsup.api/ltp/pathconf01.c
winsup/testsuite/winsup.api/ltp/pause01.c
winsup/testsuite/winsup.api/ltp/pipe01.c
winsup/testsuite/winsup.api/ltp/pipe08.c
winsup/testsuite/winsup.api/ltp/pipe09.c
winsup/testsuite/winsup.api/ltp/pipe10.c
winsup/testsuite/winsup.api/ltp/pipe11.c
winsup/testsuite/winsup.api/ltp/poll01.c
winsup/testsuite/winsup.api/ltp/read01.c
winsup/testsuite/winsup.api/ltp/read04.c
winsup/testsuite/winsup.api/ltp/readdir01.c
winsup/testsuite/winsup.api/ltp/readlink01.c
winsup/testsuite/winsup.api/ltp/readlink02.c
winsup/testsuite/winsup.api/ltp/readlink03.c
winsup/testsuite/winsup.api/ltp/rename01.c
winsup/testsuite/winsup.api/ltp/rename02.c
winsup/testsuite/winsup.api/ltp/rename08.c
winsup/testsuite/winsup.api/ltp/rename10.c
winsup/testsuite/winsup.api/ltp/rmdir01.c
winsup/testsuite/winsup.api/ltp/rmdir04.c
winsup/testsuite/winsup.api/ltp/rmdir05.c
winsup/testsuite/winsup.api/ltp/sbrk01.c
winsup/testsuite/winsup.api/ltp/select01.c
winsup/testsuite/winsup.api/ltp/select02.c
winsup/testsuite/winsup.api/ltp/select03.c
winsup/testsuite/winsup.api/ltp/setgid01.c
winsup/testsuite/winsup.api/ltp/setgroups01.c
winsup/testsuite/winsup.api/ltp/setpgid01.c
winsup/testsuite/winsup.api/ltp/setregid01.c
winsup/testsuite/winsup.api/ltp/setreuid01.c
winsup/testsuite/winsup.api/ltp/setuid01.c
winsup/testsuite/winsup.api/ltp/setuid02.c
winsup/testsuite/winsup.api/ltp/signal03.c
winsup/testsuite/winsup.api/ltp/stat01.c
winsup/testsuite/winsup.api/ltp/stat02.c
winsup/testsuite/winsup.api/ltp/stat03.c
winsup/testsuite/winsup.api/ltp/stat05.c
winsup/testsuite/winsup.api/ltp/stat06.c
winsup/testsuite/winsup.api/ltp/symlink01.c
winsup/testsuite/winsup.api/ltp/symlink02.c
winsup/testsuite/winsup.api/ltp/symlink03.c
winsup/testsuite/winsup.api/ltp/symlink04.c
winsup/testsuite/winsup.api/ltp/symlink05.c
winsup/testsuite/winsup.api/ltp/sync01.c
winsup/testsuite/winsup.api/ltp/sync02.c
winsup/testsuite/winsup.api/ltp/time01.c
winsup/testsuite/winsup.api/ltp/time02.c
winsup/testsuite/winsup.api/ltp/times01.c
winsup/testsuite/winsup.api/ltp/times02.c
winsup/testsuite/winsup.api/ltp/times03.c
winsup/testsuite/winsup.api/ltp/truncate01.c
winsup/testsuite/winsup.api/ltp/truncate02.c
winsup/testsuite/winsup.api/ltp/ulimit01.c
winsup/testsuite/winsup.api/ltp/umask01.c
winsup/testsuite/winsup.api/ltp/umask02.c
winsup/testsuite/winsup.api/ltp/umask03.c
winsup/testsuite/winsup.api/ltp/uname01.c
winsup/testsuite/winsup.api/ltp/unlink05.c
winsup/testsuite/winsup.api/ltp/unlink06.c
winsup/testsuite/winsup.api/ltp/unlink07.c
winsup/testsuite/winsup.api/ltp/unlink08.c
winsup/testsuite/winsup.api/ltp/vfork01.c
winsup/testsuite/winsup.api/ltp/wait02.c
winsup/testsuite/winsup.api/ltp/wait401.c
winsup/testsuite/winsup.api/ltp/wait402.c
winsup/testsuite/winsup.api/ltp/write01.c
winsup/testsuite/winsup.api/ltp/write02.c
winsup/testsuite/winsup.api/ltp/write03.c
winsup/testsuite/winsup.api/mmaptest01.c
winsup/testsuite/winsup.api/mmaptest02.c
winsup/testsuite/winsup.api/mmaptest03.c
winsup/testsuite/winsup.api/mmaptest04.c
winsup/testsuite/winsup.api/msgtest.c
winsup/testsuite/winsup.api/nullgetcwd.c
winsup/testsuite/winsup.api/pthread/cancel1.c
winsup/testsuite/winsup.api/pthread/cancel10.c
winsup/testsuite/winsup.api/pthread/cancel11.c
winsup/testsuite/winsup.api/pthread/cancel12.c
winsup/testsuite/winsup.api/pthread/cancel2.c
winsup/testsuite/winsup.api/pthread/cancel3.c
winsup/testsuite/winsup.api/pthread/cancel4.c
winsup/testsuite/winsup.api/pthread/cancel5.c
winsup/testsuite/winsup.api/pthread/cancel6.c
winsup/testsuite/winsup.api/pthread/cancel7.c
winsup/testsuite/winsup.api/pthread/cancel8.c
winsup/testsuite/winsup.api/pthread/cancel9.c
winsup/testsuite/winsup.api/pthread/cleanup2.c
winsup/testsuite/winsup.api/pthread/cleanup3.c
winsup/testsuite/winsup.api/pthread/condvar1.c
winsup/testsuite/winsup.api/pthread/condvar2.c
winsup/testsuite/winsup.api/pthread/condvar2_1.c
winsup/testsuite/winsup.api/pthread/condvar3.c
winsup/testsuite/winsup.api/pthread/condvar3_1.c
winsup/testsuite/winsup.api/pthread/condvar3_2.c
winsup/testsuite/winsup.api/pthread/condvar3_3.c
winsup/testsuite/winsup.api/pthread/condvar4.c
winsup/testsuite/winsup.api/pthread/condvar5.c
winsup/testsuite/winsup.api/pthread/condvar6.c
winsup/testsuite/winsup.api/pthread/condvar7.c
winsup/testsuite/winsup.api/pthread/condvar8.c
winsup/testsuite/winsup.api/pthread/condvar9.c
winsup/testsuite/winsup.api/pthread/count1.c
winsup/testsuite/winsup.api/pthread/create1.c
winsup/testsuite/winsup.api/pthread/create2.c
winsup/testsuite/winsup.api/pthread/equal1.c
winsup/testsuite/winsup.api/pthread/exit1.c
winsup/testsuite/winsup.api/pthread/exit2.c
winsup/testsuite/winsup.api/pthread/exit3.c
winsup/testsuite/winsup.api/pthread/inherit1.c
winsup/testsuite/winsup.api/pthread/join0.c
winsup/testsuite/winsup.api/pthread/join1.c
winsup/testsuite/winsup.api/pthread/join2.c
winsup/testsuite/winsup.api/pthread/mainthreadexits.c
winsup/testsuite/winsup.api/pthread/mutex1.c
winsup/testsuite/winsup.api/pthread/mutex1d.c
winsup/testsuite/winsup.api/pthread/mutex1e.c
winsup/testsuite/winsup.api/pthread/mutex1n.c
winsup/testsuite/winsup.api/pthread/mutex1r.c
winsup/testsuite/winsup.api/pthread/mutex2.c
winsup/testsuite/winsup.api/pthread/mutex3.c
winsup/testsuite/winsup.api/pthread/mutex4.c
winsup/testsuite/winsup.api/pthread/mutex5.c
winsup/testsuite/winsup.api/pthread/mutex6d.c
winsup/testsuite/winsup.api/pthread/mutex6e.c
winsup/testsuite/winsup.api/pthread/mutex6n.c
winsup/testsuite/winsup.api/pthread/mutex6r.c
winsup/testsuite/winsup.api/pthread/mutex7.c
winsup/testsuite/winsup.api/pthread/mutex7d.c
winsup/testsuite/winsup.api/pthread/mutex7e.c
winsup/testsuite/winsup.api/pthread/mutex7n.c
winsup/testsuite/winsup.api/pthread/mutex7r.c
winsup/testsuite/winsup.api/pthread/mutex8e.c
winsup/testsuite/winsup.api/pthread/mutex8n.c
winsup/testsuite/winsup.api/pthread/mutex8r.c
winsup/testsuite/winsup.api/pthread/once1.c
winsup/testsuite/winsup.api/pthread/priority1.c
winsup/testsuite/winsup.api/pthread/priority2.c
winsup/testsuite/winsup.api/pthread/rwlock1.c
winsup/testsuite/winsup.api/pthread/rwlock2.c
winsup/testsuite/winsup.api/pthread/rwlock3.c
winsup/testsuite/winsup.api/pthread/rwlock4.c
winsup/testsuite/winsup.api/pthread/rwlock5.c
winsup/testsuite/winsup.api/pthread/rwlock6.c
winsup/testsuite/winsup.api/pthread/rwlock7.c
winsup/testsuite/winsup.api/pthread/self1.c
winsup/testsuite/winsup.api/pthread/self2.c
winsup/testsuite/winsup.api/pthread/test.h
winsup/testsuite/winsup.api/pthread/threadidafterfork.c
winsup/testsuite/winsup.api/pthread/tsd1.c
winsup/testsuite/winsup.api/resethand.c
winsup/testsuite/winsup.api/samples/sample-fail.c
winsup/testsuite/winsup.api/samples/sample-miscompile.c
winsup/testsuite/winsup.api/samples/sample-pass.c
winsup/testsuite/winsup.api/semtest.c
winsup/testsuite/winsup.api/shmtest.c
winsup/testsuite/winsup.api/sigchld.c
winsup/testsuite/winsup.api/signal-into-win32-api.c
winsup/testsuite/winsup.api/systemcall.c
winsup/testsuite/winsup.api/user_malloc.c
winsup/testsuite/winsup.api/waitpid.c
winsup/testsuite/winsup.api/winsup.exp
winsup/utils/COPYING.dumper
winsup/utils/ChangeLog
winsup/utils/ChangeLog-2000
winsup/utils/Makefile.in
winsup/utils/aclocal.m4
winsup/utils/bloda.cc
winsup/utils/configure
winsup/utils/configure.in
winsup/utils/cygcheck.cc
winsup/utils/cygpath.cc
winsup/utils/cygwin-console-helper.cc
winsup/utils/dump_setup.cc
winsup/utils/dumper.cc
winsup/utils/dumper.h
winsup/utils/getfacl.c
winsup/utils/kill.cc
winsup/utils/ldd.cc
winsup/utils/ldh.cc
winsup/utils/mingw
winsup/utils/mkgroup.c
winsup/utils/mkpasswd.c
winsup/utils/module_info.cc
winsup/utils/mount.cc
winsup/utils/parse_pe.cc
winsup/utils/passwd.c
winsup/utils/path.cc
winsup/utils/path.h
winsup/utils/ps.cc
winsup/utils/regtool.cc
winsup/utils/setfacl.c
winsup/utils/setmetamode.c
winsup/utils/ssp.c
winsup/utils/ssp.txt
winsup/utils/strace.cc
winsup/utils/testsuite.cc
winsup/utils/testsuite.h
winsup/utils/umount.cc
winsup/utils/utils.sgml
winsup/utils/wide_path.h
winsup/w32api/CONTRIBUTIONS
winsup/w32api/ChangeLog
winsup/w32api/Makefile.in
winsup/w32api/README.w32api
winsup/w32api/TODO
winsup/w32api/aclocal.m4
winsup/w32api/config.guess
winsup/w32api/config.sub
winsup/w32api/configure
winsup/w32api/configure.in
winsup/w32api/include/GL/gl.h
winsup/w32api/include/GL/glext.h
winsup/w32api/include/GL/glu.h
winsup/w32api/include/accctrl.h
winsup/w32api/include/aclapi.h
winsup/w32api/include/aclui.h
winsup/w32api/include/adsprop.h
winsup/w32api/include/afxres.h
winsup/w32api/include/amaudio.h
winsup/w32api/include/amvideo.h
winsup/w32api/include/audevcod.h
winsup/w32api/include/aviriff.h
winsup/w32api/include/aygshell.h
winsup/w32api/include/basetsd.h
winsup/w32api/include/basetyps.h
winsup/w32api/include/bdatypes.h
winsup/w32api/include/cderr.h
winsup/w32api/include/cguid.h
winsup/w32api/include/cmnquery.h
winsup/w32api/include/comcat.h
winsup/w32api/include/commctrl.h
winsup/w32api/include/commdlg.h
winsup/w32api/include/control.h
winsup/w32api/include/cpl.h
winsup/w32api/include/cplext.h
winsup/w32api/include/custcntl.h
winsup/w32api/include/dbt.h
winsup/w32api/include/dde.h
winsup/w32api/include/ddeml.h
winsup/w32api/include/ddk/atm.h
winsup/w32api/include/ddk/batclass.h
winsup/w32api/include/ddk/cfg.h
winsup/w32api/include/ddk/cfgmgr32.h
winsup/w32api/include/ddk/d4drvif.h
winsup/w32api/include/ddk/d4iface.h
winsup/w32api/include/ddk/ddkmapi.h
winsup/w32api/include/ddk/hidclass.h
winsup/w32api/include/ddk/hidpi.h
winsup/w32api/include/ddk/hidsdi.h
winsup/w32api/include/ddk/hidusage.h
winsup/w32api/include/ddk/kbdmou.h
winsup/w32api/include/ddk/mcd.h
winsup/w32api/include/ddk/miniport.h
winsup/w32api/include/ddk/minitape.h
winsup/w32api/include/ddk/mountdev.h
winsup/w32api/include/ddk/mountmgr.h
winsup/w32api/include/ddk/ndis.h
winsup/w32api/include/ddk/ndisguid.h
winsup/w32api/include/ddk/ndistapi.h
winsup/w32api/include/ddk/ndiswan.h
winsup/w32api/include/ddk/netevent.h
winsup/w32api/include/ddk/netpnp.h
winsup/w32api/include/ddk/newdev.h
winsup/w32api/include/ddk/ntapi.h
winsup/w32api/include/ddk/ntdd8042.h
winsup/w32api/include/ddk/ntddbeep.h
winsup/w32api/include/ddk/ntddcdrm.h
winsup/w32api/include/ddk/ntddcdvd.h
winsup/w32api/include/ddk/ntddchgr.h
winsup/w32api/include/ddk/ntdddisk.h
winsup/w32api/include/ddk/ntddk.h
winsup/w32api/include/ddk/ntddkbd.h
winsup/w32api/include/ddk/ntddmou.h
winsup/w32api/include/ddk/ntddndis.h
winsup/w32api/include/ddk/ntddpar.h
winsup/w32api/include/ddk/ntddpcm.h
winsup/w32api/include/ddk/ntddscsi.h
winsup/w32api/include/ddk/ntddser.h
winsup/w32api/include/ddk/ntddstor.h
winsup/w32api/include/ddk/ntddtape.h
winsup/w32api/include/ddk/ntddtdi.h
winsup/w32api/include/ddk/ntddvdeo.h
winsup/w32api/include/ddk/ntddvol.h
winsup/w32api/include/ddk/ntifs.h
winsup/w32api/include/ddk/ntpoapi.h
winsup/w32api/include/ddk/ntstatus.h
winsup/w32api/include/ddk/parallel.h
winsup/w32api/include/ddk/pfhook.h
winsup/w32api/include/ddk/poclass.h
winsup/w32api/include/ddk/scsi.h
winsup/w32api/include/ddk/scsiscan.h
winsup/w32api/include/ddk/scsiwmi.h
winsup/w32api/include/ddk/smbus.h
winsup/w32api/include/ddk/srb.h
winsup/w32api/include/ddk/storport.h
winsup/w32api/include/ddk/tdi.h
winsup/w32api/include/ddk/tdiinfo.h
winsup/w32api/include/ddk/tdikrnl.h
winsup/w32api/include/ddk/tdistat.h
winsup/w32api/include/ddk/tvout.h
winsup/w32api/include/ddk/upssvc.h
winsup/w32api/include/ddk/usb.h
winsup/w32api/include/ddk/usb100.h
winsup/w32api/include/ddk/usbcamdi.h
winsup/w32api/include/ddk/usbdi.h
winsup/w32api/include/ddk/usbioctl.h
winsup/w32api/include/ddk/usbiodef.h
winsup/w32api/include/ddk/usbscan.h
winsup/w32api/include/ddk/usbuser.h
winsup/w32api/include/ddk/video.h
winsup/w32api/include/ddk/videoagp.h
winsup/w32api/include/ddk/win2k.h
winsup/w32api/include/ddk/winddi.h
winsup/w32api/include/ddk/winddk.h
winsup/w32api/include/ddk/winnt4.h
winsup/w32api/include/ddk/winxp.h
winsup/w32api/include/ddk/ws2san.h
winsup/w32api/include/ddk/xfilter.h
winsup/w32api/include/devguid.h
winsup/w32api/include/dhcpcsdk.h
winsup/w32api/include/directx/d3d9.h
winsup/w32api/include/directx/d3d9caps.h
winsup/w32api/include/directx/d3d9types.h
winsup/w32api/include/directx/dxerr8.h
winsup/w32api/include/directx/dxerr9.h
winsup/w32api/include/dlgs.h
winsup/w32api/include/docobj.h
winsup/w32api/include/dsadmin.h
winsup/w32api/include/dsclient.h
winsup/w32api/include/dsgetdc.h
winsup/w32api/include/dshow.h
winsup/w32api/include/dsquery.h
winsup/w32api/include/dsrole.h
winsup/w32api/include/dvdevcod.h
winsup/w32api/include/dvdmedia.h
winsup/w32api/include/edevdefs.h
winsup/w32api/include/errorrep.h
winsup/w32api/include/errors.h
winsup/w32api/include/evcode.h
winsup/w32api/include/exdisp.h
winsup/w32api/include/exdispid.h
winsup/w32api/include/fltdefs.h
winsup/w32api/include/httpext.h
winsup/w32api/include/icm.h
winsup/w32api/include/idispids.h
winsup/w32api/include/il21dec.h
winsup/w32api/include/imagehlp.h
winsup/w32api/include/imm.h
winsup/w32api/include/initguid.h
winsup/w32api/include/intshcut.h
winsup/w32api/include/ipexport.h
winsup/w32api/include/iphlpapi.h
winsup/w32api/include/ipifcons.h
winsup/w32api/include/ipinfoid.h
winsup/w32api/include/iprtrmib.h
winsup/w32api/include/iptypes.h
winsup/w32api/include/ipxconst.h
winsup/w32api/include/ipxrtdef.h
winsup/w32api/include/ipxtfflt.h
winsup/w32api/include/isguids.h
winsup/w32api/include/ks.h
winsup/w32api/include/ksmedia.h
winsup/w32api/include/largeint.h
winsup/w32api/include/lm.h
winsup/w32api/include/lmaccess.h
winsup/w32api/include/lmalert.h
winsup/w32api/include/lmapibuf.h
winsup/w32api/include/lmat.h
winsup/w32api/include/lmaudit.h
winsup/w32api/include/lmbrowsr.h
winsup/w32api/include/lmchdev.h
winsup/w32api/include/lmconfig.h
winsup/w32api/include/lmcons.h
winsup/w32api/include/lmerr.h
winsup/w32api/include/lmerrlog.h
winsup/w32api/include/lmmsg.h
winsup/w32api/include/lmremutl.h
winsup/w32api/include/lmrepl.h
winsup/w32api/include/lmserver.h
winsup/w32api/include/lmshare.h
winsup/w32api/include/lmsname.h
winsup/w32api/include/lmstats.h
winsup/w32api/include/lmsvc.h
winsup/w32api/include/lmuse.h
winsup/w32api/include/lmuseflg.h
winsup/w32api/include/lmwksta.h
winsup/w32api/include/lzexpand.h
winsup/w32api/include/mapi.h
winsup/w32api/include/mciavi.h
winsup/w32api/include/mcx.h
winsup/w32api/include/mgm.h
winsup/w32api/include/mgmtapi.h
winsup/w32api/include/mlang.h
winsup/w32api/include/mmreg.h
winsup/w32api/include/mmsystem.h
winsup/w32api/include/mpegtype.h
winsup/w32api/include/mprapi.h
winsup/w32api/include/mq.h
winsup/w32api/include/msacm.h
winsup/w32api/include/mshtml.h
winsup/w32api/include/mswsock.h
winsup/w32api/include/nb30.h
winsup/w32api/include/nddeapi.h
winsup/w32api/include/nspapi.h
winsup/w32api/include/ntdef.h
winsup/w32api/include/ntdll.h
winsup/w32api/include/ntdsapi.h
winsup/w32api/include/ntdsbcli.h
winsup/w32api/include/ntldap.h
winsup/w32api/include/ntsecapi.h
winsup/w32api/include/ntsecpkg.h
winsup/w32api/include/oaidl.h
winsup/w32api/include/objbase.h
winsup/w32api/include/objfwd.h
winsup/w32api/include/objidl.h
winsup/w32api/include/objsafe.h
winsup/w32api/include/objsel.h
winsup/w32api/include/ocidl.h
winsup/w32api/include/odbcinst.h
winsup/w32api/include/ole.h
winsup/w32api/include/ole2.h
winsup/w32api/include/ole2ver.h
winsup/w32api/include/oleacc.h
winsup/w32api/include/oleauto.h
winsup/w32api/include/olectl.h
winsup/w32api/include/olectlid.h
winsup/w32api/include/oledlg.h
winsup/w32api/include/oleidl.h
winsup/w32api/include/pbt.h
winsup/w32api/include/poppack.h
winsup/w32api/include/powrprof.h
winsup/w32api/include/prsht.h
winsup/w32api/include/psapi.h
winsup/w32api/include/pshpack1.h
winsup/w32api/include/pshpack2.h
winsup/w32api/include/pshpack4.h
winsup/w32api/include/pshpack8.h
winsup/w32api/include/qedit.h
winsup/w32api/include/rapi.h
winsup/w32api/include/ras.h
winsup/w32api/include/rasdlg.h
winsup/w32api/include/raserror.h
winsup/w32api/include/rassapi.h
winsup/w32api/include/reason.h
winsup/w32api/include/regstr.h
winsup/w32api/include/richedit.h
winsup/w32api/include/richole.h
winsup/w32api/include/routprot.h
winsup/w32api/include/rpc.h
winsup/w32api/include/rpcdce.h
winsup/w32api/include/rpcdce2.h
winsup/w32api/include/rpcdcep.h
winsup/w32api/include/rpcndr.h
winsup/w32api/include/rpcnsi.h
winsup/w32api/include/rpcnsip.h
winsup/w32api/include/rpcnterr.h
winsup/w32api/include/rpcproxy.h
winsup/w32api/include/rtutils.h
winsup/w32api/include/schannel.h
winsup/w32api/include/schnlsp.h
winsup/w32api/include/scrnsave.h
winsup/w32api/include/sddl.h
winsup/w32api/include/secext.h
winsup/w32api/include/security.h
winsup/w32api/include/servprov.h
winsup/w32api/include/setupapi.h
winsup/w32api/include/shellapi.h
winsup/w32api/include/shldisp.h
winsup/w32api/include/shlguid.h
winsup/w32api/include/shlobj.h
winsup/w32api/include/shlwapi.h
winsup/w32api/include/snmp.h
winsup/w32api/include/specstrings.h
winsup/w32api/include/sql.h
winsup/w32api/include/sqlext.h
winsup/w32api/include/sqltypes.h
winsup/w32api/include/sqlucode.h
winsup/w32api/include/sspi.h
winsup/w32api/include/stm.h
winsup/w32api/include/strmif.h
winsup/w32api/include/subauth.h
winsup/w32api/include/svcguid.h
winsup/w32api/include/tlhelp32.h
winsup/w32api/include/tmschema.h
winsup/w32api/include/unknwn.h
winsup/w32api/include/userenv.h
winsup/w32api/include/usp10.h
winsup/w32api/include/uxtheme.h
winsup/w32api/include/vfw.h
winsup/w32api/include/vidcap.h
winsup/w32api/include/vmr9.h
winsup/w32api/include/vptype.h
winsup/w32api/include/w32api.h
winsup/w32api/include/winable.h
winsup/w32api/include/winbase.h
winsup/w32api/include/winber.h
winsup/w32api/include/wincon.h
winsup/w32api/include/wincrypt.h
winsup/w32api/include/windef.h
winsup/w32api/include/windns.h
winsup/w32api/include/windows.h
winsup/w32api/include/windowsx.h
winsup/w32api/include/winerror.h
winsup/w32api/include/wingdi.h
winsup/w32api/include/wininet.h
winsup/w32api/include/winioctl.h
winsup/w32api/include/winldap.h
winsup/w32api/include/winnetwk.h
winsup/w32api/include/winnls.h
winsup/w32api/include/winnt.h
winsup/w32api/include/winperf.h
winsup/w32api/include/winreg.h
winsup/w32api/include/winresrc.h
winsup/w32api/include/winsnmp.h
winsup/w32api/include/winsock.h
winsup/w32api/include/winsock2.h
winsup/w32api/include/winspool.h
winsup/w32api/include/winsvc.h
winsup/w32api/include/winuser.h
winsup/w32api/include/winver.h
winsup/w32api/include/ws2spi.h
winsup/w32api/include/ws2tcpip.h
winsup/w32api/include/wsahelp.h
winsup/w32api/include/wsipx.h
winsup/w32api/include/wsnetbs.h
winsup/w32api/include/wtsapi32.h
winsup/w32api/include/wtypes.h
winsup/w32api/include/xprtdefs.h
winsup/w32api/include/zmouse.h
winsup/w32api/install-sh
winsup/w32api/lib/Makefile.in
winsup/w32api/lib/aclui.def
winsup/w32api/lib/advapi32.def
winsup/w32api/lib/ativscp-uuid.c
winsup/w32api/lib/avicap32.def
winsup/w32api/lib/avifil32.def
winsup/w32api/lib/bthprops.def
winsup/w32api/lib/cap.def
winsup/w32api/lib/cguid-uuid.c
winsup/w32api/lib/comcat-uuid.c
winsup/w32api/lib/comctl32.def
winsup/w32api/lib/comdlg32.def
winsup/w32api/lib/crypt32.def
winsup/w32api/lib/ctl3d32.def
winsup/w32api/lib/ddk/Makefile.in
winsup/w32api/lib/ddk/apcups.def
winsup/w32api/lib/ddk/cfgmgr32.def
winsup/w32api/lib/ddk/dxapi.def
winsup/w32api/lib/ddk/hal.def
winsup/w32api/lib/ddk/hid.def
winsup/w32api/lib/ddk/hidparse.def
winsup/w32api/lib/ddk/mcd.def
winsup/w32api/lib/ddk/ndis.def
winsup/w32api/lib/ddk/newdev.def
winsup/w32api/lib/ddk/ntoskrnl.def
winsup/w32api/lib/ddk/scsiport.def
winsup/w32api/lib/ddk/tdi.def
winsup/w32api/lib/ddk/usbcamd.def
winsup/w32api/lib/ddk/usbcamd2.def
winsup/w32api/lib/ddk/videoprt.def
winsup/w32api/lib/ddk/win32k.def
winsup/w32api/lib/devguid.c
winsup/w32api/lib/dhcpcsvc.def
winsup/w32api/lib/directx/Makefile.in
winsup/w32api/lib/directx/d3d8.def
winsup/w32api/lib/directx/d3d9.def
winsup/w32api/lib/directx/d3dim.def
winsup/w32api/lib/directx/d3drm.def
winsup/w32api/lib/directx/d3dx8d.def
winsup/w32api/lib/directx/d3dx9d.def
winsup/w32api/lib/directx/d3dxof.def
winsup/w32api/lib/directx/ddraw.def
winsup/w32api/lib/directx/dinput.def
winsup/w32api/lib/directx/dinput8.def
winsup/w32api/lib/directx/dinput_joy.c
winsup/w32api/lib/directx/dinput_joy2.c
winsup/w32api/lib/directx/dinput_kbd.c
winsup/w32api/lib/directx/dinput_mouse.c
winsup/w32api/lib/directx/dinput_mouse2.c
winsup/w32api/lib/directx/dinput_private.h
winsup/w32api/lib/directx/dmoguids.c
winsup/w32api/lib/directx/dplayx.def
winsup/w32api/lib/directx/dpnaddr.def
winsup/w32api/lib/directx/dpnet.def
winsup/w32api/lib/directx/dpnlobby.def
winsup/w32api/lib/directx/dpvoice.def
winsup/w32api/lib/directx/dsetup.def
winsup/w32api/lib/directx/dsound.def
winsup/w32api/lib/directx/dxerr.c
winsup/w32api/lib/directx/dxerr8.c
winsup/w32api/lib/directx/dxerr8w.c
winsup/w32api/lib/directx/dxerr9.c
winsup/w32api/lib/directx/dxerr9w.c
winsup/w32api/lib/directx/dxguid.c
winsup/w32api/lib/directx/ksproxy.def
winsup/w32api/lib/directx/ksuser.c
winsup/w32api/lib/directx/ksuser.def
winsup/w32api/lib/directx/msdmo.def
winsup/w32api/lib/directx/strmiids.c
winsup/w32api/lib/directx/test.c
winsup/w32api/lib/dlcapi.def
winsup/w32api/lib/dnsapi.def
winsup/w32api/lib/docobj-uuid.c
winsup/w32api/lib/exdisp-uuid.c
winsup/w32api/lib/extras-uuid.c
winsup/w32api/lib/faultrep.def
winsup/w32api/lib/gdi32.def
winsup/w32api/lib/glaux.def
winsup/w32api/lib/glu32.def
winsup/w32api/lib/hlguids-uuid.c
winsup/w32api/lib/hlink-uuid.c
winsup/w32api/lib/icmui.def
winsup/w32api/lib/igmpagnt.def
winsup/w32api/lib/imagehlp.def
winsup/w32api/lib/imm32.def
winsup/w32api/lib/iphlpapi.def
winsup/w32api/lib/kernel32.def
winsup/w32api/lib/largeint.c
winsup/w32api/lib/lz32.def
winsup/w32api/lib/mapi32.def
winsup/w32api/lib/mfcuia32.def
winsup/w32api/lib/mgmtapi.def
winsup/w32api/lib/mlang-uuid.c
winsup/w32api/lib/mpr.def
winsup/w32api/lib/mprapi.def
winsup/w32api/lib/mqrt.def
winsup/w32api/lib/msacm32.def
winsup/w32api/lib/mscms.def
winsup/w32api/lib/mshtml-uuid.c
winsup/w32api/lib/msimg32.def
winsup/w32api/lib/msvcp60.def
winsup/w32api/lib/msvfw32.def
winsup/w32api/lib/mswsock.def
winsup/w32api/lib/msxml-uuid.c
winsup/w32api/lib/nddeapi.def
winsup/w32api/lib/netapi32.def
winsup/w32api/lib/ntdll.def
winsup/w32api/lib/oaidl-uuid.c
winsup/w32api/lib/objidl-uuid.c
winsup/w32api/lib/objsafe-uuid.c
winsup/w32api/lib/ocidl-uuid.c
winsup/w32api/lib/odbc32.def
winsup/w32api/lib/odbccp32.def
winsup/w32api/lib/ole32.def
winsup/w32api/lib/oleacc-uuid.c
winsup/w32api/lib/oleacc.def
winsup/w32api/lib/oleaut32.def
winsup/w32api/lib/olecli32.def
winsup/w32api/lib/olectlid-uuid.c
winsup/w32api/lib/oledlg.def
winsup/w32api/lib/oleidl-uuid.c
winsup/w32api/lib/olepro32.def
winsup/w32api/lib/olesvr32.def
winsup/w32api/lib/opengl32.def
winsup/w32api/lib/penwin32.def
winsup/w32api/lib/pkpd32.def
winsup/w32api/lib/power-uuid.c
winsup/w32api/lib/powrprof.def
winsup/w32api/lib/psapi.def
winsup/w32api/lib/quartz.def
winsup/w32api/lib/rapi.def
winsup/w32api/lib/rasapi32.def
winsup/w32api/lib/rasdlg.def
winsup/w32api/lib/res.rc
winsup/w32api/lib/rpcdce4.def
winsup/w32api/lib/rpcns4.def
winsup/w32api/lib/rpcrt4.def
winsup/w32api/lib/rtm.def
winsup/w32api/lib/rtutils.def
winsup/w32api/lib/scrnsave.c
winsup/w32api/lib/secur32.def
winsup/w32api/lib/servprov-uuid.c
winsup/w32api/lib/setupapi.def
winsup/w32api/lib/shell32.c
winsup/w32api/lib/shell32.def
winsup/w32api/lib/shfolder.def
winsup/w32api/lib/shlwapi.def
winsup/w32api/lib/snmpapi.def
winsup/w32api/lib/svrapi.def
winsup/w32api/lib/tapi32.def
winsup/w32api/lib/test.c
winsup/w32api/lib/th32.def
winsup/w32api/lib/thunk32.def
winsup/w32api/lib/unknwn-uuid.c
winsup/w32api/lib/url.def
winsup/w32api/lib/urlmon-uuid.c
winsup/w32api/lib/user32.def
winsup/w32api/lib/userenv.def
winsup/w32api/lib/usp10.def
winsup/w32api/lib/uxtheme.def
winsup/w32api/lib/vdmdbg.def
winsup/w32api/lib/version.def
winsup/w32api/lib/vfw32.mri
winsup/w32api/lib/win32spl.def
winsup/w32api/lib/wininet.def
winsup/w32api/lib/winmm.def
winsup/w32api/lib/winspool.def
winsup/w32api/lib/winstrm.def
winsup/w32api/lib/wldap32.def
winsup/w32api/lib/wow32.def
winsup/w32api/lib/ws2_32.c
winsup/w32api/lib/ws2_32.def
winsup/w32api/lib/wsnmp32.def
winsup/w32api/lib/wsock32.def
winsup/w32api/lib/wst.def
winsup/w32api/lib/wtsapi32.def
Diffstat (limited to 'newlib/libc/stdlib')
118 files changed, 0 insertions, 24186 deletions
diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile.am deleted file mode 100644 index 38120e6e2..000000000 --- a/newlib/libc/stdlib/Makefile.am +++ /dev/null @@ -1,297 +0,0 @@ -## Process this file with automake to generate Makefile.in - -AUTOMAKE_OPTIONS = cygnus - -INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) - -GENERAL_SOURCES = \ - __adjust.c \ - __atexit.c \ - __call_atexit.c \ - __exp10.c \ - __ten_mu.c \ - _Exit.c \ - abort.c \ - abs.c \ - assert.c \ - atexit.c \ - atof.c \ - atoff.c \ - atoi.c \ - atol.c \ - calloc.c \ - div.c \ - dtoa.c \ - dtoastub.c \ - environ.c \ - envlock.c \ - eprintf.c \ - exit.c \ - gdtoa-gethex.c \ - gdtoa-hexnan.c \ - getenv.c \ - getenv_r.c \ - labs.c \ - ldiv.c \ - ldtoa.c \ - malloc.c \ - mblen.c \ - mblen_r.c \ - mbstowcs.c \ - mbstowcs_r.c \ - mbtowc.c \ - mbtowc_r.c \ - mlock.c \ - mprec.c \ - mstats.c \ - rand.c \ - rand_r.c \ - realloc.c \ - reallocf.c \ - sb_charsets.c \ - strtod.c \ - strtol.c \ - strtoul.c \ - wcstod.c \ - wcstol.c \ - wcstoul.c \ - wcstombs.c \ - wcstombs_r.c \ - wctomb.c \ - wctomb_r.c - -if HAVE_LONG_DOUBLE -GENERAL_SOURCES += \ - strtold.c \ - wcstold.c -endif # HAVE_LONG_DOUBLE - -EXTENDED_SOURCES = \ - cxa_atexit.c \ - cxa_finalize.c \ - drand48.c \ - ecvtbuf.c \ - efgcvt.c \ - erand48.c \ - jrand48.c \ - lcong48.c \ - lrand48.c \ - mrand48.c \ - msize.c \ - mtrim.c \ - nrand48.c \ - rand48.c \ - seed48.c \ - srand48.c \ - strtoll.c \ - strtoll_r.c \ - strtoull.c \ - strtoull_r.c \ - wcstoll.c \ - wcstoll_r.c \ - wcstoull.c \ - wcstoull_r.c \ - atoll.c \ - llabs.c \ - lldiv.c - -ELIX_2_SOURCES = \ - a64l.c \ - btowc.c \ - getopt.c \ - getsubopt.c \ - l64a.c \ - malign.c \ - mbrlen.c \ - mbrtowc.c \ - mbsinit.c \ - mbsnrtowcs.c \ - mbsrtowcs.c \ - on_exit.c \ - valloc.c \ - wcrtomb.c \ - wcsnrtombs.c \ - wcsrtombs.c \ - wctob.c - -ELIX_2_OBJS = \ - $(lpfx)malignr.$(oext) \ - $(lpfx)malloptr.$(oext) \ - $(lpfx)pvallocr.$(oext) \ - $(lpfx)vallocr.$(oext) - -ELIX_3_SOURCES = \ - putenv.c \ - putenv_r.c \ - setenv.c \ - setenv_r.c - -ELIX_4_SOURCES = \ - system.c - -if ELIX_LEVEL_1 -ELIX_SOURCES = -ELIX_OBJS = -else -if ELIX_LEVEL_2 -ELIX_SOURCES = $(ELIX_2_SOURCES) -ELIX_OBJS = $(ELIX_2_OBJS) -else -if ELIX_LEVEL_3 -ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) -ELIX_OBJS = $(ELIX_2_OBJS) -else -ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) $(ELIX_4_SOURCES) -ELIX_OBJS = $(ELIX_2_OBJS) -endif -endif -endif - -# Because of how libtool moves objects around, mallocr must be built last. -LIBADD_OBJS = $(lpfx)freer.$(oext) $(lpfx)reallocr.$(oext) \ - $(lpfx)callocr.$(oext) $(lpfx)cfreer.$(oext) \ - $(lpfx)mallinfor.$(oext) $(lpfx)mallstatsr.$(oext) \ - $(lpfx)msizer.$(oext) $(lpfx)mallocr.$(oext) - -libstdlib_la_LDFLAGS = -Xcompiler -nostdlib - -if USE_LIBTOOL -noinst_LTLIBRARIES = libstdlib.la -libstdlib_la_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES) -libstdlib_la_LIBADD = $(LIBADD_OBJS) $(ELIX_OBJS) -libstdlib_la_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS) -LIB_COMPILE = $(LTCOMPILE) -noinst_DATA = objectlist.awk.in -else -noinst_LIBRARIES = lib.a -lib_a_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES) -lib_a_LIBADD = $(LIBADD_OBJS) $(ELIX_OBJS) -lib_a_CFLAGS = $(AM_CFLAGS) -lib_a_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS) -LIB_COMPILE = $(COMPILE) -noinst_DATA = -endif # USE_LIBTOOL - -include $(srcdir)/../../Makefile.shared - -MALLOC_COMPILE = $(LIB_COMPILE) -DINTERNAL_NEWLIB - -$(lpfx)mallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)freer.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_FREE -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)reallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_REALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)callocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_CALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)cfreer.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_CFREE -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)malignr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MEMALIGN -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)vallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_VALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)pvallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_PVALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)mallinfor.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLINFO -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)mallstatsr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOC_STATS -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)msizer.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOC_USABLE_SIZE -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)malloptr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOPT -c $(srcdir)/mallocr.c -o $@ - -CHEWOUT_FILES= \ - _Exit.def \ - a64l.def \ - abort.def \ - abs.def \ - assert.def \ - atexit.def \ - atof.def \ - atoi.def \ - atoll.def \ - calloc.def \ - div.def \ - ecvtbuf.def \ - efgcvt.def \ - envlock.def \ - exit.def \ - getenv.def \ - labs.def \ - ldiv.def \ - llabs.def \ - lldiv.def \ - malloc.def \ - mallocr.def \ - mblen.def \ - mbsnrtowcs.def \ - mbstowcs.def \ - mbtowc.def \ - mlock.def \ - mstats.def \ - on_exit.def \ - rand.def \ - rand48.def \ - strtod.def \ - strtol.def \ - strtoll.def \ - strtoul.def \ - strtoull.def \ - wcsnrtombs.def \ - wcstod.def \ - wcstol.def \ - wcstoll.def \ - wcstoul.def \ - wcstoull.def \ - system.def \ - wcstombs.def \ - wctomb.def - -SUFFIXES = .def - -CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str - -.c.def: - $(CHEW) < $< > $*.def 2> $*.ref - touch stmp-def - -TARGETDOC = ../tmp.texi - -doc: $(CHEWOUT_FILES) - cat $(srcdir)/stdlib.tex >> $(TARGETDOC) - -CLEANFILES = $(CHEWOUT_FILES) *.ref - -$(lpfx)dtoa.$(oext): dtoa.c mprec.h -$(lpfx)ldtoa.$(oext): ldtoa.c mprec.h -$(lpfx)ecvtbuf.$(oext): ecvtbuf.c mprec.h -$(lpfx)mbtowc_r.$(oext): mbtowc_r.c mbctype.h - $(LIB_COMPILE) -c -fshort-enums $(srcdir)/mbtowc_r.c -o $@ - -$(lpfx)mprec.$(oext): mprec.c mprec.h -$(lpfx)strtod.$(oext): strtod.c mprec.h -$(lpfx)gdtoa-gethex.$(oext): gdtoa-gethex.c mprec.h -$(lpfx)gdtoa-hexnan.$(oext): gdtoa-hexnan.c mprec.h -$(lpfx)wctomb_r.$(oext): wctomb_r.c mbctype.h -$(lpfx)drand48.$(oext): drand48.c rand48.h -$(lpfx)erand48.$(oext): erand48.c rand48.h -$(lpfx)jrand48.$(oext): jrand48.c rand48.h -$(lpfx)lcong48.$(oext): lcong48.c rand48.h -$(lpfx)lrand48.$(oext): lrand48.c rand48.h -$(lpfx)mrand48.$(oext): mrand48.c rand48.h -$(lpfx)nrand48.$(oext): nrand48.c rand48.h -$(lpfx)rand48.$(oext): rand48.c rand48.h -$(lpfx)seed48.$(oext): seed48.c rand48.h -$(lpfx)srand48.$(oext): srand48.c rand48.h diff --git a/newlib/libc/stdlib/Makefile.in b/newlib/libc/stdlib/Makefile.in deleted file mode 100644 index a47970950..000000000 --- a/newlib/libc/stdlib/Makefile.in +++ /dev/null @@ -1,1433 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_LONG_DOUBLE_TRUE@am__append_1 = \ -@HAVE_LONG_DOUBLE_TRUE@ strtold.c \ -@HAVE_LONG_DOUBLE_TRUE@ wcstold.c - -DIST_COMMON = $(srcdir)/../../Makefile.shared $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am -subdir = stdlib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \ - $(top_srcdir)/../../ltoptions.m4 \ - $(top_srcdir)/../../ltsugar.m4 \ - $(top_srcdir)/../../ltversion.m4 \ - $(top_srcdir)/../../lt~obsolete.m4 \ - $(top_srcdir)/../acinclude.m4 $(top_srcdir)/../confsubdir.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -lib_a_AR = $(AR) $(ARFLAGS) -am__DEPENDENCIES_1 = $(lpfx)freer.$(oext) $(lpfx)reallocr.$(oext) \ - $(lpfx)callocr.$(oext) $(lpfx)cfreer.$(oext) \ - $(lpfx)mallinfor.$(oext) $(lpfx)mallstatsr.$(oext) \ - $(lpfx)msizer.$(oext) $(lpfx)mallocr.$(oext) -am__DEPENDENCIES_2 = $(lpfx)malignr.$(oext) $(lpfx)malloptr.$(oext) \ - $(lpfx)pvallocr.$(oext) $(lpfx)vallocr.$(oext) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@am__DEPENDENCIES_3 = \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ $(am__DEPENDENCIES_2) -@HAVE_LONG_DOUBLE_TRUE@am__objects_1 = lib_a-strtold.$(OBJEXT) \ -@HAVE_LONG_DOUBLE_TRUE@ lib_a-wcstold.$(OBJEXT) -am__objects_2 = lib_a-__adjust.$(OBJEXT) lib_a-__atexit.$(OBJEXT) \ - lib_a-__call_atexit.$(OBJEXT) lib_a-__exp10.$(OBJEXT) \ - lib_a-__ten_mu.$(OBJEXT) lib_a-_Exit.$(OBJEXT) \ - lib_a-abort.$(OBJEXT) lib_a-abs.$(OBJEXT) \ - lib_a-assert.$(OBJEXT) lib_a-atexit.$(OBJEXT) \ - lib_a-atof.$(OBJEXT) lib_a-atoff.$(OBJEXT) \ - lib_a-atoi.$(OBJEXT) lib_a-atol.$(OBJEXT) \ - lib_a-calloc.$(OBJEXT) lib_a-div.$(OBJEXT) \ - lib_a-dtoa.$(OBJEXT) lib_a-dtoastub.$(OBJEXT) \ - lib_a-environ.$(OBJEXT) lib_a-envlock.$(OBJEXT) \ - lib_a-eprintf.$(OBJEXT) lib_a-exit.$(OBJEXT) \ - lib_a-gdtoa-gethex.$(OBJEXT) lib_a-gdtoa-hexnan.$(OBJEXT) \ - lib_a-getenv.$(OBJEXT) lib_a-getenv_r.$(OBJEXT) \ - lib_a-labs.$(OBJEXT) lib_a-ldiv.$(OBJEXT) \ - lib_a-ldtoa.$(OBJEXT) lib_a-malloc.$(OBJEXT) \ - lib_a-mblen.$(OBJEXT) lib_a-mblen_r.$(OBJEXT) \ - lib_a-mbstowcs.$(OBJEXT) lib_a-mbstowcs_r.$(OBJEXT) \ - lib_a-mbtowc.$(OBJEXT) lib_a-mbtowc_r.$(OBJEXT) \ - lib_a-mlock.$(OBJEXT) lib_a-mprec.$(OBJEXT) \ - lib_a-mstats.$(OBJEXT) lib_a-rand.$(OBJEXT) \ - lib_a-rand_r.$(OBJEXT) lib_a-realloc.$(OBJEXT) \ - lib_a-reallocf.$(OBJEXT) lib_a-sb_charsets.$(OBJEXT) \ - lib_a-strtod.$(OBJEXT) lib_a-strtol.$(OBJEXT) \ - lib_a-strtoul.$(OBJEXT) lib_a-wcstod.$(OBJEXT) \ - lib_a-wcstol.$(OBJEXT) lib_a-wcstoul.$(OBJEXT) \ - lib_a-wcstombs.$(OBJEXT) lib_a-wcstombs_r.$(OBJEXT) \ - lib_a-wctomb.$(OBJEXT) lib_a-wctomb_r.$(OBJEXT) \ - $(am__objects_1) -am__objects_3 = lib_a-cxa_atexit.$(OBJEXT) \ - lib_a-cxa_finalize.$(OBJEXT) lib_a-drand48.$(OBJEXT) \ - lib_a-ecvtbuf.$(OBJEXT) lib_a-efgcvt.$(OBJEXT) \ - lib_a-erand48.$(OBJEXT) lib_a-jrand48.$(OBJEXT) \ - lib_a-lcong48.$(OBJEXT) lib_a-lrand48.$(OBJEXT) \ - lib_a-mrand48.$(OBJEXT) lib_a-msize.$(OBJEXT) \ - lib_a-mtrim.$(OBJEXT) lib_a-nrand48.$(OBJEXT) \ - lib_a-rand48.$(OBJEXT) lib_a-seed48.$(OBJEXT) \ - lib_a-srand48.$(OBJEXT) lib_a-strtoll.$(OBJEXT) \ - lib_a-strtoll_r.$(OBJEXT) lib_a-strtoull.$(OBJEXT) \ - lib_a-strtoull_r.$(OBJEXT) lib_a-wcstoll.$(OBJEXT) \ - lib_a-wcstoll_r.$(OBJEXT) lib_a-wcstoull.$(OBJEXT) \ - lib_a-wcstoull_r.$(OBJEXT) lib_a-atoll.$(OBJEXT) \ - lib_a-llabs.$(OBJEXT) lib_a-lldiv.$(OBJEXT) -am__objects_4 = lib_a-a64l.$(OBJEXT) lib_a-btowc.$(OBJEXT) \ - lib_a-getopt.$(OBJEXT) lib_a-getsubopt.$(OBJEXT) \ - lib_a-l64a.$(OBJEXT) lib_a-malign.$(OBJEXT) \ - lib_a-mbrlen.$(OBJEXT) lib_a-mbrtowc.$(OBJEXT) \ - lib_a-mbsinit.$(OBJEXT) lib_a-mbsnrtowcs.$(OBJEXT) \ - lib_a-mbsrtowcs.$(OBJEXT) lib_a-on_exit.$(OBJEXT) \ - lib_a-valloc.$(OBJEXT) lib_a-wcrtomb.$(OBJEXT) \ - lib_a-wcsnrtombs.$(OBJEXT) lib_a-wcsrtombs.$(OBJEXT) \ - lib_a-wctob.$(OBJEXT) -am__objects_5 = lib_a-putenv.$(OBJEXT) lib_a-putenv_r.$(OBJEXT) \ - lib_a-setenv.$(OBJEXT) lib_a-setenv_r.$(OBJEXT) -am__objects_6 = lib_a-system.$(OBJEXT) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_7 = $(am__objects_4) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_5) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_6) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@am__objects_7 = $(am__objects_4) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ $(am__objects_5) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@am__objects_7 = \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ $(am__objects_4) -@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_2) \ -@USE_LIBTOOL_FALSE@ $(am__objects_3) $(am__objects_7) -lib_a_OBJECTS = $(am_lib_a_OBJECTS) -LTLIBRARIES = $(noinst_LTLIBRARIES) -@HAVE_LONG_DOUBLE_TRUE@am__objects_8 = strtold.lo wcstold.lo -am__objects_9 = __adjust.lo __atexit.lo __call_atexit.lo __exp10.lo \ - __ten_mu.lo _Exit.lo abort.lo abs.lo assert.lo atexit.lo \ - atof.lo atoff.lo atoi.lo atol.lo calloc.lo div.lo dtoa.lo \ - dtoastub.lo environ.lo envlock.lo eprintf.lo exit.lo \ - gdtoa-gethex.lo gdtoa-hexnan.lo getenv.lo getenv_r.lo labs.lo \ - ldiv.lo ldtoa.lo malloc.lo mblen.lo mblen_r.lo mbstowcs.lo \ - mbstowcs_r.lo mbtowc.lo mbtowc_r.lo mlock.lo mprec.lo \ - mstats.lo rand.lo rand_r.lo realloc.lo reallocf.lo \ - sb_charsets.lo strtod.lo strtol.lo strtoul.lo wcstod.lo \ - wcstol.lo wcstoul.lo wcstombs.lo wcstombs_r.lo wctomb.lo \ - wctomb_r.lo $(am__objects_8) -am__objects_10 = cxa_atexit.lo cxa_finalize.lo drand48.lo ecvtbuf.lo \ - efgcvt.lo erand48.lo jrand48.lo lcong48.lo lrand48.lo \ - mrand48.lo msize.lo mtrim.lo nrand48.lo rand48.lo seed48.lo \ - srand48.lo strtoll.lo strtoll_r.lo strtoull.lo strtoull_r.lo \ - wcstoll.lo wcstoll_r.lo wcstoull.lo wcstoull_r.lo atoll.lo \ - llabs.lo lldiv.lo -am__objects_11 = a64l.lo btowc.lo getopt.lo getsubopt.lo l64a.lo \ - malign.lo mbrlen.lo mbrtowc.lo mbsinit.lo mbsnrtowcs.lo \ - mbsrtowcs.lo on_exit.lo valloc.lo wcrtomb.lo wcsnrtombs.lo \ - wcsrtombs.lo wctob.lo -am__objects_12 = putenv.lo putenv_r.lo setenv.lo setenv_r.lo -am__objects_13 = system.lo -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_14 = $(am__objects_11) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_12) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_13) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@am__objects_14 = $(am__objects_11) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ $(am__objects_12) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@am__objects_14 = \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ $(am__objects_11) -@USE_LIBTOOL_TRUE@am_libstdlib_la_OBJECTS = $(am__objects_9) \ -@USE_LIBTOOL_TRUE@ $(am__objects_10) $(am__objects_14) -libstdlib_la_OBJECTS = $(am_libstdlib_la_OBJECTS) -@USE_LIBTOOL_TRUE@am_libstdlib_la_rpath = -DEFAULT_INCLUDES = -I. -I$(srcdir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(lib_a_SOURCES) $(libstdlib_la_SOURCES) -DATA = $(noinst_DATA) -ETAGS = etags -CTAGS = ctags -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CRT0 = @CRT0@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ELIX_LEVEL_0_FALSE = @ELIX_LEVEL_0_FALSE@ -ELIX_LEVEL_0_TRUE = @ELIX_LEVEL_0_TRUE@ -ELIX_LEVEL_1_FALSE = @ELIX_LEVEL_1_FALSE@ -ELIX_LEVEL_1_TRUE = @ELIX_LEVEL_1_TRUE@ -ELIX_LEVEL_2_FALSE = @ELIX_LEVEL_2_FALSE@ -ELIX_LEVEL_2_TRUE = @ELIX_LEVEL_2_TRUE@ -ELIX_LEVEL_3_FALSE = @ELIX_LEVEL_3_FALSE@ -ELIX_LEVEL_3_TRUE = @ELIX_LEVEL_3_TRUE@ -ELIX_LEVEL_4_FALSE = @ELIX_LEVEL_4_FALSE@ -ELIX_LEVEL_4_TRUE = @ELIX_LEVEL_4_TRUE@ -ENABLE_NEWLIB_ICONV_FALSE = @ENABLE_NEWLIB_ICONV_FALSE@ -ENABLE_NEWLIB_ICONV_TRUE = @ENABLE_NEWLIB_ICONV_TRUE@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HAVE_LONG_DOUBLE_FALSE = @HAVE_LONG_DOUBLE_FALSE@ -HAVE_LONG_DOUBLE_TRUE = @HAVE_LONG_DOUBLE_TRUE@ -HAVE_POSIX_DIR_FALSE = @HAVE_POSIX_DIR_FALSE@ -HAVE_POSIX_DIR_TRUE = @HAVE_POSIX_DIR_TRUE@ -HAVE_SIGNAL_DIR_FALSE = @HAVE_SIGNAL_DIR_FALSE@ -HAVE_SIGNAL_DIR_TRUE = @HAVE_SIGNAL_DIR_TRUE@ -HAVE_STDIO64_DIR_FALSE = @HAVE_STDIO64_DIR_FALSE@ -HAVE_STDIO64_DIR_TRUE = @HAVE_STDIO64_DIR_TRUE@ -HAVE_STDIO_DIR_FALSE = @HAVE_STDIO_DIR_FALSE@ -HAVE_STDIO_DIR_TRUE = @HAVE_STDIO_DIR_TRUE@ -HAVE_SYSCALL_DIR_FALSE = @HAVE_SYSCALL_DIR_FALSE@ -HAVE_SYSCALL_DIR_TRUE = @HAVE_SYSCALL_DIR_TRUE@ -HAVE_UNIX_DIR_FALSE = @HAVE_UNIX_DIR_FALSE@ -HAVE_UNIX_DIR_TRUE = @HAVE_UNIX_DIR_TRUE@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBC_EXTRA_DEF = @LIBC_EXTRA_DEF@ -LIBC_EXTRA_LIB = @LIBC_EXTRA_LIB@ -LIBC_MACHINE_LIB = @LIBC_MACHINE_LIB@ -LIBC_POSIX_LIB = @LIBC_POSIX_LIB@ -LIBC_SIGNAL_DEF = @LIBC_SIGNAL_DEF@ -LIBC_SIGNAL_LIB = @LIBC_SIGNAL_LIB@ -LIBC_STDIO64_DEF = @LIBC_STDIO64_DEF@ -LIBC_STDIO64_LIB = @LIBC_STDIO64_LIB@ -LIBC_STDIO_DEF = @LIBC_STDIO_DEF@ -LIBC_STDIO_LIB = @LIBC_STDIO_LIB@ -LIBC_SYSCALL_LIB = @LIBC_SYSCALL_LIB@ -LIBC_SYS_LIB = @LIBC_SYS_LIB@ -LIBC_UNIX_LIB = @LIBC_UNIX_LIB@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -MAY_SUPPLY_SYSCALLS_FALSE = @MAY_SUPPLY_SYSCALLS_FALSE@ -MAY_SUPPLY_SYSCALLS_TRUE = @MAY_SUPPLY_SYSCALLS_TRUE@ -NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -READELF = @READELF@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -USE_LIBTOOL_FALSE = @USE_LIBTOOL_FALSE@ -USE_LIBTOOL_TRUE = @USE_LIBTOOL_TRUE@ -VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_AS = @ac_ct_AS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_READELF = @ac_ct_READELF@ -ac_ct_STRIP = @ac_ct_STRIP@ -aext = @aext@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -extra_dir = @extra_dir@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -libm_machine_dir = @libm_machine_dir@ -localstatedir = @localstatedir@ -lpfx = @lpfx@ -lt_ECHO = @lt_ECHO@ -machine_dir = @machine_dir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -newlib_basedir = @newlib_basedir@ -oext = @oext@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -subdirs = @subdirs@ -sys_dir = @sys_dir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -AUTOMAKE_OPTIONS = cygnus -INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -GENERAL_SOURCES = __adjust.c __atexit.c __call_atexit.c __exp10.c \ - __ten_mu.c _Exit.c abort.c abs.c assert.c atexit.c atof.c \ - atoff.c atoi.c atol.c calloc.c div.c dtoa.c dtoastub.c \ - environ.c envlock.c eprintf.c exit.c gdtoa-gethex.c \ - gdtoa-hexnan.c getenv.c getenv_r.c labs.c ldiv.c ldtoa.c \ - malloc.c mblen.c mblen_r.c mbstowcs.c mbstowcs_r.c mbtowc.c \ - mbtowc_r.c mlock.c mprec.c mstats.c rand.c rand_r.c realloc.c \ - reallocf.c sb_charsets.c strtod.c strtol.c strtoul.c wcstod.c \ - wcstol.c wcstoul.c wcstombs.c wcstombs_r.c wctomb.c wctomb_r.c \ - $(am__append_1) -EXTENDED_SOURCES = \ - cxa_atexit.c \ - cxa_finalize.c \ - drand48.c \ - ecvtbuf.c \ - efgcvt.c \ - erand48.c \ - jrand48.c \ - lcong48.c \ - lrand48.c \ - mrand48.c \ - msize.c \ - mtrim.c \ - nrand48.c \ - rand48.c \ - seed48.c \ - srand48.c \ - strtoll.c \ - strtoll_r.c \ - strtoull.c \ - strtoull_r.c \ - wcstoll.c \ - wcstoll_r.c \ - wcstoull.c \ - wcstoull_r.c \ - atoll.c \ - llabs.c \ - lldiv.c - -ELIX_2_SOURCES = \ - a64l.c \ - btowc.c \ - getopt.c \ - getsubopt.c \ - l64a.c \ - malign.c \ - mbrlen.c \ - mbrtowc.c \ - mbsinit.c \ - mbsnrtowcs.c \ - mbsrtowcs.c \ - on_exit.c \ - valloc.c \ - wcrtomb.c \ - wcsnrtombs.c \ - wcsrtombs.c \ - wctob.c - -ELIX_2_OBJS = \ - $(lpfx)malignr.$(oext) \ - $(lpfx)malloptr.$(oext) \ - $(lpfx)pvallocr.$(oext) \ - $(lpfx)vallocr.$(oext) - -ELIX_3_SOURCES = \ - putenv.c \ - putenv_r.c \ - setenv.c \ - setenv_r.c - -ELIX_4_SOURCES = \ - system.c - -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) $(ELIX_4_SOURCES) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_SOURCES = $(ELIX_2_SOURCES) -@ELIX_LEVEL_1_TRUE@ELIX_SOURCES = -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ELIX_OBJS = $(ELIX_2_OBJS) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ELIX_OBJS = $(ELIX_2_OBJS) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_OBJS = $(ELIX_2_OBJS) -@ELIX_LEVEL_1_TRUE@ELIX_OBJS = - -# Because of how libtool moves objects around, mallocr must be built last. -LIBADD_OBJS = $(lpfx)freer.$(oext) $(lpfx)reallocr.$(oext) \ - $(lpfx)callocr.$(oext) $(lpfx)cfreer.$(oext) \ - $(lpfx)mallinfor.$(oext) $(lpfx)mallstatsr.$(oext) \ - $(lpfx)msizer.$(oext) $(lpfx)mallocr.$(oext) - -libstdlib_la_LDFLAGS = -Xcompiler -nostdlib -@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libstdlib.la -@USE_LIBTOOL_TRUE@libstdlib_la_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES) -@USE_LIBTOOL_TRUE@libstdlib_la_LIBADD = $(LIBADD_OBJS) $(ELIX_OBJS) -@USE_LIBTOOL_TRUE@libstdlib_la_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS) -@USE_LIBTOOL_FALSE@LIB_COMPILE = $(COMPILE) -@USE_LIBTOOL_TRUE@LIB_COMPILE = $(LTCOMPILE) -@USE_LIBTOOL_FALSE@noinst_DATA = -@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in -@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a -@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES) -@USE_LIBTOOL_FALSE@lib_a_LIBADD = $(LIBADD_OBJS) $(ELIX_OBJS) -@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS) -@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS) -MALLOC_COMPILE = $(LIB_COMPILE) -DINTERNAL_NEWLIB -CHEWOUT_FILES = \ - _Exit.def \ - a64l.def \ - abort.def \ - abs.def \ - assert.def \ - atexit.def \ - atof.def \ - atoi.def \ - atoll.def \ - calloc.def \ - div.def \ - ecvtbuf.def \ - efgcvt.def \ - envlock.def \ - exit.def \ - getenv.def \ - labs.def \ - ldiv.def \ - llabs.def \ - lldiv.def \ - malloc.def \ - mallocr.def \ - mblen.def \ - mbsnrtowcs.def \ - mbstowcs.def \ - mbtowc.def \ - mlock.def \ - mstats.def \ - on_exit.def \ - rand.def \ - rand48.def \ - strtod.def \ - strtol.def \ - strtoll.def \ - strtoul.def \ - strtoull.def \ - wcsnrtombs.def \ - wcstod.def \ - wcstol.def \ - wcstoll.def \ - wcstoul.def \ - wcstoull.def \ - system.def \ - wcstombs.def \ - wctomb.def - -SUFFIXES = .def -CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str -TARGETDOC = ../tmp.texi -CLEANFILES = $(CHEWOUT_FILES) *.ref -all: all-am - -.SUFFIXES: -.SUFFIXES: .def .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../Makefile.shared $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus stdlib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --cygnus stdlib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) - -rm -f lib.a - $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) - $(RANLIB) lib.a - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libstdlib.la: $(libstdlib_la_OBJECTS) $(libstdlib_la_DEPENDENCIES) - $(LINK) $(am_libstdlib_la_rpath) $(libstdlib_la_LDFLAGS) $(libstdlib_la_OBJECTS) $(libstdlib_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -lib_a-__adjust.o: __adjust.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__adjust.o `test -f '__adjust.c' || echo '$(srcdir)/'`__adjust.c - -lib_a-__adjust.obj: __adjust.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__adjust.obj `if test -f '__adjust.c'; then $(CYGPATH_W) '__adjust.c'; else $(CYGPATH_W) '$(srcdir)/__adjust.c'; fi` - -lib_a-__atexit.o: __atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__atexit.o `test -f '__atexit.c' || echo '$(srcdir)/'`__atexit.c - -lib_a-__atexit.obj: __atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__atexit.obj `if test -f '__atexit.c'; then $(CYGPATH_W) '__atexit.c'; else $(CYGPATH_W) '$(srcdir)/__atexit.c'; fi` - -lib_a-__call_atexit.o: __call_atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__call_atexit.o `test -f '__call_atexit.c' || echo '$(srcdir)/'`__call_atexit.c - -lib_a-__call_atexit.obj: __call_atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__call_atexit.obj `if test -f '__call_atexit.c'; then $(CYGPATH_W) '__call_atexit.c'; else $(CYGPATH_W) '$(srcdir)/__call_atexit.c'; fi` - -lib_a-__exp10.o: __exp10.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__exp10.o `test -f '__exp10.c' || echo '$(srcdir)/'`__exp10.c - -lib_a-__exp10.obj: __exp10.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__exp10.obj `if test -f '__exp10.c'; then $(CYGPATH_W) '__exp10.c'; else $(CYGPATH_W) '$(srcdir)/__exp10.c'; fi` - -lib_a-__ten_mu.o: __ten_mu.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__ten_mu.o `test -f '__ten_mu.c' || echo '$(srcdir)/'`__ten_mu.c - -lib_a-__ten_mu.obj: __ten_mu.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-__ten_mu.obj `if test -f '__ten_mu.c'; then $(CYGPATH_W) '__ten_mu.c'; else $(CYGPATH_W) '$(srcdir)/__ten_mu.c'; fi` - -lib_a-_Exit.o: _Exit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-_Exit.o `test -f '_Exit.c' || echo '$(srcdir)/'`_Exit.c - -lib_a-_Exit.obj: _Exit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-_Exit.obj `if test -f '_Exit.c'; then $(CYGPATH_W) '_Exit.c'; else $(CYGPATH_W) '$(srcdir)/_Exit.c'; fi` - -lib_a-abort.o: abort.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-abort.o `test -f 'abort.c' || echo '$(srcdir)/'`abort.c - -lib_a-abort.obj: abort.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-abort.obj `if test -f 'abort.c'; then $(CYGPATH_W) 'abort.c'; else $(CYGPATH_W) '$(srcdir)/abort.c'; fi` - -lib_a-abs.o: abs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-abs.o `test -f 'abs.c' || echo '$(srcdir)/'`abs.c - -lib_a-abs.obj: abs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-abs.obj `if test -f 'abs.c'; then $(CYGPATH_W) 'abs.c'; else $(CYGPATH_W) '$(srcdir)/abs.c'; fi` - -lib_a-assert.o: assert.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c - -lib_a-assert.obj: assert.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi` - -lib_a-atexit.o: atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atexit.o `test -f 'atexit.c' || echo '$(srcdir)/'`atexit.c - -lib_a-atexit.obj: atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atexit.obj `if test -f 'atexit.c'; then $(CYGPATH_W) 'atexit.c'; else $(CYGPATH_W) '$(srcdir)/atexit.c'; fi` - -lib_a-atof.o: atof.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atof.o `test -f 'atof.c' || echo '$(srcdir)/'`atof.c - -lib_a-atof.obj: atof.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atof.obj `if test -f 'atof.c'; then $(CYGPATH_W) 'atof.c'; else $(CYGPATH_W) '$(srcdir)/atof.c'; fi` - -lib_a-atoff.o: atoff.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoff.o `test -f 'atoff.c' || echo '$(srcdir)/'`atoff.c - -lib_a-atoff.obj: atoff.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoff.obj `if test -f 'atoff.c'; then $(CYGPATH_W) 'atoff.c'; else $(CYGPATH_W) '$(srcdir)/atoff.c'; fi` - -lib_a-atoi.o: atoi.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoi.o `test -f 'atoi.c' || echo '$(srcdir)/'`atoi.c - -lib_a-atoi.obj: atoi.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoi.obj `if test -f 'atoi.c'; then $(CYGPATH_W) 'atoi.c'; else $(CYGPATH_W) '$(srcdir)/atoi.c'; fi` - -lib_a-atol.o: atol.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atol.o `test -f 'atol.c' || echo '$(srcdir)/'`atol.c - -lib_a-atol.obj: atol.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atol.obj `if test -f 'atol.c'; then $(CYGPATH_W) 'atol.c'; else $(CYGPATH_W) '$(srcdir)/atol.c'; fi` - -lib_a-calloc.o: calloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-calloc.o `test -f 'calloc.c' || echo '$(srcdir)/'`calloc.c - -lib_a-calloc.obj: calloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-calloc.obj `if test -f 'calloc.c'; then $(CYGPATH_W) 'calloc.c'; else $(CYGPATH_W) '$(srcdir)/calloc.c'; fi` - -lib_a-div.o: div.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-div.o `test -f 'div.c' || echo '$(srcdir)/'`div.c - -lib_a-div.obj: div.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-div.obj `if test -f 'div.c'; then $(CYGPATH_W) 'div.c'; else $(CYGPATH_W) '$(srcdir)/div.c'; fi` - -lib_a-dtoa.o: dtoa.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dtoa.o `test -f 'dtoa.c' || echo '$(srcdir)/'`dtoa.c - -lib_a-dtoa.obj: dtoa.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dtoa.obj `if test -f 'dtoa.c'; then $(CYGPATH_W) 'dtoa.c'; else $(CYGPATH_W) '$(srcdir)/dtoa.c'; fi` - -lib_a-dtoastub.o: dtoastub.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dtoastub.o `test -f 'dtoastub.c' || echo '$(srcdir)/'`dtoastub.c - -lib_a-dtoastub.obj: dtoastub.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dtoastub.obj `if test -f 'dtoastub.c'; then $(CYGPATH_W) 'dtoastub.c'; else $(CYGPATH_W) '$(srcdir)/dtoastub.c'; fi` - -lib_a-environ.o: environ.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-environ.o `test -f 'environ.c' || echo '$(srcdir)/'`environ.c - -lib_a-environ.obj: environ.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-environ.obj `if test -f 'environ.c'; then $(CYGPATH_W) 'environ.c'; else $(CYGPATH_W) '$(srcdir)/environ.c'; fi` - -lib_a-envlock.o: envlock.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-envlock.o `test -f 'envlock.c' || echo '$(srcdir)/'`envlock.c - -lib_a-envlock.obj: envlock.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-envlock.obj `if test -f 'envlock.c'; then $(CYGPATH_W) 'envlock.c'; else $(CYGPATH_W) '$(srcdir)/envlock.c'; fi` - -lib_a-eprintf.o: eprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-eprintf.o `test -f 'eprintf.c' || echo '$(srcdir)/'`eprintf.c - -lib_a-eprintf.obj: eprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-eprintf.obj `if test -f 'eprintf.c'; then $(CYGPATH_W) 'eprintf.c'; else $(CYGPATH_W) '$(srcdir)/eprintf.c'; fi` - -lib_a-exit.o: exit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-exit.o `test -f 'exit.c' || echo '$(srcdir)/'`exit.c - -lib_a-exit.obj: exit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-exit.obj `if test -f 'exit.c'; then $(CYGPATH_W) 'exit.c'; else $(CYGPATH_W) '$(srcdir)/exit.c'; fi` - -lib_a-gdtoa-gethex.o: gdtoa-gethex.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gdtoa-gethex.o `test -f 'gdtoa-gethex.c' || echo '$(srcdir)/'`gdtoa-gethex.c - -lib_a-gdtoa-gethex.obj: gdtoa-gethex.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gdtoa-gethex.obj `if test -f 'gdtoa-gethex.c'; then $(CYGPATH_W) 'gdtoa-gethex.c'; else $(CYGPATH_W) '$(srcdir)/gdtoa-gethex.c'; fi` - -lib_a-gdtoa-hexnan.o: gdtoa-hexnan.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gdtoa-hexnan.o `test -f 'gdtoa-hexnan.c' || echo '$(srcdir)/'`gdtoa-hexnan.c - -lib_a-gdtoa-hexnan.obj: gdtoa-hexnan.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gdtoa-hexnan.obj `if test -f 'gdtoa-hexnan.c'; then $(CYGPATH_W) 'gdtoa-hexnan.c'; else $(CYGPATH_W) '$(srcdir)/gdtoa-hexnan.c'; fi` - -lib_a-getenv.o: getenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getenv.o `test -f 'getenv.c' || echo '$(srcdir)/'`getenv.c - -lib_a-getenv.obj: getenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getenv.obj `if test -f 'getenv.c'; then $(CYGPATH_W) 'getenv.c'; else $(CYGPATH_W) '$(srcdir)/getenv.c'; fi` - -lib_a-getenv_r.o: getenv_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getenv_r.o `test -f 'getenv_r.c' || echo '$(srcdir)/'`getenv_r.c - -lib_a-getenv_r.obj: getenv_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getenv_r.obj `if test -f 'getenv_r.c'; then $(CYGPATH_W) 'getenv_r.c'; else $(CYGPATH_W) '$(srcdir)/getenv_r.c'; fi` - -lib_a-labs.o: labs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-labs.o `test -f 'labs.c' || echo '$(srcdir)/'`labs.c - -lib_a-labs.obj: labs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-labs.obj `if test -f 'labs.c'; then $(CYGPATH_W) 'labs.c'; else $(CYGPATH_W) '$(srcdir)/labs.c'; fi` - -lib_a-ldiv.o: ldiv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ldiv.o `test -f 'ldiv.c' || echo '$(srcdir)/'`ldiv.c - -lib_a-ldiv.obj: ldiv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ldiv.obj `if test -f 'ldiv.c'; then $(CYGPATH_W) 'ldiv.c'; else $(CYGPATH_W) '$(srcdir)/ldiv.c'; fi` - -lib_a-ldtoa.o: ldtoa.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ldtoa.o `test -f 'ldtoa.c' || echo '$(srcdir)/'`ldtoa.c - -lib_a-ldtoa.obj: ldtoa.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ldtoa.obj `if test -f 'ldtoa.c'; then $(CYGPATH_W) 'ldtoa.c'; else $(CYGPATH_W) '$(srcdir)/ldtoa.c'; fi` - -lib_a-malloc.o: malloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c - -lib_a-malloc.obj: malloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi` - -lib_a-mblen.o: mblen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mblen.o `test -f 'mblen.c' || echo '$(srcdir)/'`mblen.c - -lib_a-mblen.obj: mblen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mblen.obj `if test -f 'mblen.c'; then $(CYGPATH_W) 'mblen.c'; else $(CYGPATH_W) '$(srcdir)/mblen.c'; fi` - -lib_a-mblen_r.o: mblen_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mblen_r.o `test -f 'mblen_r.c' || echo '$(srcdir)/'`mblen_r.c - -lib_a-mblen_r.obj: mblen_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mblen_r.obj `if test -f 'mblen_r.c'; then $(CYGPATH_W) 'mblen_r.c'; else $(CYGPATH_W) '$(srcdir)/mblen_r.c'; fi` - -lib_a-mbstowcs.o: mbstowcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbstowcs.o `test -f 'mbstowcs.c' || echo '$(srcdir)/'`mbstowcs.c - -lib_a-mbstowcs.obj: mbstowcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbstowcs.obj `if test -f 'mbstowcs.c'; then $(CYGPATH_W) 'mbstowcs.c'; else $(CYGPATH_W) '$(srcdir)/mbstowcs.c'; fi` - -lib_a-mbstowcs_r.o: mbstowcs_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbstowcs_r.o `test -f 'mbstowcs_r.c' || echo '$(srcdir)/'`mbstowcs_r.c - -lib_a-mbstowcs_r.obj: mbstowcs_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbstowcs_r.obj `if test -f 'mbstowcs_r.c'; then $(CYGPATH_W) 'mbstowcs_r.c'; else $(CYGPATH_W) '$(srcdir)/mbstowcs_r.c'; fi` - -lib_a-mbtowc.o: mbtowc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbtowc.o `test -f 'mbtowc.c' || echo '$(srcdir)/'`mbtowc.c - -lib_a-mbtowc.obj: mbtowc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbtowc.obj `if test -f 'mbtowc.c'; then $(CYGPATH_W) 'mbtowc.c'; else $(CYGPATH_W) '$(srcdir)/mbtowc.c'; fi` - -lib_a-mbtowc_r.o: mbtowc_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbtowc_r.o `test -f 'mbtowc_r.c' || echo '$(srcdir)/'`mbtowc_r.c - -lib_a-mbtowc_r.obj: mbtowc_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbtowc_r.obj `if test -f 'mbtowc_r.c'; then $(CYGPATH_W) 'mbtowc_r.c'; else $(CYGPATH_W) '$(srcdir)/mbtowc_r.c'; fi` - -lib_a-mlock.o: mlock.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mlock.o `test -f 'mlock.c' || echo '$(srcdir)/'`mlock.c - -lib_a-mlock.obj: mlock.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mlock.obj `if test -f 'mlock.c'; then $(CYGPATH_W) 'mlock.c'; else $(CYGPATH_W) '$(srcdir)/mlock.c'; fi` - -lib_a-mprec.o: mprec.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mprec.o `test -f 'mprec.c' || echo '$(srcdir)/'`mprec.c - -lib_a-mprec.obj: mprec.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mprec.obj `if test -f 'mprec.c'; then $(CYGPATH_W) 'mprec.c'; else $(CYGPATH_W) '$(srcdir)/mprec.c'; fi` - -lib_a-mstats.o: mstats.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mstats.o `test -f 'mstats.c' || echo '$(srcdir)/'`mstats.c - -lib_a-mstats.obj: mstats.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mstats.obj `if test -f 'mstats.c'; then $(CYGPATH_W) 'mstats.c'; else $(CYGPATH_W) '$(srcdir)/mstats.c'; fi` - -lib_a-rand.o: rand.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rand.o `test -f 'rand.c' || echo '$(srcdir)/'`rand.c - -lib_a-rand.obj: rand.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rand.obj `if test -f 'rand.c'; then $(CYGPATH_W) 'rand.c'; else $(CYGPATH_W) '$(srcdir)/rand.c'; fi` - -lib_a-rand_r.o: rand_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rand_r.o `test -f 'rand_r.c' || echo '$(srcdir)/'`rand_r.c - -lib_a-rand_r.obj: rand_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rand_r.obj `if test -f 'rand_r.c'; then $(CYGPATH_W) 'rand_r.c'; else $(CYGPATH_W) '$(srcdir)/rand_r.c'; fi` - -lib_a-realloc.o: realloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-realloc.o `test -f 'realloc.c' || echo '$(srcdir)/'`realloc.c - -lib_a-realloc.obj: realloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-realloc.obj `if test -f 'realloc.c'; then $(CYGPATH_W) 'realloc.c'; else $(CYGPATH_W) '$(srcdir)/realloc.c'; fi` - -lib_a-reallocf.o: reallocf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-reallocf.o `test -f 'reallocf.c' || echo '$(srcdir)/'`reallocf.c - -lib_a-reallocf.obj: reallocf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-reallocf.obj `if test -f 'reallocf.c'; then $(CYGPATH_W) 'reallocf.c'; else $(CYGPATH_W) '$(srcdir)/reallocf.c'; fi` - -lib_a-sb_charsets.o: sb_charsets.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sb_charsets.o `test -f 'sb_charsets.c' || echo '$(srcdir)/'`sb_charsets.c - -lib_a-sb_charsets.obj: sb_charsets.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sb_charsets.obj `if test -f 'sb_charsets.c'; then $(CYGPATH_W) 'sb_charsets.c'; else $(CYGPATH_W) '$(srcdir)/sb_charsets.c'; fi` - -lib_a-strtod.o: strtod.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtod.o `test -f 'strtod.c' || echo '$(srcdir)/'`strtod.c - -lib_a-strtod.obj: strtod.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtod.obj `if test -f 'strtod.c'; then $(CYGPATH_W) 'strtod.c'; else $(CYGPATH_W) '$(srcdir)/strtod.c'; fi` - -lib_a-strtol.o: strtol.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtol.o `test -f 'strtol.c' || echo '$(srcdir)/'`strtol.c - -lib_a-strtol.obj: strtol.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtol.obj `if test -f 'strtol.c'; then $(CYGPATH_W) 'strtol.c'; else $(CYGPATH_W) '$(srcdir)/strtol.c'; fi` - -lib_a-strtoul.o: strtoul.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoul.o `test -f 'strtoul.c' || echo '$(srcdir)/'`strtoul.c - -lib_a-strtoul.obj: strtoul.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoul.obj `if test -f 'strtoul.c'; then $(CYGPATH_W) 'strtoul.c'; else $(CYGPATH_W) '$(srcdir)/strtoul.c'; fi` - -lib_a-wcstod.o: wcstod.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstod.o `test -f 'wcstod.c' || echo '$(srcdir)/'`wcstod.c - -lib_a-wcstod.obj: wcstod.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstod.obj `if test -f 'wcstod.c'; then $(CYGPATH_W) 'wcstod.c'; else $(CYGPATH_W) '$(srcdir)/wcstod.c'; fi` - -lib_a-wcstol.o: wcstol.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstol.o `test -f 'wcstol.c' || echo '$(srcdir)/'`wcstol.c - -lib_a-wcstol.obj: wcstol.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstol.obj `if test -f 'wcstol.c'; then $(CYGPATH_W) 'wcstol.c'; else $(CYGPATH_W) '$(srcdir)/wcstol.c'; fi` - -lib_a-wcstoul.o: wcstoul.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoul.o `test -f 'wcstoul.c' || echo '$(srcdir)/'`wcstoul.c - -lib_a-wcstoul.obj: wcstoul.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoul.obj `if test -f 'wcstoul.c'; then $(CYGPATH_W) 'wcstoul.c'; else $(CYGPATH_W) '$(srcdir)/wcstoul.c'; fi` - -lib_a-wcstombs.o: wcstombs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstombs.o `test -f 'wcstombs.c' || echo '$(srcdir)/'`wcstombs.c - -lib_a-wcstombs.obj: wcstombs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstombs.obj `if test -f 'wcstombs.c'; then $(CYGPATH_W) 'wcstombs.c'; else $(CYGPATH_W) '$(srcdir)/wcstombs.c'; fi` - -lib_a-wcstombs_r.o: wcstombs_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstombs_r.o `test -f 'wcstombs_r.c' || echo '$(srcdir)/'`wcstombs_r.c - -lib_a-wcstombs_r.obj: wcstombs_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstombs_r.obj `if test -f 'wcstombs_r.c'; then $(CYGPATH_W) 'wcstombs_r.c'; else $(CYGPATH_W) '$(srcdir)/wcstombs_r.c'; fi` - -lib_a-wctomb.o: wctomb.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctomb.o `test -f 'wctomb.c' || echo '$(srcdir)/'`wctomb.c - -lib_a-wctomb.obj: wctomb.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctomb.obj `if test -f 'wctomb.c'; then $(CYGPATH_W) 'wctomb.c'; else $(CYGPATH_W) '$(srcdir)/wctomb.c'; fi` - -lib_a-wctomb_r.o: wctomb_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctomb_r.o `test -f 'wctomb_r.c' || echo '$(srcdir)/'`wctomb_r.c - -lib_a-wctomb_r.obj: wctomb_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctomb_r.obj `if test -f 'wctomb_r.c'; then $(CYGPATH_W) 'wctomb_r.c'; else $(CYGPATH_W) '$(srcdir)/wctomb_r.c'; fi` - -lib_a-strtold.o: strtold.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtold.o `test -f 'strtold.c' || echo '$(srcdir)/'`strtold.c - -lib_a-strtold.obj: strtold.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtold.obj `if test -f 'strtold.c'; then $(CYGPATH_W) 'strtold.c'; else $(CYGPATH_W) '$(srcdir)/strtold.c'; fi` - -lib_a-wcstold.o: wcstold.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstold.o `test -f 'wcstold.c' || echo '$(srcdir)/'`wcstold.c - -lib_a-wcstold.obj: wcstold.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstold.obj `if test -f 'wcstold.c'; then $(CYGPATH_W) 'wcstold.c'; else $(CYGPATH_W) '$(srcdir)/wcstold.c'; fi` - -lib_a-cxa_atexit.o: cxa_atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cxa_atexit.o `test -f 'cxa_atexit.c' || echo '$(srcdir)/'`cxa_atexit.c - -lib_a-cxa_atexit.obj: cxa_atexit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cxa_atexit.obj `if test -f 'cxa_atexit.c'; then $(CYGPATH_W) 'cxa_atexit.c'; else $(CYGPATH_W) '$(srcdir)/cxa_atexit.c'; fi` - -lib_a-cxa_finalize.o: cxa_finalize.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cxa_finalize.o `test -f 'cxa_finalize.c' || echo '$(srcdir)/'`cxa_finalize.c - -lib_a-cxa_finalize.obj: cxa_finalize.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cxa_finalize.obj `if test -f 'cxa_finalize.c'; then $(CYGPATH_W) 'cxa_finalize.c'; else $(CYGPATH_W) '$(srcdir)/cxa_finalize.c'; fi` - -lib_a-drand48.o: drand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-drand48.o `test -f 'drand48.c' || echo '$(srcdir)/'`drand48.c - -lib_a-drand48.obj: drand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-drand48.obj `if test -f 'drand48.c'; then $(CYGPATH_W) 'drand48.c'; else $(CYGPATH_W) '$(srcdir)/drand48.c'; fi` - -lib_a-ecvtbuf.o: ecvtbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ecvtbuf.o `test -f 'ecvtbuf.c' || echo '$(srcdir)/'`ecvtbuf.c - -lib_a-ecvtbuf.obj: ecvtbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ecvtbuf.obj `if test -f 'ecvtbuf.c'; then $(CYGPATH_W) 'ecvtbuf.c'; else $(CYGPATH_W) '$(srcdir)/ecvtbuf.c'; fi` - -lib_a-efgcvt.o: efgcvt.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-efgcvt.o `test -f 'efgcvt.c' || echo '$(srcdir)/'`efgcvt.c - -lib_a-efgcvt.obj: efgcvt.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-efgcvt.obj `if test -f 'efgcvt.c'; then $(CYGPATH_W) 'efgcvt.c'; else $(CYGPATH_W) '$(srcdir)/efgcvt.c'; fi` - -lib_a-erand48.o: erand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-erand48.o `test -f 'erand48.c' || echo '$(srcdir)/'`erand48.c - -lib_a-erand48.obj: erand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-erand48.obj `if test -f 'erand48.c'; then $(CYGPATH_W) 'erand48.c'; else $(CYGPATH_W) '$(srcdir)/erand48.c'; fi` - -lib_a-jrand48.o: jrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-jrand48.o `test -f 'jrand48.c' || echo '$(srcdir)/'`jrand48.c - -lib_a-jrand48.obj: jrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-jrand48.obj `if test -f 'jrand48.c'; then $(CYGPATH_W) 'jrand48.c'; else $(CYGPATH_W) '$(srcdir)/jrand48.c'; fi` - -lib_a-lcong48.o: lcong48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lcong48.o `test -f 'lcong48.c' || echo '$(srcdir)/'`lcong48.c - -lib_a-lcong48.obj: lcong48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lcong48.obj `if test -f 'lcong48.c'; then $(CYGPATH_W) 'lcong48.c'; else $(CYGPATH_W) '$(srcdir)/lcong48.c'; fi` - -lib_a-lrand48.o: lrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lrand48.o `test -f 'lrand48.c' || echo '$(srcdir)/'`lrand48.c - -lib_a-lrand48.obj: lrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lrand48.obj `if test -f 'lrand48.c'; then $(CYGPATH_W) 'lrand48.c'; else $(CYGPATH_W) '$(srcdir)/lrand48.c'; fi` - -lib_a-mrand48.o: mrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mrand48.o `test -f 'mrand48.c' || echo '$(srcdir)/'`mrand48.c - -lib_a-mrand48.obj: mrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mrand48.obj `if test -f 'mrand48.c'; then $(CYGPATH_W) 'mrand48.c'; else $(CYGPATH_W) '$(srcdir)/mrand48.c'; fi` - -lib_a-msize.o: msize.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-msize.o `test -f 'msize.c' || echo '$(srcdir)/'`msize.c - -lib_a-msize.obj: msize.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-msize.obj `if test -f 'msize.c'; then $(CYGPATH_W) 'msize.c'; else $(CYGPATH_W) '$(srcdir)/msize.c'; fi` - -lib_a-mtrim.o: mtrim.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mtrim.o `test -f 'mtrim.c' || echo '$(srcdir)/'`mtrim.c - -lib_a-mtrim.obj: mtrim.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mtrim.obj `if test -f 'mtrim.c'; then $(CYGPATH_W) 'mtrim.c'; else $(CYGPATH_W) '$(srcdir)/mtrim.c'; fi` - -lib_a-nrand48.o: nrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nrand48.o `test -f 'nrand48.c' || echo '$(srcdir)/'`nrand48.c - -lib_a-nrand48.obj: nrand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nrand48.obj `if test -f 'nrand48.c'; then $(CYGPATH_W) 'nrand48.c'; else $(CYGPATH_W) '$(srcdir)/nrand48.c'; fi` - -lib_a-rand48.o: rand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rand48.o `test -f 'rand48.c' || echo '$(srcdir)/'`rand48.c - -lib_a-rand48.obj: rand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rand48.obj `if test -f 'rand48.c'; then $(CYGPATH_W) 'rand48.c'; else $(CYGPATH_W) '$(srcdir)/rand48.c'; fi` - -lib_a-seed48.o: seed48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-seed48.o `test -f 'seed48.c' || echo '$(srcdir)/'`seed48.c - -lib_a-seed48.obj: seed48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-seed48.obj `if test -f 'seed48.c'; then $(CYGPATH_W) 'seed48.c'; else $(CYGPATH_W) '$(srcdir)/seed48.c'; fi` - -lib_a-srand48.o: srand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-srand48.o `test -f 'srand48.c' || echo '$(srcdir)/'`srand48.c - -lib_a-srand48.obj: srand48.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-srand48.obj `if test -f 'srand48.c'; then $(CYGPATH_W) 'srand48.c'; else $(CYGPATH_W) '$(srcdir)/srand48.c'; fi` - -lib_a-strtoll.o: strtoll.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoll.o `test -f 'strtoll.c' || echo '$(srcdir)/'`strtoll.c - -lib_a-strtoll.obj: strtoll.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoll.obj `if test -f 'strtoll.c'; then $(CYGPATH_W) 'strtoll.c'; else $(CYGPATH_W) '$(srcdir)/strtoll.c'; fi` - -lib_a-strtoll_r.o: strtoll_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoll_r.o `test -f 'strtoll_r.c' || echo '$(srcdir)/'`strtoll_r.c - -lib_a-strtoll_r.obj: strtoll_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoll_r.obj `if test -f 'strtoll_r.c'; then $(CYGPATH_W) 'strtoll_r.c'; else $(CYGPATH_W) '$(srcdir)/strtoll_r.c'; fi` - -lib_a-strtoull.o: strtoull.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoull.o `test -f 'strtoull.c' || echo '$(srcdir)/'`strtoull.c - -lib_a-strtoull.obj: strtoull.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoull.obj `if test -f 'strtoull.c'; then $(CYGPATH_W) 'strtoull.c'; else $(CYGPATH_W) '$(srcdir)/strtoull.c'; fi` - -lib_a-strtoull_r.o: strtoull_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoull_r.o `test -f 'strtoull_r.c' || echo '$(srcdir)/'`strtoull_r.c - -lib_a-strtoull_r.obj: strtoull_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtoull_r.obj `if test -f 'strtoull_r.c'; then $(CYGPATH_W) 'strtoull_r.c'; else $(CYGPATH_W) '$(srcdir)/strtoull_r.c'; fi` - -lib_a-wcstoll.o: wcstoll.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoll.o `test -f 'wcstoll.c' || echo '$(srcdir)/'`wcstoll.c - -lib_a-wcstoll.obj: wcstoll.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoll.obj `if test -f 'wcstoll.c'; then $(CYGPATH_W) 'wcstoll.c'; else $(CYGPATH_W) '$(srcdir)/wcstoll.c'; fi` - -lib_a-wcstoll_r.o: wcstoll_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoll_r.o `test -f 'wcstoll_r.c' || echo '$(srcdir)/'`wcstoll_r.c - -lib_a-wcstoll_r.obj: wcstoll_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoll_r.obj `if test -f 'wcstoll_r.c'; then $(CYGPATH_W) 'wcstoll_r.c'; else $(CYGPATH_W) '$(srcdir)/wcstoll_r.c'; fi` - -lib_a-wcstoull.o: wcstoull.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoull.o `test -f 'wcstoull.c' || echo '$(srcdir)/'`wcstoull.c - -lib_a-wcstoull.obj: wcstoull.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoull.obj `if test -f 'wcstoull.c'; then $(CYGPATH_W) 'wcstoull.c'; else $(CYGPATH_W) '$(srcdir)/wcstoull.c'; fi` - -lib_a-wcstoull_r.o: wcstoull_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoull_r.o `test -f 'wcstoull_r.c' || echo '$(srcdir)/'`wcstoull_r.c - -lib_a-wcstoull_r.obj: wcstoull_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcstoull_r.obj `if test -f 'wcstoull_r.c'; then $(CYGPATH_W) 'wcstoull_r.c'; else $(CYGPATH_W) '$(srcdir)/wcstoull_r.c'; fi` - -lib_a-atoll.o: atoll.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoll.o `test -f 'atoll.c' || echo '$(srcdir)/'`atoll.c - -lib_a-atoll.obj: atoll.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoll.obj `if test -f 'atoll.c'; then $(CYGPATH_W) 'atoll.c'; else $(CYGPATH_W) '$(srcdir)/atoll.c'; fi` - -lib_a-llabs.o: llabs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-llabs.o `test -f 'llabs.c' || echo '$(srcdir)/'`llabs.c - -lib_a-llabs.obj: llabs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-llabs.obj `if test -f 'llabs.c'; then $(CYGPATH_W) 'llabs.c'; else $(CYGPATH_W) '$(srcdir)/llabs.c'; fi` - -lib_a-lldiv.o: lldiv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lldiv.o `test -f 'lldiv.c' || echo '$(srcdir)/'`lldiv.c - -lib_a-lldiv.obj: lldiv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lldiv.obj `if test -f 'lldiv.c'; then $(CYGPATH_W) 'lldiv.c'; else $(CYGPATH_W) '$(srcdir)/lldiv.c'; fi` - -lib_a-a64l.o: a64l.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-a64l.o `test -f 'a64l.c' || echo '$(srcdir)/'`a64l.c - -lib_a-a64l.obj: a64l.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-a64l.obj `if test -f 'a64l.c'; then $(CYGPATH_W) 'a64l.c'; else $(CYGPATH_W) '$(srcdir)/a64l.c'; fi` - -lib_a-btowc.o: btowc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-btowc.o `test -f 'btowc.c' || echo '$(srcdir)/'`btowc.c - -lib_a-btowc.obj: btowc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-btowc.obj `if test -f 'btowc.c'; then $(CYGPATH_W) 'btowc.c'; else $(CYGPATH_W) '$(srcdir)/btowc.c'; fi` - -lib_a-getopt.o: getopt.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getopt.o `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c - -lib_a-getopt.obj: getopt.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getopt.obj `if test -f 'getopt.c'; then $(CYGPATH_W) 'getopt.c'; else $(CYGPATH_W) '$(srcdir)/getopt.c'; fi` - -lib_a-getsubopt.o: getsubopt.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getsubopt.o `test -f 'getsubopt.c' || echo '$(srcdir)/'`getsubopt.c - -lib_a-getsubopt.obj: getsubopt.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getsubopt.obj `if test -f 'getsubopt.c'; then $(CYGPATH_W) 'getsubopt.c'; else $(CYGPATH_W) '$(srcdir)/getsubopt.c'; fi` - -lib_a-l64a.o: l64a.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-l64a.o `test -f 'l64a.c' || echo '$(srcdir)/'`l64a.c - -lib_a-l64a.obj: l64a.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-l64a.obj `if test -f 'l64a.c'; then $(CYGPATH_W) 'l64a.c'; else $(CYGPATH_W) '$(srcdir)/l64a.c'; fi` - -lib_a-malign.o: malign.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-malign.o `test -f 'malign.c' || echo '$(srcdir)/'`malign.c - -lib_a-malign.obj: malign.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-malign.obj `if test -f 'malign.c'; then $(CYGPATH_W) 'malign.c'; else $(CYGPATH_W) '$(srcdir)/malign.c'; fi` - -lib_a-mbrlen.o: mbrlen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbrlen.o `test -f 'mbrlen.c' || echo '$(srcdir)/'`mbrlen.c - -lib_a-mbrlen.obj: mbrlen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbrlen.obj `if test -f 'mbrlen.c'; then $(CYGPATH_W) 'mbrlen.c'; else $(CYGPATH_W) '$(srcdir)/mbrlen.c'; fi` - -lib_a-mbrtowc.o: mbrtowc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbrtowc.o `test -f 'mbrtowc.c' || echo '$(srcdir)/'`mbrtowc.c - -lib_a-mbrtowc.obj: mbrtowc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbrtowc.obj `if test -f 'mbrtowc.c'; then $(CYGPATH_W) 'mbrtowc.c'; else $(CYGPATH_W) '$(srcdir)/mbrtowc.c'; fi` - -lib_a-mbsinit.o: mbsinit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbsinit.o `test -f 'mbsinit.c' || echo '$(srcdir)/'`mbsinit.c - -lib_a-mbsinit.obj: mbsinit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbsinit.obj `if test -f 'mbsinit.c'; then $(CYGPATH_W) 'mbsinit.c'; else $(CYGPATH_W) '$(srcdir)/mbsinit.c'; fi` - -lib_a-mbsnrtowcs.o: mbsnrtowcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbsnrtowcs.o `test -f 'mbsnrtowcs.c' || echo '$(srcdir)/'`mbsnrtowcs.c - -lib_a-mbsnrtowcs.obj: mbsnrtowcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbsnrtowcs.obj `if test -f 'mbsnrtowcs.c'; then $(CYGPATH_W) 'mbsnrtowcs.c'; else $(CYGPATH_W) '$(srcdir)/mbsnrtowcs.c'; fi` - -lib_a-mbsrtowcs.o: mbsrtowcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbsrtowcs.o `test -f 'mbsrtowcs.c' || echo '$(srcdir)/'`mbsrtowcs.c - -lib_a-mbsrtowcs.obj: mbsrtowcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mbsrtowcs.obj `if test -f 'mbsrtowcs.c'; then $(CYGPATH_W) 'mbsrtowcs.c'; else $(CYGPATH_W) '$(srcdir)/mbsrtowcs.c'; fi` - -lib_a-on_exit.o: on_exit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-on_exit.o `test -f 'on_exit.c' || echo '$(srcdir)/'`on_exit.c - -lib_a-on_exit.obj: on_exit.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-on_exit.obj `if test -f 'on_exit.c'; then $(CYGPATH_W) 'on_exit.c'; else $(CYGPATH_W) '$(srcdir)/on_exit.c'; fi` - -lib_a-valloc.o: valloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-valloc.o `test -f 'valloc.c' || echo '$(srcdir)/'`valloc.c - -lib_a-valloc.obj: valloc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-valloc.obj `if test -f 'valloc.c'; then $(CYGPATH_W) 'valloc.c'; else $(CYGPATH_W) '$(srcdir)/valloc.c'; fi` - -lib_a-wcrtomb.o: wcrtomb.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcrtomb.o `test -f 'wcrtomb.c' || echo '$(srcdir)/'`wcrtomb.c - -lib_a-wcrtomb.obj: wcrtomb.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcrtomb.obj `if test -f 'wcrtomb.c'; then $(CYGPATH_W) 'wcrtomb.c'; else $(CYGPATH_W) '$(srcdir)/wcrtomb.c'; fi` - -lib_a-wcsnrtombs.o: wcsnrtombs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcsnrtombs.o `test -f 'wcsnrtombs.c' || echo '$(srcdir)/'`wcsnrtombs.c - -lib_a-wcsnrtombs.obj: wcsnrtombs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcsnrtombs.obj `if test -f 'wcsnrtombs.c'; then $(CYGPATH_W) 'wcsnrtombs.c'; else $(CYGPATH_W) '$(srcdir)/wcsnrtombs.c'; fi` - -lib_a-wcsrtombs.o: wcsrtombs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcsrtombs.o `test -f 'wcsrtombs.c' || echo '$(srcdir)/'`wcsrtombs.c - -lib_a-wcsrtombs.obj: wcsrtombs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcsrtombs.obj `if test -f 'wcsrtombs.c'; then $(CYGPATH_W) 'wcsrtombs.c'; else $(CYGPATH_W) '$(srcdir)/wcsrtombs.c'; fi` - -lib_a-wctob.o: wctob.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctob.o `test -f 'wctob.c' || echo '$(srcdir)/'`wctob.c - -lib_a-wctob.obj: wctob.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctob.obj `if test -f 'wctob.c'; then $(CYGPATH_W) 'wctob.c'; else $(CYGPATH_W) '$(srcdir)/wctob.c'; fi` - -lib_a-putenv.o: putenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putenv.o `test -f 'putenv.c' || echo '$(srcdir)/'`putenv.c - -lib_a-putenv.obj: putenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putenv.obj `if test -f 'putenv.c'; then $(CYGPATH_W) 'putenv.c'; else $(CYGPATH_W) '$(srcdir)/putenv.c'; fi` - -lib_a-putenv_r.o: putenv_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putenv_r.o `test -f 'putenv_r.c' || echo '$(srcdir)/'`putenv_r.c - -lib_a-putenv_r.obj: putenv_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putenv_r.obj `if test -f 'putenv_r.c'; then $(CYGPATH_W) 'putenv_r.c'; else $(CYGPATH_W) '$(srcdir)/putenv_r.c'; fi` - -lib_a-setenv.o: setenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setenv.o `test -f 'setenv.c' || echo '$(srcdir)/'`setenv.c - -lib_a-setenv.obj: setenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setenv.obj `if test -f 'setenv.c'; then $(CYGPATH_W) 'setenv.c'; else $(CYGPATH_W) '$(srcdir)/setenv.c'; fi` - -lib_a-setenv_r.o: setenv_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setenv_r.o `test -f 'setenv_r.c' || echo '$(srcdir)/'`setenv_r.c - -lib_a-setenv_r.obj: setenv_r.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setenv_r.obj `if test -f 'setenv_r.c'; then $(CYGPATH_W) 'setenv_r.c'; else $(CYGPATH_W) '$(srcdir)/setenv_r.c'; fi` - -lib_a-system.o: system.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-system.o `test -f 'system.c' || echo '$(srcdir)/'`system.c - -lib_a-system.obj: system.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-system.obj `if test -f 'system.c'; then $(CYGPATH_W) 'system.c'; else $(CYGPATH_W) '$(srcdir)/system.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-am: -check: check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-noinstLTLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-exec install-exec-am install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am - -objectlist.awk.in: $(noinst_LTLIBRARIES) - -rm -f objectlist.awk.in - for i in `ls *.lo` ; \ - do \ - echo $$i `pwd`/$$i >> objectlist.awk.in ; \ - done - -$(lpfx)mallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)freer.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_FREE -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)reallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_REALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)callocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_CALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)cfreer.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_CFREE -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)malignr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MEMALIGN -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)vallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_VALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)pvallocr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_PVALLOC -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)mallinfor.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLINFO -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)mallstatsr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOC_STATS -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)msizer.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOC_USABLE_SIZE -c $(srcdir)/mallocr.c -o $@ - -$(lpfx)malloptr.$(oext): mallocr.c - $(MALLOC_COMPILE) -DDEFINE_MALLOPT -c $(srcdir)/mallocr.c -o $@ - -.c.def: - $(CHEW) < $< > $*.def 2> $*.ref - touch stmp-def - -doc: $(CHEWOUT_FILES) - cat $(srcdir)/stdlib.tex >> $(TARGETDOC) - -$(lpfx)dtoa.$(oext): dtoa.c mprec.h -$(lpfx)ldtoa.$(oext): ldtoa.c mprec.h -$(lpfx)ecvtbuf.$(oext): ecvtbuf.c mprec.h -$(lpfx)mbtowc_r.$(oext): mbtowc_r.c mbctype.h - $(LIB_COMPILE) -c -fshort-enums $(srcdir)/mbtowc_r.c -o $@ - -$(lpfx)mprec.$(oext): mprec.c mprec.h -$(lpfx)strtod.$(oext): strtod.c mprec.h -$(lpfx)gdtoa-gethex.$(oext): gdtoa-gethex.c mprec.h -$(lpfx)gdtoa-hexnan.$(oext): gdtoa-hexnan.c mprec.h -$(lpfx)wctomb_r.$(oext): wctomb_r.c mbctype.h -$(lpfx)drand48.$(oext): drand48.c rand48.h -$(lpfx)erand48.$(oext): erand48.c rand48.h -$(lpfx)jrand48.$(oext): jrand48.c rand48.h -$(lpfx)lcong48.$(oext): lcong48.c rand48.h -$(lpfx)lrand48.$(oext): lrand48.c rand48.h -$(lpfx)mrand48.$(oext): mrand48.c rand48.h -$(lpfx)nrand48.$(oext): nrand48.c rand48.h -$(lpfx)rand48.$(oext): rand48.c rand48.h -$(lpfx)seed48.$(oext): seed48.c rand48.h -$(lpfx)srand48.$(oext): srand48.c rand48.h -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/newlib/libc/stdlib/_Exit.c b/newlib/libc/stdlib/_Exit.c deleted file mode 100644 index 3f189a21f..000000000 --- a/newlib/libc/stdlib/_Exit.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -FUNCTION -<<_Exit>>---end program execution with no cleanup processing - -INDEX - _Exit - -ANSI_SYNOPSIS - #include <stdlib.h> - void _Exit(int <[code]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - void _Exit(<[code]>) - int <[code]>; - -DESCRIPTION -Use <<_Exit>> to return control from a program to the host operating -environment. Use the argument <[code]> to pass an exit status to the -operating environment: two particular values, <<EXIT_SUCCESS>> and -<<EXIT_FAILURE>>, are defined in `<<stdlib.h>>' to indicate success or -failure in a portable fashion. - -<<_Exit>> differs from <<exit>> in that it does not run any -application-defined cleanup functions registered with <<atexit>> and -it does not clean up files and streams. It is identical to <<_exit>>. - -RETURNS -<<_Exit>> does not return to its caller. - -PORTABILITY -<<_Exit>> is defined by the C99 standard. - -Supporting OS subroutines required: <<_exit>>. -*/ - -#include <stdlib.h> -#include <unistd.h> /* for _exit() declaration */ -#include <reent.h> - -void -_DEFUN (_Exit, (code), - int code) -{ - _exit (code); -} diff --git a/newlib/libc/stdlib/__adjust.c b/newlib/libc/stdlib/__adjust.c deleted file mode 100644 index d5c70758b..000000000 --- a/newlib/libc/stdlib/__adjust.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * return (*acc) scaled by 10**dexp. - */ - -#include <_ansi.h> -#include <reent.h> -#include "std.h" - -#define abs(x) (((x) < 0) ? -(x) : (x)) - -double -_DEFUN (__adjust, (ptr, acc, dexp, sign), - struct _reent *ptr _AND - double *acc _AND - int dexp _AND - int sign) - /* *acc the 64 bit accumulator */ - /* dexp decimal exponent */ - /* sign sign flag */ -{ - double r; - - if (dexp > MAXE) - { - ptr->_errno = ERANGE; - return (sign) ? -HUGE_VAL : HUGE_VAL; - } - else if (dexp < MINE) - { - ptr->_errno = ERANGE; - return 0.0; - } - - r = *acc; - if (sign) - r = -r; - if (dexp == 0) - return r; - - if (dexp < 0) - return r / __exp10 (abs (dexp)); - else - return r * __exp10 (dexp); -} diff --git a/newlib/libc/stdlib/__atexit.c b/newlib/libc/stdlib/__atexit.c deleted file mode 100644 index 4f0b67c9e..000000000 --- a/newlib/libc/stdlib/__atexit.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Common routine to implement atexit-like functionality. - */ - -#include <stddef.h> -#include <stdlib.h> -#include <reent.h> -#include <sys/lock.h> -#include "atexit.h" - -/* Make this a weak reference to avoid pulling in malloc. */ -void * malloc(size_t) _ATTRIBUTE((__weak__)); - -/* - * Register a function to be performed at exit or on shared library unload. - */ - -int -_DEFUN (__register_exitproc, - (type, fn, arg, d), - int type _AND - void (*fn) (void) _AND - void *arg _AND - void *d) -{ - struct _on_exit_args * args; - register struct _atexit *p; - -#ifndef __SINGLE_THREAD__ - __LOCK_INIT(static, lock); - - __lock_acquire(lock); -#endif - - p = _GLOBAL_REENT->_atexit; - if (p == NULL) - _GLOBAL_REENT->_atexit = p = &_GLOBAL_REENT->_atexit0; - if (p->_ind >= _ATEXIT_SIZE) - { -#ifndef _ATEXIT_DYNAMIC_ALLOC - return -1; -#else - /* Don't dynamically allocate the atexit array if malloc is not - available. */ - if (!malloc) - return -1; - - p = (struct _atexit *) malloc (sizeof *p); - if (p == NULL) - { -#ifndef __SINGLE_THREAD__ - __lock_release(lock); -#endif - return -1; - } - p->_ind = 0; - p->_next = _GLOBAL_REENT->_atexit; - _GLOBAL_REENT->_atexit = p; -#ifndef _REENT_SMALL - p->_on_exit_args._fntypes = 0; - p->_on_exit_args._is_cxa = 0; -#endif -#endif - } - - if (type != __et_atexit) - { -#ifdef _REENT_SMALL - args = p->_on_exit_args_ptr; - if (args == NULL) - { - if (malloc) - args = malloc (sizeof * p->_on_exit_args_ptr); - - if (args == NULL) - { -#ifndef __SINGLE_THREAD__ - __lock_release(lock); -#endif - return -1; - } - args->_fntypes = 0; - args->_is_cxa = 0; - p->_on_exit_args_ptr = args; - } -#else - args = &p->_on_exit_args; -#endif - args->_fnargs[p->_ind] = arg; - args->_fntypes |= (1 << p->_ind); - args->_dso_handle[p->_ind] = d; - if (type == __et_cxa) - args->_is_cxa |= (1 << p->_ind); - } - p->_fns[p->_ind++] = fn; -#ifndef __SINGLE_THREAD__ - __lock_release(lock); -#endif - return 0; -} diff --git a/newlib/libc/stdlib/__call_atexit.c b/newlib/libc/stdlib/__call_atexit.c deleted file mode 100644 index e7f956184..000000000 --- a/newlib/libc/stdlib/__call_atexit.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * COmmon routine to call call registered atexit-like routines. - */ - - -#include <stdlib.h> -#include <reent.h> -#include "atexit.h" - -/* Make this a weak reference to avoid pulling in free. */ -void free(void *) _ATTRIBUTE((__weak__)); - -/* - * Call registered exit handlers. If D is null then all handlers are called, - * otherwise only the handlers from that DSO are called. - */ - -void -_DEFUN (__call_exitprocs, (code, d), - int code _AND _PTR d) -{ - register struct _atexit *p; - struct _atexit **lastp; - register struct _on_exit_args * args; - register int n; - int i; - void (*fn) (void); - - restart: - - p = _GLOBAL_REENT->_atexit; - lastp = &_GLOBAL_REENT->_atexit; - while (p) - { -#ifdef _REENT_SMALL - args = p->_on_exit_args_ptr; -#else - args = &p->_on_exit_args; -#endif - for (n = p->_ind - 1; n >= 0; n--) - { - int ind; - - i = 1 << n; - - /* Skip functions not from this dso. */ - if (d && (!args || args->_dso_handle[n] != d)) - continue; - - /* Remove the function now to protect against the - function calling exit recursively. */ - fn = p->_fns[n]; - if (n == p->_ind - 1) - p->_ind--; - else - p->_fns[n] = NULL; - - /* Skip functions that have already been called. */ - if (!fn) - continue; - - ind = p->_ind; - - /* Call the function. */ - if (!args || (args->_fntypes & i) == 0) - fn (); - else if ((args->_is_cxa & i) == 0) - (*((void (*)(int, _PTR)) fn))(code, args->_fnargs[n]); - else - (*((void (*)(_PTR)) fn))(args->_fnargs[n]); - - /* The function we called call atexit and registered another - function (or functions). Call these new functions before - continuing with the already registered functions. */ - if (ind != p->_ind || *lastp != p) - goto restart; - } - -#ifndef _ATEXIT_DYNAMIC_ALLOC - break; -#else - /* Don't dynamically free the atexit array if free is not - available. */ - if (!free) - break; - - /* Move to the next block. Free empty blocks except the last one, - which is part of _GLOBAL_REENT. */ - if (p->_ind == 0 && p->_next) - { - /* Remove empty block from the list. */ - *lastp = p->_next; -#ifdef _REENT_SMALL - if (args) - free (args); -#endif - free (p); - p = *lastp; - } - else - { - lastp = &p->_next; - p = p->_next; - } -#endif - } -} diff --git a/newlib/libc/stdlib/__exp10.c b/newlib/libc/stdlib/__exp10.c deleted file mode 100644 index 4e368b830..000000000 --- a/newlib/libc/stdlib/__exp10.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * compute 10**x by successive squaring. - */ - -#include <_ansi.h> -#include "std.h" - -double -_DEFUN (__exp10, (x), - unsigned x) -{ - static _CONST double powtab[] = - {1.0, - 10.0, - 100.0, - 1000.0, - 10000.0}; - - if (x < (sizeof (powtab) / sizeof (double))) - return powtab[x]; - else if (x & 1) - { - return 10.0 * __exp10 (x - 1); - } - else - { - double n = __exp10 (x / 2); - return n * n; - } -} diff --git a/newlib/libc/stdlib/__ten_mu.c b/newlib/libc/stdlib/__ten_mu.c deleted file mode 100644 index 637197be2..000000000 --- a/newlib/libc/stdlib/__ten_mu.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * [atw] multiply 64 bit accumulator by 10 and add digit. - * The KA/CA way to do this should be to use - * a 64-bit integer internally and use "adjust" to - * convert it to float at the end of processing. - */ - -#include <_ansi.h> -#include "std.h" - -int -_DEFUN (__ten_mul, (acc, digit), - double *acc _AND - int digit) -{ - /* - * [atw] Crude, but effective (at least on a KB)... - */ - - *acc *= 10; - *acc += digit; - - return 0; /* no overflow */ -} diff --git a/newlib/libc/stdlib/a64l.c b/newlib/libc/stdlib/a64l.c deleted file mode 100644 index ee3d40d49..000000000 --- a/newlib/libc/stdlib/a64l.c +++ /dev/null @@ -1,197 +0,0 @@ -/* -FUNCTION -<<a64l>>, <<l64a>>---convert between radix-64 ASCII string and long - -INDEX - a64l -INDEX - l64a - -ANSI_SYNOPSIS - #include <stdlib.h> - long a64l(const char *<[input]>); - char *l64a(long <[input]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - long a64l(<[input]>) - const char *<[input]>; - - char *l64a(<[input]>) - long <[input]>; - -DESCRIPTION -Conversion is performed between long and radix-64 characters. The -<<l64a>> routine transforms up to 32 bits of input value starting from -least significant bits to the most significant bits. The input value -is split up into a maximum of 5 groups of 6 bits and possibly one -group of 2 bits (bits 31 and 30). - -Each group of 6 bits forms a value from 0--63 which is translated into -a character as follows: - -O+ -o 0 = '.' -o 1 = '/' -o 2--11 = '0' to '9' -o 12--37 = 'A' to 'Z' -o 38--63 = 'a' to 'z' -O- - -When the remaining bits are zero or all bits have been translated, a -null terminator is appended to the string. An input value of 0 -results in the empty string. - -The <<a64l>> function performs the reverse translation. Each -character is used to generate a 6-bit value for up to 30 bits and then -a 2-bit value to complete a 32-bit result. The null terminator means -that the remaining digits are 0. An empty input string or NULL string -results in 0L. An invalid string results in undefined behavior. If -the size of a long is greater than 32 bits, the result is sign-extended. - -RETURNS -<<l64a>> returns a null-terminated string of 0 to 6 characters. -<<a64l>> returns the 32-bit translated value from the input character string. - -PORTABILITY -<<l64a>> and <<a64l>> are non-ANSI and are defined by the Single Unix Specification. - -Supporting OS subroutines required: None. -*/ - -#include <_ansi.h> -#include <stdlib.h> -#include <limits.h> - -long -_DEFUN (a64l, (input), - const char *input) -{ - const char *ptr; - char ch; - int i, digit; - unsigned long result = 0; - - if (input == NULL) - return 0; - - ptr = input; - - /* it easiest to go from most significant digit to least so find end of input or up - to 6 characters worth */ - for (i = 0; i < 6; ++i) - { - if (*ptr) - ++ptr; - } - - while (ptr > input) - { - ch = *(--ptr); - -#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) - if (ch >= 'a') - digit = (ch - 'a') + 38; - else if (ch >= 'A') - digit = (ch - 'A') + 12; - else if (ch >= '0') - digit = (ch - '0') + 2; - else if (ch == '/') - digit = 1; - else - digit = 0; -#else /* !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) */ - switch (ch) - { - case '/': - digit = 1; - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - digit = (ch - '0') + 2; - break; - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - digit = (ch - 'A') + 12; - break; - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - digit = (ch - 'a') + 38; - break; - default: - digit = 0; - break; - } -#endif /* !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) */ - - result = (result << 6) + digit; - } - -#if LONG_MAX > 2147483647 - /* for implementations where long is > 32 bits, the result must be sign-extended */ - if (result & 0x80000000) - return (((long)-1 >> 32) << 32) + result; -#endif - - return result; -} - - - - diff --git a/newlib/libc/stdlib/abort.c b/newlib/libc/stdlib/abort.c deleted file mode 100644 index 93f7c2f42..000000000 --- a/newlib/libc/stdlib/abort.c +++ /dev/null @@ -1,67 +0,0 @@ -/* NetWare can not use this implementation of abort. It provides its - own version of abort in clib.nlm. If we can not use clib.nlm, then - we must write abort in sys/netware. */ - -#ifdef ABORT_PROVIDED - -int _dummy_abort = 1; - -#else - -/* -FUNCTION -<<abort>>---abnormal termination of a program - -INDEX - abort - -ANSI_SYNOPSIS - #include <stdlib.h> - void abort(void); - -TRAD_SYNOPSIS - #include <stdlib.h> - void abort(); - -DESCRIPTION -Use <<abort>> to signal that your program has detected a condition it -cannot deal with. Normally, <<abort>> ends your program's execution. - -Before terminating your program, <<abort>> raises the exception <<SIGABRT>> -(using `<<raise(SIGABRT)>>'). If you have used <<signal>> to register -an exception handler for this condition, that handler has the -opportunity to retain control, thereby avoiding program termination. - -In this implementation, <<abort>> does not perform any stream- or -file-related cleanup (the host environment may do so; if not, you can -arrange for your program to do its own cleanup with a <<SIGABRT>> -exception handler). - -RETURNS -<<abort>> does not return to its caller. - -PORTABILITY -ANSI C requires <<abort>>. - -Supporting OS subroutines required: <<_exit>> and optionally, <<write>>. -*/ - -#include <stdlib.h> -#include <unistd.h> -#include <signal.h> - -_VOID -_DEFUN_VOID (abort) -{ -#ifdef ABORT_MESSAGE - write (2, "Abort called\n", sizeof ("Abort called\n")-1); -#endif - - while (1) - { - raise (SIGABRT); - _exit (1); - } -} - -#endif diff --git a/newlib/libc/stdlib/abs.c b/newlib/libc/stdlib/abs.c deleted file mode 100644 index 0308b5729..000000000 --- a/newlib/libc/stdlib/abs.c +++ /dev/null @@ -1,43 +0,0 @@ -/* -FUNCTION -<<abs>>---integer absolute value (magnitude) - -INDEX - abs - -ANSI_SYNOPSIS - #include <stdlib.h> - int abs(int <[i]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int abs(<[i]>) - int <[i]>; - -DESCRIPTION -<<abs>> returns -@tex -$|x|$, -@end tex -the absolute value of <[i]> (also called the magnitude -of <[i]>). That is, if <[i]> is negative, the result is the opposite -of <[i]>, but if <[i]> is nonnegative the result is <[i]>. - -The similar function <<labs>> uses and returns <<long>> rather than <<int>> values. - -RETURNS -The result is a nonnegative integer. - -PORTABILITY -<<abs>> is ANSI. - -No supporting OS subroutines are required. -*/ - -#include <stdlib.h> - -int -_DEFUN (abs, (i), int i) -{ - return (i < 0) ? -i : i; -} diff --git a/newlib/libc/stdlib/assert.c b/newlib/libc/stdlib/assert.c deleted file mode 100644 index 2da329815..000000000 --- a/newlib/libc/stdlib/assert.c +++ /dev/null @@ -1,74 +0,0 @@ -/* -FUNCTION -<<assert>>---macro for debugging diagnostics - -INDEX - assert - -ANSI_SYNOPSIS - #include <assert.h> - void assert(int <[expression]>); - -DESCRIPTION - Use this macro to embed debuggging diagnostic statements in - your programs. The argument <[expression]> should be an - expression which evaluates to true (nonzero) when your program - is working as you intended. - - When <[expression]> evaluates to false (zero), <<assert>> - calls <<abort>>, after first printing a message showing what - failed and where: - -. Assertion failed: <[expression]>, file <[filename]>, line <[lineno]>, function: <[func]> - - If the name of the current function is not known (for example, - when using a C89 compiler that does not understand __func__), - the function location is omitted. - - The macro is defined to permit you to turn off all uses of - <<assert>> at compile time by defining <<NDEBUG>> as a - preprocessor variable. If you do this, the <<assert>> macro - expands to - -. (void(0)) - -RETURNS - <<assert>> does not return a value. - -PORTABILITY - The <<assert>> macro is required by ANSI, as is the behavior - when <<NDEBUG>> is defined. - -Supporting OS subroutines required (only if enabled): <<close>>, <<fstat>>, -<<getpid>>, <<isatty>>, <<kill>>, <<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> - -/* func can be NULL, in which case no function information is given. */ -void -_DEFUN (__assert_func, (file, line, func, failedexpr), - const char *file _AND - int line _AND - const char *func _AND - const char *failedexpr) -{ - fiprintf(stderr, - "assertion \"%s\" failed: file \"%s\", line %d%s%s\n", - failedexpr, file, line, - func ? ", function: " : "", func ? func : ""); - abort(); - /* NOTREACHED */ -} - -void -_DEFUN (__assert, (file, line, failedexpr), - const char *file _AND - int line _AND - const char *failedexpr) -{ - __assert_func (file, line, NULL, failedexpr); - /* NOTREACHED */ -} diff --git a/newlib/libc/stdlib/atexit.c b/newlib/libc/stdlib/atexit.c deleted file mode 100644 index 21ffd6e7b..000000000 --- a/newlib/libc/stdlib/atexit.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * %sccs.include.redist.c% - */ - -/* -FUNCTION -<<atexit>>---request execution of functions at program exit - -INDEX - atexit - -ANSI_SYNOPSIS - #include <stdlib.h> - int atexit (void (*<[function]>)(void)); - -TRAD_SYNOPSIS - #include <stdlib.h> - int atexit ((<[function]>) - void (*<[function]>)(); - -DESCRIPTION -You can use <<atexit>> to enroll functions in a list of functions that -will be called when your program terminates normally. The argument is -a pointer to a user-defined function (which must not require arguments and -must not return a result). - -The functions are kept in a LIFO stack; that is, the last function -enrolled by <<atexit>> will be the first to execute when your program -exits. - -There is no built-in limit to the number of functions you can enroll -in this list; however, after every group of 32 functions is enrolled, -<<atexit>> will call <<malloc>> to get space for the next part of the -list. The initial list of 32 functions is statically allocated, so -you can always count on at least that many slots available. - -RETURNS -<<atexit>> returns <<0>> if it succeeds in enrolling your function, -<<-1>> if it fails (possible only if no space was available for -<<malloc>> to extend the list of functions). - -PORTABILITY -<<atexit>> is required by the ANSI standard, which also specifies that -implementations must support enrolling at least 32 functions. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <stdlib.h> -#include "atexit.h" - -/* - * Register a function to be performed at exit. - */ - -int -_DEFUN (atexit, - (fn), - _VOID _EXFUN ((*fn), (_VOID))) -{ - return __register_exitproc (__et_atexit, fn, NULL, NULL); -} diff --git a/newlib/libc/stdlib/atexit.h b/newlib/libc/stdlib/atexit.h deleted file mode 100644 index e37a146a0..000000000 --- a/newlib/libc/stdlib/atexit.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Common definitions for atexit-like routines - */ - -enum __atexit_types -{ - __et_atexit, - __et_onexit, - __et_cxa -}; - -void __call_exitprocs _PARAMS ((int, _PTR)); -int __register_exitproc _PARAMS ((int, void (*fn) (void), _PTR, _PTR)); - diff --git a/newlib/libc/stdlib/atof.c b/newlib/libc/stdlib/atof.c deleted file mode 100644 index 8497f6807..000000000 --- a/newlib/libc/stdlib/atof.c +++ /dev/null @@ -1,72 +0,0 @@ -/* -FUNCTION - <<atof>>, <<atoff>>---string to double or float - -INDEX - atof -INDEX - atoff - -ANSI_SYNOPSIS - #include <stdlib.h> - double atof(const char *<[s]>); - float atoff(const char *<[s]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - double atof(<[s]>) - char *<[s]>; - - float atoff(<[s]>) - char *<[s]>; - -DESCRIPTION -<<atof>> converts the initial portion of a string to a <<double>>. -<<atoff>> converts the initial portion of a string to a <<float>>. - -The functions parse the character string <[s]>, -locating a substring which can be converted to a floating-point -value. The substring must match the format: -. [+|-]<[digits]>[.][<[digits]>][(e|E)[+|-]<[digits]>] -The substring converted is the longest initial -fragment of <[s]> that has the expected format, beginning with -the first non-whitespace character. The substring -is empty if <<str>> is empty, consists entirely -of whitespace, or if the first non-whitespace character is -something other than <<+>>, <<->>, <<.>>, or a digit. - -<<atof(<[s]>)>> is implemented as <<strtod(<[s]>, NULL)>>. -<<atoff(<[s]>)>> is implemented as <<strtof(<[s]>, NULL)>>. - -RETURNS -<<atof>> returns the converted substring value, if any, as a -<<double>>; or <<0.0>>, if no conversion could be performed. -If the correct value is out of the range of representable values, plus -or minus <<HUGE_VAL>> is returned, and <<ERANGE>> is stored in -<<errno>>. -If the correct value would cause underflow, <<0.0>> is returned -and <<ERANGE>> is stored in <<errno>>. - -<<atoff>> obeys the same rules as <<atof>>, except that it -returns a <<float>>. - -PORTABILITY -<<atof>> is ANSI C. <<atof>>, <<atoi>>, and <<atol>> are subsumed by <<strod>> -and <<strol>>, but are used extensively in existing code. These functions are -less reliable, but may be faster if the argument is verified to be in a valid -range. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - - -#include <stdlib.h> -#include <_ansi.h> - -double -_DEFUN (atof, (s), - _CONST char *s) -{ - return strtod (s, NULL); -} diff --git a/newlib/libc/stdlib/atoff.c b/newlib/libc/stdlib/atoff.c deleted file mode 100644 index c97b78fb1..000000000 --- a/newlib/libc/stdlib/atoff.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <stdlib.h> -#include <_ansi.h> - -float -_DEFUN (atoff, (s), - _CONST char *s) -{ - return strtof (s, NULL); -} diff --git a/newlib/libc/stdlib/atoi.c b/newlib/libc/stdlib/atoi.c deleted file mode 100644 index 6156eda4d..000000000 --- a/newlib/libc/stdlib/atoi.c +++ /dev/null @@ -1,81 +0,0 @@ -/* -FUNCTION - <<atoi>>, <<atol>>---string to integer - -INDEX - atoi -INDEX - atol -INDEX - _atoi_r -INDEX - _atol_r - -ANSI_SYNOPSIS - #include <stdlib.h> - int atoi(const char *<[s]>); - long atol(const char *<[s]>); - int _atoi_r(struct _reent *<[ptr]>, const char *<[s]>); - long _atol_r(struct _reent *<[ptr]>, const char *<[s]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int atoi(<[s]>) - char *<[s]>; - - long atol(<[s]>) - char *<[s]>; - - int _atoi_r(<[ptr]>, <[s]>) - struct _reent *<[ptr]>; - char *<[s]>; - - long _atol_r(<[ptr]>, <[s]>) - struct _reent *<[ptr]>; - char *<[s]>; - - -DESCRIPTION - <<atoi>> converts the initial portion of a string to an <<int>>. - <<atol>> converts the initial portion of a string to a <<long>>. - - <<atoi(s)>> is implemented as <<(int)strtol(s, NULL, 10).>> - <<atol(s)>> is implemented as <<strtol(s, NULL, 10).>> - - <<_atoi_r>> and <<_atol_r>> are reentrant versions of <<atoi>> and - <<atol>> respectively, passing the reentrancy struct pointer. - -RETURNS - The functions return the converted value, if any. If no conversion was - made, <<0>> is returned. - -PORTABILITY -<<atoi>>, <<atol>> are ANSI. - -No supporting OS subroutines are required. -*/ - -/* - * Andy Wilson, 2-Oct-89. - */ - -#include <stdlib.h> -#include <_ansi.h> - -#ifndef _REENT_ONLY -int -_DEFUN (atoi, (s), - _CONST char *s) -{ - return (int) strtol (s, NULL, 10); -} -#endif /* !_REENT_ONLY */ - -int -_DEFUN (_atoi_r, (s), - struct _reent *ptr _AND - _CONST char *s) -{ - return (int) _strtol_r (ptr, s, NULL, 10); -} - diff --git a/newlib/libc/stdlib/atol.c b/newlib/libc/stdlib/atol.c deleted file mode 100644 index 8d0e5cd0b..000000000 --- a/newlib/libc/stdlib/atol.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Andy Wilson, 2-Oct-89. - */ - -#include <stdlib.h> -#include <_ansi.h> - -#ifndef _REENT_ONLY -long -_DEFUN (atol, (s), _CONST char *s) -{ - return strtol (s, NULL, 10); -} -#endif /* !_REENT_ONLY */ - -long -_DEFUN (_atol_r, (ptr, s), struct _reent *ptr _AND _CONST char *s) -{ - return _strtol_r (ptr, s, NULL, 10); -} - diff --git a/newlib/libc/stdlib/atoll.c b/newlib/libc/stdlib/atoll.c deleted file mode 100644 index a6abd9595..000000000 --- a/newlib/libc/stdlib/atoll.c +++ /dev/null @@ -1,94 +0,0 @@ -/* -FUNCTION -<<atoll>>---convert a string to a long long integer - -INDEX - atoll -INDEX - _atoll_r - -ANSI_SYNOPSIS - #include <stdlib.h> - long long atoll(const char *<[str]>); - long long _atoll_r(struct _reent *<[ptr]>, const char *<[str]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - long long atoll(<[str]>) - const char *<[str]>; - - long long _atoll_r(<[ptr]>, <[str]>) - struct _reent *<[ptr]>; - const char *<[str]>; - -DESCRIPTION -The function <<atoll>> converts the initial portion of the string -pointed to by <<*<[str]>>> to a type <<long long>>. A call to -atoll(str) in this implementation is equivalent to -strtoll(str, (char **)NULL, 10) including behavior on error. - -The alternate function <<_atoll_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - - -RETURNS -The converted value. - -PORTABILITY -<<atoll>> is ISO 9899 (C99) and POSIX 1003.1-2001 compatable. - -No supporting OS subroutines are required. -*/ - -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <stdlib.h> -#include <stddef.h> - -#ifndef _REENT_ONLY -long long -_DEFUN(atoll, (str), - _CONST char *str) -{ - return strtoll(str, (char **)NULL, 10); -} -#endif /* !_REENT_ONLY */ - -long long -_DEFUN(_atoll_r, (ptr, str), - struct _reent *ptr _AND - _CONST char *str) -{ - return _strtoll_r(ptr, str, (char **)NULL, 10); -} diff --git a/newlib/libc/stdlib/btowc.c b/newlib/libc/stdlib/btowc.c deleted file mode 100644 index 847d7ce1a..000000000 --- a/newlib/libc/stdlib/btowc.c +++ /dev/null @@ -1,28 +0,0 @@ -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <reent.h> -#include <string.h> - -wint_t -btowc (int c) -{ - mbstate_t mbs; - int retval = 0; - wchar_t pwc; - unsigned char b; - - b = (unsigned char)c; - - /* Put mbs in initial state. */ - memset (&mbs, '\0', sizeof (mbs)); - - _REENT_CHECK_MISC(_REENT); - - retval = _mbtowc_r (_REENT, &pwc, &b, 1, &mbs); - - if (c == EOF || retval != 1) - return WEOF; - else - return (wint_t)pwc; -} diff --git a/newlib/libc/stdlib/calloc.c b/newlib/libc/stdlib/calloc.c deleted file mode 100644 index 4415c6591..000000000 --- a/newlib/libc/stdlib/calloc.c +++ /dev/null @@ -1,69 +0,0 @@ -#ifdef MALLOC_PROVIDED -int _dummy_calloc = 1; -#else -/* -FUNCTION -<<calloc>>---allocate space for arrays - -INDEX - calloc - -INDEX - _calloc_r - -ANSI_SYNOPSIS - #include <stdlib.h> - void *calloc(size_t <[n]>, size_t <[s]>); - void *_calloc_r(void *<[reent]>, size_t <[n]>, size_t <[s]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - char *calloc(<[n]>, <[s]>) - size_t <[n]>, <[s]>; - - char *_calloc_r(<[reent]>, <[n]>, <[s]>) - char *<[reent]>; - size_t <[n]>; - size_t <[s]>; - - - -DESCRIPTION -Use <<calloc>> to request a block of memory sufficient to hold an -array of <[n]> elements, each of which has size <[s]>. - -The memory allocated by <<calloc>> comes out of the same memory pool -used by <<malloc>>, but the memory block is initialized to all zero -bytes. (To avoid the overhead of initializing the space, use -<<malloc>> instead.) - -The alternate function <<_calloc_r>> is reentrant. -The extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -If successful, a pointer to the newly allocated space. - -If unsuccessful, <<NULL>>. - -PORTABILITY -<<calloc>> is ANSI. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <string.h> -#include <stdlib.h> - -#ifndef _REENT_ONLY - -_PTR -_DEFUN (calloc, (n, size), - size_t n _AND - size_t size) -{ - return _calloc_r (_REENT, n, size); -} - -#endif -#endif /* MALLOC_PROVIDED */ diff --git a/newlib/libc/stdlib/cxa_atexit.c b/newlib/libc/stdlib/cxa_atexit.c deleted file mode 100644 index 8c39236de..000000000 --- a/newlib/libc/stdlib/cxa_atexit.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Implementation of __cxa_atexit. - */ - -#include <stddef.h> -#include <stdlib.h> -#include <reent.h> -#include <sys/lock.h> -#include "atexit.h" - -/* - * Register a function to be performed at exit or DSO unload. - */ - -int -_DEFUN (__cxa_atexit, - (fn, arg, d), - void (*fn) (void *) _AND - void *arg _AND - void *d) -{ - return __register_exitproc (__et_cxa, (void (*)(void)) fn, arg, d); -} diff --git a/newlib/libc/stdlib/cxa_finalize.c b/newlib/libc/stdlib/cxa_finalize.c deleted file mode 100644 index 17d0526a7..000000000 --- a/newlib/libc/stdlib/cxa_finalize.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Implementation if __cxa_finalize. - */ - - -#include <stdlib.h> -#include <reent.h> -#include "atexit.h" - -/* - * Call registered exit handlers. If D is null then all handlers are called, - * otherwise only the handlers from that DSO are called. - */ - -void -_DEFUN (__cxa_finalize, (d), - void * d) -{ - __call_exitprocs (0, d); -} diff --git a/newlib/libc/stdlib/div.c b/newlib/libc/stdlib/div.c deleted file mode 100644 index 816c3fb3c..000000000 --- a/newlib/libc/stdlib/div.c +++ /dev/null @@ -1,132 +0,0 @@ -/* -FUNCTION -<<div>>---divide two integers - -INDEX - div - -ANSI_SYNOPSIS - #include <stdlib.h> - div_t div(int <[n]>, int <[d]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - div_t div(<[n]>, <[d]>) - int <[n]>, <[d]>; - -DESCRIPTION -Divide -@tex -$n/d$, -@end tex -@ifnottex -<[n]>/<[d]>, -@end ifnottex -returning quotient and remainder as two integers in a structure <<div_t>>. - -RETURNS -The result is represented with the structure - -. typedef struct -. { -. int quot; -. int rem; -. } div_t; - -where the <<quot>> field represents the quotient, and <<rem>> the -remainder. For nonzero <[d]>, if `<<<[r]> = div(<[n]>,<[d]>);>>' then -<[n]> equals `<<<[r]>.rem + <[d]>*<[r]>.quot>>'. - -To divide <<long>> rather than <<int>> values, use the similar -function <<ldiv>>. - -PORTABILITY -<<div>> is ANSI. - -No supporting OS subroutines are required. -*/ - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <stdlib.h> /* div_t */ - -div_t -_DEFUN (div, (num, denom), - int num _AND - int denom) -{ - div_t r; - - r.quot = num / denom; - r.rem = num % denom; - /* - * The ANSI standard says that |r.quot| <= |n/d|, where - * n/d is to be computed in infinite precision. In other - * words, we should always truncate the quotient towards - * 0, never -infinity or +infinity. - * - * Machine division and remainer may work either way when - * one or both of n or d is negative. If only one is - * negative and r.quot has been truncated towards -inf, - * r.rem will have the same sign as denom and the opposite - * sign of num; if both are negative and r.quot has been - * truncated towards -inf, r.rem will be positive (will - * have the opposite sign of num). These are considered - * `wrong'. - * - * If both are num and denom are positive, r will always - * be positive. - * - * This all boils down to: - * if num >= 0, but r.rem < 0, we got the wrong answer. - * In that case, to get the right answer, add 1 to r.quot and - * subtract denom from r.rem. - * if num < 0, but r.rem > 0, we also have the wrong answer. - * In this case, to get the right answer, subtract 1 from r.quot and - * add denom to r.rem. - */ - if (num >= 0 && r.rem < 0) { - ++r.quot; - r.rem -= denom; - } - else if (num < 0 && r.rem > 0) { - --r.quot; - r.rem += denom; - } - return (r); -} diff --git a/newlib/libc/stdlib/drand48.c b/newlib/libc/stdlib/drand48.c deleted file mode 100644 index 89fe6af1d..000000000 --- a/newlib/libc/stdlib/drand48.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -double -_DEFUN (_drand48_r, (r), - struct _reent *r) -{ - _REENT_CHECK_RAND48(r); - return _erand48_r(r, __rand48_seed); -} - -#ifndef _REENT_ONLY -double -_DEFUN_VOID (drand48) -{ - return _drand48_r (_REENT); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/dtoa.c b/newlib/libc/stdlib/dtoa.c deleted file mode 100644 index c72ffac5e..000000000 --- a/newlib/libc/stdlib/dtoa.c +++ /dev/null @@ -1,862 +0,0 @@ -/**************************************************************** - * - * The author of this software is David M. Gay. - * - * Copyright (c) 1991 by AT&T. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - ***************************************************************/ - -/* Please send bug reports to - David M. Gay - AT&T Bell Laboratories, Room 2C-463 - 600 Mountain Avenue - Murray Hill, NJ 07974-2070 - U.S.A. - dmg@research.att.com or research!dmg - */ - -#include <_ansi.h> -#include <stdlib.h> -#include <reent.h> -#include <string.h> -#include "mprec.h" - -static int -_DEFUN (quorem, - (b, S), - _Bigint * b _AND _Bigint * S) -{ - int n; - __Long borrow, y; - __ULong carry, q, ys; - __ULong *bx, *bxe, *sx, *sxe; -#ifdef Pack_32 - __Long z; - __ULong si, zs; -#endif - - n = S->_wds; -#ifdef DEBUG - /*debug*/ if (b->_wds > n) - /*debug*/ Bug ("oversize b in quorem"); -#endif - if (b->_wds < n) - return 0; - sx = S->_x; - sxe = sx + --n; - bx = b->_x; - bxe = bx + n; - q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ -#ifdef DEBUG - /*debug*/ if (q > 9) - /*debug*/ Bug ("oversized quotient in quorem"); -#endif - if (q) - { - borrow = 0; - carry = 0; - do - { -#ifdef Pack_32 - si = *sx++; - ys = (si & 0xffff) * q + carry; - zs = (si >> 16) * q + (ys >> 16); - carry = zs >> 16; - y = (*bx & 0xffff) - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - z = (*bx >> 16) - (zs & 0xffff) + borrow; - borrow = z >> 16; - Sign_Extend (borrow, z); - Storeinc (bx, z, y); -#else - ys = *sx++ * q + carry; - carry = ys >> 16; - y = *bx - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - *bx++ = y & 0xffff; -#endif - } - while (sx <= sxe); - if (!*bxe) - { - bx = b->_x; - while (--bxe > bx && !*bxe) - --n; - b->_wds = n; - } - } - if (cmp (b, S) >= 0) - { - q++; - borrow = 0; - carry = 0; - bx = b->_x; - sx = S->_x; - do - { -#ifdef Pack_32 - si = *sx++; - ys = (si & 0xffff) + carry; - zs = (si >> 16) + (ys >> 16); - carry = zs >> 16; - y = (*bx & 0xffff) - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - z = (*bx >> 16) - (zs & 0xffff) + borrow; - borrow = z >> 16; - Sign_Extend (borrow, z); - Storeinc (bx, z, y); -#else - ys = *sx++ + carry; - carry = ys >> 16; - y = *bx - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - *bx++ = y & 0xffff; -#endif - } - while (sx <= sxe); - bx = b->_x; - bxe = bx + n; - if (!*bxe) - { - while (--bxe > bx && !*bxe) - --n; - b->_wds = n; - } - } - return q; -} - -/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string. - * - * Inspired by "How to Print Floating-Point Numbers Accurately" by - * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101]. - * - * Modifications: - * 1. Rather than iterating, we use a simple numeric overestimate - * to determine k = floor(log10(d)). We scale relevant - * quantities using O(log2(k)) rather than O(k) multiplications. - * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't - * try to generate digits strictly left to right. Instead, we - * compute with fewer bits and propagate the carry if necessary - * when rounding the final digit up. This is often faster. - * 3. Under the assumption that input will be rounded nearest, - * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22. - * That is, we allow equality in stopping tests when the - * round-nearest rule will give the same floating-point value - * as would satisfaction of the stopping test with strict - * inequality. - * 4. We remove common factors of powers of 2 from relevant - * quantities. - * 5. When converting floating-point integers less than 1e16, - * we use floating-point arithmetic rather than resorting - * to multiple-precision integers. - * 6. When asked to produce fewer than 15 digits, we first try - * to get by with floating-point arithmetic; we resort to - * multiple-precision integer arithmetic only if we cannot - * guarantee that the floating-point calculation has given - * the correctly rounded result. For k requested digits and - * "uniformly" distributed input, the probability is - * something like 10^(k-15) that we must resort to the long - * calculation. - */ - - -char * -_DEFUN (_dtoa_r, - (ptr, _d, mode, ndigits, decpt, sign, rve), - struct _reent *ptr _AND - double _d _AND - int mode _AND - int ndigits _AND - int *decpt _AND - int *sign _AND - char **rve) -{ - /* Arguments ndigits, decpt, sign are similar to those - of ecvt and fcvt; trailing zeros are suppressed from - the returned string. If not null, *rve is set to point - to the end of the return value. If d is +-Infinity or NaN, - then *decpt is set to 9999. - - mode: - 0 ==> shortest string that yields d when read in - and rounded to nearest. - 1 ==> like 0, but with Steele & White stopping rule; - e.g. with IEEE P754 arithmetic , mode 0 gives - 1e23 whereas mode 1 gives 9.999999999999999e22. - 2 ==> max(1,ndigits) significant digits. This gives a - return value similar to that of ecvt, except - that trailing zeros are suppressed. - 3 ==> through ndigits past the decimal point. This - gives a return value similar to that from fcvt, - except that trailing zeros are suppressed, and - ndigits can be negative. - 4-9 should give the same return values as 2-3, i.e., - 4 <= mode <= 9 ==> same return as mode - 2 + (mode & 1). These modes are mainly for - debugging; often they run slower but sometimes - faster than modes 2-3. - 4,5,8,9 ==> left-to-right digit generation. - 6-9 ==> don't try fast floating-point estimate - (if applicable). - - Values of mode other than 0-9 are treated as mode 0. - - Sufficient space is allocated to the return value - to hold the suppressed trailing zeros. - */ - - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, j, j1, k, k0, - k_check, leftright, m2, m5, s2, s5, spec_case, try_quick; - union double_union d, d2, eps; - __Long L; -#ifndef Sudden_Underflow - int denorm; - __ULong x; -#endif - _Bigint *b, *b1, *delta, *mlo = NULL, *mhi, *S; - double ds; - char *s, *s0; - - d.d = _d; - - _REENT_CHECK_MP(ptr); - if (_REENT_MP_RESULT(ptr)) - { - _REENT_MP_RESULT(ptr)->_k = _REENT_MP_RESULT_K(ptr); - _REENT_MP_RESULT(ptr)->_maxwds = 1 << _REENT_MP_RESULT_K(ptr); - Bfree (ptr, _REENT_MP_RESULT(ptr)); - _REENT_MP_RESULT(ptr) = 0; - } - - if (word0 (d) & Sign_bit) - { - /* set sign for everything, including 0's and NaNs */ - *sign = 1; - word0 (d) &= ~Sign_bit; /* clear sign bit */ - } - else - *sign = 0; - -#if defined(IEEE_Arith) + defined(VAX) -#ifdef IEEE_Arith - if ((word0 (d) & Exp_mask) == Exp_mask) -#else - if (word0 (d) == 0x8000) -#endif - { - /* Infinity or NaN */ - *decpt = 9999; - s = -#ifdef IEEE_Arith - !word1 (d) && !(word0 (d) & 0xfffff) ? "Infinity" : -#endif - "NaN"; - if (rve) - *rve = -#ifdef IEEE_Arith - s[3] ? s + 8 : -#endif - s + 3; - return s; - } -#endif -#ifdef IBM - d.d += 0; /* normalize */ -#endif - if (!d.d) - { - *decpt = 1; - s = "0"; - if (rve) - *rve = s + 1; - return s; - } - - b = d2b (ptr, d.d, &be, &bbits); -#ifdef Sudden_Underflow - i = (int) (word0 (d) >> Exp_shift1 & (Exp_mask >> Exp_shift1)); -#else - if ((i = (int) (word0 (d) >> Exp_shift1 & (Exp_mask >> Exp_shift1))) != 0) - { -#endif - d2.d = d.d; - word0 (d2) &= Frac_mask1; - word0 (d2) |= Exp_11; -#ifdef IBM - if (j = 11 - hi0bits (word0 (d2) & Frac_mask)) - d2.d /= 1 << j; -#endif - - /* log(x) ~=~ log(1.5) + (x-1.5)/1.5 - * log10(x) = log(x) / log(10) - * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10)) - * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2) - * - * This suggests computing an approximation k to log10(d) by - * - * k = (i - Bias)*0.301029995663981 - * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 ); - * - * We want k to be too large rather than too small. - * The error in the first-order Taylor series approximation - * is in our favor, so we just round up the constant enough - * to compensate for any error in the multiplication of - * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077, - * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14, - * adding 1e-13 to the constant term more than suffices. - * Hence we adjust the constant term to 0.1760912590558. - * (We could get a more accurate k by invoking log10, - * but this is probably not worthwhile.) - */ - - i -= Bias; -#ifdef IBM - i <<= 2; - i += j; -#endif -#ifndef Sudden_Underflow - denorm = 0; - } - else - { - /* d is denormalized */ - - i = bbits + be + (Bias + (P - 1) - 1); -#if defined (_DOUBLE_IS_32BITS) - x = word0 (d) << (32 - i); -#else - x = (i > 32) ? (word0 (d) << (64 - i)) | (word1 (d) >> (i - 32)) - : (word1 (d) << (32 - i)); -#endif - d2.d = x; - word0 (d2) -= 31 * Exp_msk1; /* adjust exponent */ - i -= (Bias + (P - 1) - 1) + 1; - denorm = 1; - } -#endif -#if defined (_DOUBLE_IS_32BITS) - ds = (d2.d - 1.5) * 0.289529651 + 0.176091269 + i * 0.30103001; -#else - ds = (d2.d - 1.5) * 0.289529654602168 + 0.1760912590558 + i * 0.301029995663981; -#endif - k = (int) ds; - if (ds < 0. && ds != k) - k--; /* want k = floor(ds) */ - k_check = 1; - if (k >= 0 && k <= Ten_pmax) - { - if (d.d < tens[k]) - k--; - k_check = 0; - } - j = bbits - i - 1; - if (j >= 0) - { - b2 = 0; - s2 = j; - } - else - { - b2 = -j; - s2 = 0; - } - if (k >= 0) - { - b5 = 0; - s5 = k; - s2 += k; - } - else - { - b2 -= k; - b5 = -k; - s5 = 0; - } - if (mode < 0 || mode > 9) - mode = 0; - try_quick = 1; - if (mode > 5) - { - mode -= 4; - try_quick = 0; - } - leftright = 1; - ilim = ilim1 = -1; - switch (mode) - { - case 0: - case 1: - i = 18; - ndigits = 0; - break; - case 2: - leftright = 0; - /* no break */ - case 4: - if (ndigits <= 0) - ndigits = 1; - ilim = ilim1 = i = ndigits; - break; - case 3: - leftright = 0; - /* no break */ - case 5: - i = ndigits + k + 1; - ilim = i; - ilim1 = i - 1; - if (i <= 0) - i = 1; - } - j = sizeof (__ULong); - for (_REENT_MP_RESULT_K(ptr) = 0; sizeof (_Bigint) - sizeof (__ULong) + j <= i; - j <<= 1) - _REENT_MP_RESULT_K(ptr)++; - _REENT_MP_RESULT(ptr) = Balloc (ptr, _REENT_MP_RESULT_K(ptr)); - s = s0 = (char *) _REENT_MP_RESULT(ptr); - - if (ilim >= 0 && ilim <= Quick_max && try_quick) - { - /* Try to get by with floating-point arithmetic. */ - - i = 0; - d2.d = d.d; - k0 = k; - ilim0 = ilim; - ieps = 2; /* conservative */ - if (k > 0) - { - ds = tens[k & 0xf]; - j = k >> 4; - if (j & Bletch) - { - /* prevent overflows */ - j &= Bletch - 1; - d.d /= bigtens[n_bigtens - 1]; - ieps++; - } - for (; j; j >>= 1, i++) - if (j & 1) - { - ieps++; - ds *= bigtens[i]; - } - d.d /= ds; - } - else if ((j1 = -k) != 0) - { - d.d *= tens[j1 & 0xf]; - for (j = j1 >> 4; j; j >>= 1, i++) - if (j & 1) - { - ieps++; - d.d *= bigtens[i]; - } - } - if (k_check && d.d < 1. && ilim > 0) - { - if (ilim1 <= 0) - goto fast_failed; - ilim = ilim1; - k--; - d.d *= 10.; - ieps++; - } - eps.d = ieps * d.d + 7.; - word0 (eps) -= (P - 1) * Exp_msk1; - if (ilim == 0) - { - S = mhi = 0; - d.d -= 5.; - if (d.d > eps.d) - goto one_digit; - if (d.d < -eps.d) - goto no_digits; - goto fast_failed; - } -#ifndef No_leftright - if (leftright) - { - /* Use Steele & White method of only - * generating digits needed. - */ - eps.d = 0.5 / tens[ilim - 1] - eps.d; - for (i = 0;;) - { - L = d.d; - d.d -= L; - *s++ = '0' + (int) L; - if (d.d < eps.d) - goto ret1; - if (1. - d.d < eps.d) - goto bump_up; - if (++i >= ilim) - break; - eps.d *= 10.; - d.d *= 10.; - } - } - else - { -#endif - /* Generate ilim digits, then fix them up. */ - eps.d *= tens[ilim - 1]; - for (i = 1;; i++, d.d *= 10.) - { - L = d.d; - d.d -= L; - *s++ = '0' + (int) L; - if (i == ilim) - { - if (d.d > 0.5 + eps.d) - goto bump_up; - else if (d.d < 0.5 - eps.d) - { - while (*--s == '0'); - s++; - goto ret1; - } - break; - } - } -#ifndef No_leftright - } -#endif - fast_failed: - s = s0; - d.d = d2.d; - k = k0; - ilim = ilim0; - } - - /* Do we have a "small" integer? */ - - if (be >= 0 && k <= Int_max) - { - /* Yes. */ - ds = tens[k]; - if (ndigits < 0 && ilim <= 0) - { - S = mhi = 0; - if (ilim < 0 || d.d <= 5 * ds) - goto no_digits; - goto one_digit; - } - for (i = 1;; i++) - { - L = d.d / ds; - d.d -= L * ds; -#ifdef Check_FLT_ROUNDS - /* If FLT_ROUNDS == 2, L will usually be high by 1 */ - if (d.d < 0) - { - L--; - d.d += ds; - } -#endif - *s++ = '0' + (int) L; - if (i == ilim) - { - d.d += d.d; - if ((d.d > ds) || ((d.d == ds) && (L & 1))) - { - bump_up: - while (*--s == '9') - if (s == s0) - { - k++; - *s = '0'; - break; - } - ++*s++; - } - break; - } - if (!(d.d *= 10.)) - break; - } - goto ret1; - } - - m2 = b2; - m5 = b5; - mhi = mlo = 0; - if (leftright) - { - if (mode < 2) - { - i = -#ifndef Sudden_Underflow - denorm ? be + (Bias + (P - 1) - 1 + 1) : -#endif -#ifdef IBM - 1 + 4 * P - 3 - bbits + ((bbits + be - 1) & 3); -#else - 1 + P - bbits; -#endif - } - else - { - j = ilim - 1; - if (m5 >= j) - m5 -= j; - else - { - s5 += j -= m5; - b5 += j; - m5 = 0; - } - if ((i = ilim) < 0) - { - m2 -= i; - i = 0; - } - } - b2 += i; - s2 += i; - mhi = i2b (ptr, 1); - } - if (m2 > 0 && s2 > 0) - { - i = m2 < s2 ? m2 : s2; - b2 -= i; - m2 -= i; - s2 -= i; - } - if (b5 > 0) - { - if (leftright) - { - if (m5 > 0) - { - mhi = pow5mult (ptr, mhi, m5); - b1 = mult (ptr, mhi, b); - Bfree (ptr, b); - b = b1; - } - if ((j = b5 - m5) != 0) - b = pow5mult (ptr, b, j); - } - else - b = pow5mult (ptr, b, b5); - } - S = i2b (ptr, 1); - if (s5 > 0) - S = pow5mult (ptr, S, s5); - - /* Check for special case that d is a normalized power of 2. */ - - spec_case = 0; - if (mode < 2) - { - if (!word1 (d) && !(word0 (d) & Bndry_mask) -#ifndef Sudden_Underflow - && word0 (d) & Exp_mask -#endif - ) - { - /* The special case */ - b2 += Log2P; - s2 += Log2P; - spec_case = 1; - } - } - - /* Arrange for convenient computation of quotients: - * shift left if necessary so divisor has 4 leading 0 bits. - * - * Perhaps we should just compute leading 28 bits of S once - * and for all and pass them and a shift to quorem, so it - * can do shifts and ors to compute the numerator for q. - */ - -#ifdef Pack_32 - if ((i = ((s5 ? 32 - hi0bits (S->_x[S->_wds - 1]) : 1) + s2) & 0x1f) != 0) - i = 32 - i; -#else - if ((i = ((s5 ? 32 - hi0bits (S->_x[S->_wds - 1]) : 1) + s2) & 0xf) != 0) - i = 16 - i; -#endif - if (i > 4) - { - i -= 4; - b2 += i; - m2 += i; - s2 += i; - } - else if (i < 4) - { - i += 28; - b2 += i; - m2 += i; - s2 += i; - } - if (b2 > 0) - b = lshift (ptr, b, b2); - if (s2 > 0) - S = lshift (ptr, S, s2); - if (k_check) - { - if (cmp (b, S) < 0) - { - k--; - b = multadd (ptr, b, 10, 0); /* we botched the k estimate */ - if (leftright) - mhi = multadd (ptr, mhi, 10, 0); - ilim = ilim1; - } - } - if (ilim <= 0 && mode > 2) - { - if (ilim < 0 || cmp (b, S = multadd (ptr, S, 5, 0)) <= 0) - { - /* no digits, fcvt style */ - no_digits: - k = -1 - ndigits; - goto ret; - } - one_digit: - *s++ = '1'; - k++; - goto ret; - } - if (leftright) - { - if (m2 > 0) - mhi = lshift (ptr, mhi, m2); - - /* Compute mlo -- check for special case - * that d is a normalized power of 2. - */ - - mlo = mhi; - if (spec_case) - { - mhi = Balloc (ptr, mhi->_k); - Bcopy (mhi, mlo); - mhi = lshift (ptr, mhi, Log2P); - } - - for (i = 1;; i++) - { - dig = quorem (b, S) + '0'; - /* Do we yet have the shortest decimal string - * that will round to d? - */ - j = cmp (b, mlo); - delta = diff (ptr, S, mhi); - j1 = delta->_sign ? 1 : cmp (b, delta); - Bfree (ptr, delta); -#ifndef ROUND_BIASED - if (j1 == 0 && !mode && !(word1 (d) & 1)) - { - if (dig == '9') - goto round_9_up; - if (j > 0) - dig++; - *s++ = dig; - goto ret; - } -#endif - if ((j < 0) || ((j == 0) && !mode -#ifndef ROUND_BIASED - && !(word1 (d) & 1) -#endif - )) - { - if (j1 > 0) - { - b = lshift (ptr, b, 1); - j1 = cmp (b, S); - if (((j1 > 0) || ((j1 == 0) && (dig & 1))) - && dig++ == '9') - goto round_9_up; - } - *s++ = dig; - goto ret; - } - if (j1 > 0) - { - if (dig == '9') - { /* possible if i == 1 */ - round_9_up: - *s++ = '9'; - goto roundoff; - } - *s++ = dig + 1; - goto ret; - } - *s++ = dig; - if (i == ilim) - break; - b = multadd (ptr, b, 10, 0); - if (mlo == mhi) - mlo = mhi = multadd (ptr, mhi, 10, 0); - else - { - mlo = multadd (ptr, mlo, 10, 0); - mhi = multadd (ptr, mhi, 10, 0); - } - } - } - else - for (i = 1;; i++) - { - *s++ = dig = quorem (b, S) + '0'; - if (i >= ilim) - break; - b = multadd (ptr, b, 10, 0); - } - - /* Round off last digit */ - - b = lshift (ptr, b, 1); - j = cmp (b, S); - if ((j > 0) || ((j == 0) && (dig & 1))) - { - roundoff: - while (*--s == '9') - if (s == s0) - { - k++; - *s++ = '1'; - goto ret; - } - ++*s++; - } - else - { - while (*--s == '0'); - s++; - } -ret: - Bfree (ptr, S); - if (mhi) - { - if (mlo && mlo != mhi) - Bfree (ptr, mlo); - Bfree (ptr, mhi); - } -ret1: - Bfree (ptr, b); - *s = 0; - *decpt = k + 1; - if (rve) - *rve = s; - return s0; -} diff --git a/newlib/libc/stdlib/dtoastub.c b/newlib/libc/stdlib/dtoastub.c deleted file mode 100644 index ff2b087f2..000000000 --- a/newlib/libc/stdlib/dtoastub.c +++ /dev/null @@ -1,23 +0,0 @@ -#include <_ansi.h> -#include <stdlib.h> -#include <reent.h> -#include <string.h> - -/* Nothing in newlib actually *calls* dtoa, they all call _dtoa_r, so this - is a safe way of providing it to the user. */ -#ifndef NO_REENT - -char * -_DEFUN (__dtoa, - (d, mode, ndigits, decpt, sign, rve), - double d _AND - int mode _AND - int ndigits _AND - int *decpt _AND - int *sign _AND - char **rve) -{ - return _dtoa_r (_REENT, d, mode, ndigits, decpt, sign, rve); -} - -#endif diff --git a/newlib/libc/stdlib/ecvtbuf.c b/newlib/libc/stdlib/ecvtbuf.c deleted file mode 100644 index 2b9b9eb8a..000000000 --- a/newlib/libc/stdlib/ecvtbuf.c +++ /dev/null @@ -1,469 +0,0 @@ -/* -FUNCTION -<<ecvtbuf>>, <<fcvtbuf>>---double or float to string - -INDEX - ecvtbuf -INDEX - fcvtbuf - -ANSI_SYNOPSIS - #include <stdio.h> - - char *ecvtbuf(double <[val]>, int <[chars]>, int *<[decpt]>, - int *<[sgn]>, char *<[buf]>); - - char *fcvtbuf(double <[val]>, int <[decimals]>, int *<[decpt]>, - int *<[sgn]>, char *<[buf]>); - -TRAD_SYNOPSIS - #include <stdio.h> - - char *ecvtbuf(<[val]>, <[chars]>, <[decpt]>, <[sgn]>, <[buf]>); - double <[val]>; - int <[chars]>; - int *<[decpt]>; - int *<[sgn]>; - char *<[buf]>; - - char *fcvtbuf(<[val]>, <[decimals]>, <[decpt]>, <[sgn]>, <[buf]>); - double <[val]>; - int <[decimals]>; - int *<[decpt]>; - int *<[sgn]>; - char *<[buf]>; - -DESCRIPTION - <<ecvtbuf>> and <<fcvtbuf>> produce (null-terminated) strings - of digits representating the <<double>> number <[val]>. - - The only difference between <<ecvtbuf>> and <<fcvtbuf>> is the - interpretation of the second argument (<[chars]> or - <[decimals]>). For <<ecvtbuf>>, the second argument <[chars]> - specifies the total number of characters to write (which is - also the number of significant digits in the formatted string, - since these two functions write only digits). For <<fcvtbuf>>, - the second argument <[decimals]> specifies the number of - characters to write after the decimal point; all digits for - the integer part of <[val]> are always included. - - Since <<ecvtbuf>> and <<fcvtbuf>> write only digits in the - output string, they record the location of the decimal point - in <<*<[decpt]>>>, and the sign of the number in <<*<[sgn]>>>. - After formatting a number, <<*<[decpt]>>> contains the number - of digits to the left of the decimal point. <<*<[sgn]>>> - contains <<0>> if the number is positive, and <<1>> if it is - negative. For both functions, you supply a pointer <[buf]> to - an area of memory to hold the converted string. - -RETURNS - Both functions return a pointer to <[buf]>, the string - containing a character representation of <[val]>. - -PORTABILITY - Neither function is ANSI C. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdlib.h> -#include <string.h> -#include <reent.h> -#include "mprec.h" -#include "local.h" - -static void -_DEFUN (print_f, (ptr, buf, invalue, ndigit, type, dot, mode), - struct _reent *ptr _AND - char *buf _AND - double invalue _AND - int ndigit _AND - char type _AND - int dot _AND - int mode) -{ - int decpt; - int sign; - char *p, *start, *end; - - start = p = _dtoa_r (ptr, invalue, mode, ndigit, &decpt, &sign, &end); - - if (decpt == 9999) - { - strcpy (buf, p); - return; - } - while (*p && decpt > 0) - { - *buf++ = *p++; - decpt--; - } - /* Even if not in buffer */ - while (decpt > 0) - { - *buf++ = '0'; - decpt--; - } - - if (dot || *p) - { - if (p == start) - *buf++ = '0'; - *buf++ = '.'; - while (decpt < 0 && ndigit > 0) - { - *buf++ = '0'; - decpt++; - ndigit--; - } - - /* Print rest of stuff */ - while (*p && ndigit > 0) - { - *buf++ = *p++; - ndigit--; - } - /* And trailing zeros */ - while (ndigit > 0) - { - *buf++ = '0'; - ndigit--; - } - } - *buf++ = 0; -} - -/* Print number in e format with width chars after. - - TYPE is one of 'e' or 'E'. It may also be one of 'g' or 'G' indicating - that _gcvt is calling us and we should remove trailing zeroes. - - WIDTH is the number of digits of precision after the decimal point. */ - -static void -_DEFUN (print_e, (ptr, buf, invalue, width, type, dot), - struct _reent *ptr _AND - char *buf _AND - double invalue _AND - int width _AND - char type _AND - int dot) -{ - int sign; - char *end; - char *p; - int decpt; - int top; - int ndigit = width; - - p = _dtoa_r (ptr, invalue, 2, width + 1, &decpt, &sign, &end); - - if (decpt == 9999) - { - strcpy (buf, p); - return; - } - - *buf++ = *p++; - if (dot || ndigit != 0) - *buf++ = '.'; - - while (*p && ndigit > 0) - { - *buf++ = *p++; - ndigit--; - } - - /* Add trailing zeroes to fill out to ndigits unless this is 'g' format. - Also, convert g/G to e/E. */ - - if (type == 'g') - type = 'e'; - else if (type == 'G') - type = 'E'; - else - { - while (ndigit > 0) - { - *buf++ = '0'; - ndigit--; - } - } - - /* Add the exponent. */ - - *buf++ = type; - decpt--; - if (decpt < 0) - { - *buf++ = '-'; - decpt = -decpt; - } - else - { - *buf++ = '+'; - } - if (decpt > 99) - { - int top = decpt / 100; - *buf++ = top + '0'; - decpt -= top * 100; - } - top = decpt / 10; - *buf++ = top + '0'; - decpt -= top * 10; - *buf++ = decpt + '0'; - - *buf++ = 0; -} - -#ifndef _REENT_ONLY - -/* Undocumented behaviour: when given NULL as a buffer, return a - pointer to static space in the rent structure. This is only to - support ecvt and fcvt, which aren't ANSI anyway. */ - -char * -_DEFUN (fcvtbuf, (invalue, ndigit, decpt, sign, fcvt_buf), - double invalue _AND - int ndigit _AND - int *decpt _AND - int *sign _AND - char *fcvt_buf) -{ - char *save; - char *p; - char *end; - int done = 0; - - if (fcvt_buf == NULL) - { - if (_REENT->_cvtlen <= ndigit + 35) - { - if ((fcvt_buf = (char *) _realloc_r (_REENT, _REENT->_cvtbuf, - ndigit + 36)) == NULL) - return NULL; - _REENT->_cvtlen = ndigit + 36; - _REENT->_cvtbuf = fcvt_buf; - } - - fcvt_buf = _REENT->_cvtbuf ; - } - - save = fcvt_buf; - - if (invalue < 1.0 && invalue > -1.0) - { - p = _dtoa_r (_REENT, invalue, 2, ndigit, decpt, sign, &end); - } - else - { - p = _dtoa_r (_REENT, invalue, 3, ndigit, decpt, sign, &end); - } - - /* Now copy */ - - done = -*decpt; - while (p < end) - { - *fcvt_buf++ = *p++; - done++; - } - /* And unsuppress the trailing zeroes */ - while (done < ndigit) - { - *fcvt_buf++ = '0'; - done++; - } - *fcvt_buf++ = 0; - return save; -} - -char * -_DEFUN (ecvtbuf, (invalue, ndigit, decpt, sign, fcvt_buf), - double invalue _AND - int ndigit _AND - int *decpt _AND - int *sign _AND - char *fcvt_buf) -{ - char *save; - char *p; - char *end; - int done = 0; - - if (fcvt_buf == NULL) - { - if (_REENT->_cvtlen <= ndigit) - { - if ((fcvt_buf = (char *) _realloc_r (_REENT, _REENT->_cvtbuf, - ndigit + 1)) == NULL) - return NULL; - _REENT->_cvtlen = ndigit + 1; - _REENT->_cvtbuf = fcvt_buf; - } - - fcvt_buf = _REENT->_cvtbuf ; - } - - save = fcvt_buf; - - p = _dtoa_r (_REENT, invalue, 2, ndigit, decpt, sign, &end); - - /* Now copy */ - - while (p < end) - { - *fcvt_buf++ = *p++; - done++; - } - /* And unsuppress the trailing zeroes */ - while (done < ndigit) - { - *fcvt_buf++ = '0'; - done++; - } - *fcvt_buf++ = 0; - return save; -} - -#endif - -char * -_DEFUN (_gcvt, (ptr, invalue, ndigit, buf, type, dot), - struct _reent *ptr _AND - double invalue _AND - int ndigit _AND - char *buf _AND - char type _AND - int dot) -{ - char *save = buf; - - if (invalue < 0) - { - invalue = -invalue; - } - - if (invalue == 0) - { - *buf++ = '0'; - *buf = '\0'; - } - else - /* Which one to print ? - ANSI says that anything with more that 4 zeros after the . or more - than precision digits before is printed in e with the qualification - that trailing zeroes are removed from the fraction portion. */ - - if (0.0001 >= invalue || invalue >= _mprec_log10 (ndigit)) - { - /* We subtract 1 from ndigit because in the 'e' format the precision is - the number of digits after the . but in 'g' format it is the number - of significant digits. - - We defer changing type to e/E so that print_e() can know it's us - calling and thus should remove trailing zeroes. */ - - print_e (ptr, buf, invalue, ndigit - 1, type, dot); - } - else - { - int decpt; - int sign; - char *end; - char *p; - - if (invalue < 1.0) - { - /* what we want is ndigits after the point */ - p = _dtoa_r (ptr, invalue, 3, ndigit, &decpt, &sign, &end); - } - else - { - p = _dtoa_r (ptr, invalue, 2, ndigit, &decpt, &sign, &end); - } - - if (decpt == 9999) - { - strcpy (buf, p); - return save; - } - while (*p && decpt > 0) - { - *buf++ = *p++; - decpt--; - ndigit--; - } - /* Even if not in buffer */ - while (decpt > 0 && ndigit > 0) - { - *buf++ = '0'; - decpt--; - ndigit--; - } - - if (dot || *p) - { - if (buf == save) - *buf++ = '0'; - *buf++ = '.'; - while (decpt < 0 && ndigit > 0) - { - *buf++ = '0'; - decpt++; - ndigit--; - } - - /* Print rest of stuff */ - while (*p && ndigit > 0) - { - *buf++ = *p++; - ndigit--; - } - /* And trailing zeros */ - if (dot) - { - while (ndigit > 0) - { - *buf++ = '0'; - ndigit--; - } - } - } - *buf++ = 0; - } - - return save; -} - -char * -_DEFUN (_dcvt, (ptr, buffer, invalue, precision, width, type, dot), - struct _reent *ptr _AND - char *buffer _AND - double invalue _AND - int precision _AND - int width _AND - char type _AND - int dot) -{ - switch (type) - { - case 'f': - case 'F': - print_f (ptr, buffer, invalue, precision, type, precision == 0 ? dot : 1, 3); - break; - case 'g': - case 'G': - if (precision == 0) - precision = 1; - _gcvt (ptr, invalue, precision, buffer, type, dot); - break; - case 'e': - case 'E': - print_e (ptr, buffer, invalue, precision, type, dot); - } - return buffer; -} diff --git a/newlib/libc/stdlib/efgcvt.c b/newlib/libc/stdlib/efgcvt.c deleted file mode 100644 index ba0250490..000000000 --- a/newlib/libc/stdlib/efgcvt.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -FUNCTION -<<ecvt>>, <<ecvtf>>, <<fcvt>>, <<fcvtf>>---double or float to string - -INDEX - ecvt -INDEX - ecvtf -INDEX - fcvt -INDEX - fcvtf - -ANSI_SYNOPSIS - #include <stdlib.h> - - char *ecvt(double <[val]>, int <[chars]>, int *<[decpt]>, int *<[sgn]>); - char *ecvtf(float <[val]>, int <[chars]>, int *<[decpt]>, int *<[sgn]>); - - char *fcvt(double <[val]>, int <[decimals]>, - int *<[decpt]>, int *<[sgn]>); - char *fcvtf(float <[val]>, int <[decimals]>, - int *<[decpt]>, int *<[sgn]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - - char *ecvt(<[val]>, <[chars]>, <[decpt]>, <[sgn]>); - double <[val]>; - int <[chars]>; - int *<[decpt]>; - int *<[sgn]>; - char *ecvtf(<[val]>, <[chars]>, <[decpt]>, <[sgn]>); - float <[val]>; - int <[chars]>; - int *<[decpt]>; - int *<[sgn]>; - - char *fcvt(<[val]>, <[decimals]>, <[decpt]>, <[sgn]>); - double <[val]>; - int <[decimals]>; - int *<[decpt]>; - int *<[sgn]>; - char *fcvtf(<[val]>, <[decimals]>, <[decpt]>, <[sgn]>); - float <[val]>; - int <[decimals]>; - int *<[decpt]>; - int *<[sgn]>; - -DESCRIPTION -<<ecvt>> and <<fcvt>> produce (null-terminated) strings of digits -representating the <<double>> number <[val]>. -<<ecvtf>> and <<fcvtf>> produce the corresponding character -representations of <<float>> numbers. - -(The <<stdlib>> functions <<ecvtbuf>> and <<fcvtbuf>> are reentrant -versions of <<ecvt>> and <<fcvt>>.) - -The only difference between <<ecvt>> and <<fcvt>> is the -interpretation of the second argument (<[chars]> or <[decimals]>). -For <<ecvt>>, the second argument <[chars]> specifies the total number -of characters to write (which is also the number of significant digits -in the formatted string, since these two functions write only digits). -For <<fcvt>>, the second argument <[decimals]> specifies the number of -characters to write after the decimal point; all digits for the integer -part of <[val]> are always included. - -Since <<ecvt>> and <<fcvt>> write only digits in the output string, -they record the location of the decimal point in <<*<[decpt]>>>, and -the sign of the number in <<*<[sgn]>>>. After formatting a number, -<<*<[decpt]>>> contains the number of digits to the left of the -decimal point. <<*<[sgn]>>> contains <<0>> if the number is positive, -and <<1>> if it is negative. - -RETURNS -All four functions return a pointer to the new string containing a -character representation of <[val]>. - -PORTABILITY -None of these functions are ANSI C. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. - -NEWPAGE -FUNCTION -<<gvcvt>>, <<gcvtf>>---format double or float as string - -INDEX - gcvt -INDEX - gcvtf - -ANSI_SYNOPSIS - #include <stdlib.h> - - char *gcvt(double <[val]>, int <[precision]>, char *<[buf]>); - char *gcvtf(float <[val]>, int <[precision]>, char *<[buf]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - - char *gcvt(<[val]>, <[precision]>, <[buf]>); - double <[val]>; - int <[precision]>; - char *<[buf]>; - char *gcvtf(<[val]>, <[precision]>, <[buf]>); - float <[val]>; - int <[precision]>; - char *<[buf]>; - -DESCRIPTION -<<gcvt>> writes a fully formatted number as a null-terminated -string in the buffer <<*<[buf]>>>. <<gdvtf>> produces corresponding -character representations of <<float>> numbers. - -<<gcvt>> uses the same rules as the <<printf>> format -`<<%.<[precision]>g>>'---only negative values are signed (with -`<<->>'), and either exponential or ordinary decimal-fraction format -is chosen depending on the number of significant digits (specified by -<[precision]>). - -RETURNS -The result is a pointer to the formatted representation of <[val]> -(the same as the argument <[buf]>). - -PORTABILITY -Neither function is ANSI C. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include "local.h" - -char * -_DEFUN (fcvt, (d, ndigit, decpt, sign), - double d _AND - int ndigit _AND - int *decpt _AND - int *sign) -{ - return fcvtbuf (d, ndigit, decpt, sign, NULL); -} - -char * -_DEFUN (fcvtf, (d, ndigit, decpt, sign), - float d _AND - int ndigit _AND - int *decpt _AND - int *sign) -{ - return fcvt ((float) d, ndigit, decpt, sign); -} - - -char * -_DEFUN (gcvtf, (d, ndigit, buf), - float d _AND - int ndigit _AND - char *buf) -{ - double asd = d; - return gcvt (asd, ndigit, buf); -} - - -char * -_DEFUN (ecvt, (d, ndigit, decpt, sign), - double d _AND - int ndigit _AND - int *decpt _AND - int *sign) -{ - return ecvtbuf (d, ndigit, decpt, sign, NULL); -} - -char * -_DEFUN (ecvtf, (d, ndigit, decpt, sign), - float d _AND - int ndigit _AND - int *decpt _AND - int *sign) -{ - return ecvt ((double) d, ndigit, decpt, sign); -} - - -char * -_DEFUN (gcvt, (d, ndigit, buf), - double d _AND - int ndigit _AND - char *buf) -{ - char *tbuf = buf; - if (d < 0) { - *buf = '-'; - buf++; - ndigit--; - } - return (_gcvt (_REENT, d, ndigit, buf, 'g', 0) ? tbuf : 0); -} diff --git a/newlib/libc/stdlib/environ.c b/newlib/libc/stdlib/environ.c deleted file mode 100644 index 8cc239237..000000000 --- a/newlib/libc/stdlib/environ.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 1995, 1996, 2002 Red Hat Incorporated. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * The name of Red Hat Incorporated may not be used to endorse - * or promote products derived from this software without specific - * prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Provide a definition of `environ' if crt0.o doesn't. */ - -static char *initial_env[] = { 0 }; - -/* Posix says `environ' is a pointer to a null terminated list of pointers. - Hence `environ' itself is never NULL. */ -char **environ = &initial_env[0]; diff --git a/newlib/libc/stdlib/envlock.c b/newlib/libc/stdlib/envlock.c deleted file mode 100644 index ce7ae2e26..000000000 --- a/newlib/libc/stdlib/envlock.c +++ /dev/null @@ -1,61 +0,0 @@ -/* -FUNCTION -<<__env_lock>>, <<__env_unlock>>---lock environ variable - -INDEX - __env_lock -INDEX - __env_unlock - -ANSI_SYNOPSIS - #include <envlock.h> - void __env_lock (struct _reent *<[reent]>); - void __env_unlock (struct _reent *<[reent]>); - -TRAD_SYNOPSIS - void __env_lock(<[reent]>) - struct _reent *<[reent]>; - - void __env_unlock(<[reent]>) - struct _reent *<[reent]>; - -DESCRIPTION -The <<setenv>> family of routines call these functions when they need to -modify the environ variable. The version of these routines supplied in the -library use the lock API defined in sys/lock.h. If multiple threads of -execution can call <<setenv>>, or if <<setenv>> can be called reentrantly, -then you need to define your own versions of these functions in order to -safely lock the memory pool during a call. If you do not, the memory pool -may become corrupted. - -A call to <<setenv>> may call <<__env_lock>> recursively; that is, -the sequence of calls may go <<__env_lock>>, <<__env_lock>>, -<<__env_unlock>>, <<__env_unlock>>. Any implementation of these -routines must be careful to avoid causing a thread to wait for a lock -that it already holds. -*/ - -#include "envlock.h" -#include <sys/lock.h> - -#ifndef __SINGLE_THREAD__ -__LOCK_INIT_RECURSIVE(static, __env_lock_object); -#endif - -void -__env_lock (ptr) - struct _reent *ptr; -{ -#ifndef __SINGLE_THREAD__ - __lock_acquire_recursive (__env_lock_object); -#endif -} - -void -__env_unlock (ptr) - struct _reent *ptr; -{ -#ifndef __SINGLE_THREAD__ - __lock_release_recursive (__env_lock_object); -#endif -} diff --git a/newlib/libc/stdlib/eprintf.c b/newlib/libc/stdlib/eprintf.c deleted file mode 100644 index 46cf8104b..000000000 --- a/newlib/libc/stdlib/eprintf.c +++ /dev/null @@ -1,26 +0,0 @@ -/* This is an implementation of the __eprintf function which is - compatible with the assert.h which is distributed with gcc. - - This function is provided because in some cases libgcc.a will not - provide __eprintf. This will happen if inhibit_libc is defined, - which is done because at the time that libgcc2.c is compiled, the - correct <stdio.h> may not be available. newlib provides its own - copy of assert.h, which calls __assert, not __eprintf. However, in - some cases you may accidentally wind up compiling with the gcc - assert.h. In such a case, this __eprintf will be used if there - does not happen to be one in libgcc2.c. */ - -#include <stdlib.h> -#include <stdio.h> - -void -__eprintf (format, file, line, expression) - const char *format; - const char *file; - unsigned int line; - const char *expression; -{ - (void) fiprintf (stderr, format, file, line, expression); - abort (); - /*NOTREACHED*/ -} diff --git a/newlib/libc/stdlib/erand48.c b/newlib/libc/stdlib/erand48.c deleted file mode 100644 index 26b39fb5b..000000000 --- a/newlib/libc/stdlib/erand48.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -double -_DEFUN (_erand48_r, (r, xseed), - struct _reent *r _AND - unsigned short xseed[3]) -{ - __dorand48(r, xseed); - return ldexp((double) xseed[0], -48) + - ldexp((double) xseed[1], -32) + - ldexp((double) xseed[2], -16); -} - -#ifndef _REENT_ONLY -double -_DEFUN (erand48, (xseed), - unsigned short xseed[3]) -{ - return _erand48_r (_REENT, xseed); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/exit.c b/newlib/libc/stdlib/exit.c deleted file mode 100644 index 195b72454..000000000 --- a/newlib/libc/stdlib/exit.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * %sccs.include.redist.c% - */ - -/* -FUNCTION -<<exit>>---end program execution - -INDEX - exit - -ANSI_SYNOPSIS - #include <stdlib.h> - void exit(int <[code]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - void exit(<[code]>) - int <[code]>; - -DESCRIPTION -Use <<exit>> to return control from a program to the host operating -environment. Use the argument <[code]> to pass an exit status to the -operating environment: two particular values, <<EXIT_SUCCESS>> and -<<EXIT_FAILURE>>, are defined in `<<stdlib.h>>' to indicate success or -failure in a portable fashion. - -<<exit>> does two kinds of cleanup before ending execution of your -program. First, it calls all application-defined cleanup functions -you have enrolled with <<atexit>>. Second, files and streams are -cleaned up: any pending output is delivered to the host system, each -open file or stream is closed, and files created by <<tmpfile>> are -deleted. - -RETURNS -<<exit>> does not return to its caller. - -PORTABILITY -ANSI C requires <<exit>>, and specifies that <<EXIT_SUCCESS>> and -<<EXIT_FAILURE>> must be defined. - -Supporting OS subroutines required: <<_exit>>. -*/ - -#include <stdlib.h> -#include <unistd.h> /* for _exit() declaration */ -#include <reent.h> -#include "atexit.h" - -/* - * Exit, flushing stdio buffers if necessary. - */ - -void -_DEFUN (exit, (code), - int code) -{ - __call_exitprocs (code, NULL); - - if (_GLOBAL_REENT->__cleanup) - (*_GLOBAL_REENT->__cleanup) (_GLOBAL_REENT); - _exit (code); -} diff --git a/newlib/libc/stdlib/gd_qnan.h b/newlib/libc/stdlib/gd_qnan.h deleted file mode 100644 index 68f16cd12..000000000 --- a/newlib/libc/stdlib/gd_qnan.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifdef __IEEE_BIG_ENDIAN - -#define f_QNAN 0x7fc00000 -#define d_QNAN0 0x7ff80000 -#define d_QNAN1 0x0 -#define ld_QNAN0 0x7ff80000 -#define ld_QNAN1 0x0 -#define ld_QNAN2 0x0 -#define ld_QNAN3 0x0 -#define ldus_QNAN0 0x7ff8 -#define ldus_QNAN1 0x0 -#define ldus_QNAN2 0x0 -#define ldus_QNAN3 0x0 -#define ldus_QNAN4 0x0 - -#elif defined(__IEEE_LITTLE_ENDIAN) - -#define f_QNAN 0xffc00000 -#define d_QNAN0 0x0 -#define d_QNAN1 0xfff80000 -#define ld_QNAN0 0x0 -#define ld_QNAN1 0xc0000000 -#define ld_QNAN2 0xffff -#define ld_QNAN3 0x0 -#define ldus_QNAN0 0x0 -#define ldus_QNAN1 0x0 -#define ldus_QNAN2 0x0 -#define ldus_QNAN3 0xc000 -#define ldus_QNAN4 0xffff - -#else -#error IEEE endian not defined -#endif diff --git a/newlib/libc/stdlib/gdtoa-gethex.c b/newlib/libc/stdlib/gdtoa-gethex.c deleted file mode 100644 index c73b11c08..000000000 --- a/newlib/libc/stdlib/gdtoa-gethex.c +++ /dev/null @@ -1,354 +0,0 @@ -/**************************************************************** - -The author of this software is David M. Gay. - -Copyright (C) 1998 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -****************************************************************/ - -/* Please send bug reports to David M. Gay (dmg at acm dot org, - * with " at " changed at "@" and " dot " changed to "."). */ - -#include <_ansi.h> -#include <reent.h> -#include <string.h> -#include "mprec.h" -#include "gdtoa.h" -#include "gd_qnan.h" -#include "locale.h" - -unsigned char hexdig[256]; - -static void -_DEFUN (htinit, (h, s, inc), - unsigned char *h _AND - unsigned char *s _AND - int inc) -{ - int i, j; - for(i = 0; (j = s[i]) !=0; i++) - h[j] = i + inc; -} - -void -_DEFUN_VOID (hexdig_init) -{ -#define USC (unsigned char *) - htinit(hexdig, USC "0123456789", 0x10); - htinit(hexdig, USC "abcdef", 0x10 + 10); - htinit(hexdig, USC "ABCDEF", 0x10 + 10); -} - -static void -_DEFUN(rshift, (b, k), - _Bigint *b _AND - int k) -{ - __ULong *x, *x1, *xe, y; - int n; - - x = x1 = b->_x; - n = k >> kshift; - if (n < b->_wds) { - xe = x + b->_wds; - x += n; - if (k &= kmask) { - n = ULbits - k; - y = *x++ >> k; - while(x < xe) { - *x1++ = (y | (*x << n)) & ALL_ON; - y = *x++ >> k; - } - if ((*x1 = y) !=0) - x1++; - } - else - while(x < xe) - *x1++ = *x++; - } - if ((b->_wds = x1 - b->_x) == 0) - b->_x[0] = 0; -} - -static _Bigint * -_DEFUN (increment, (ptr, b), - struct _reent *ptr _AND - _Bigint *b) -{ - __ULong *x, *xe; - _Bigint *b1; -#ifdef Pack_16 - __ULong carry = 1, y; -#endif - - x = b->_x; - xe = x + b->_wds; -#ifdef Pack_32 - do { - if (*x < (__ULong)0xffffffffL) { - ++*x; - return b; - } - *x++ = 0; - } while(x < xe); -#else - do { - y = *x + carry; - carry = y >> 16; - *x++ = y & 0xffff; - if (!carry) - return b; - } while(x < xe); - if (carry) -#endif - { - if (b->_wds >= b->_maxwds) { - b1 = Balloc(ptr, b->_k+1); - Bcopy(b1, b); - Bfree(ptr, b); - b = b1; - } - b->_x[b->_wds++] = 1; - } - return b; -} - - -int -_DEFUN(gethex, (ptr, sp, fpi, exp, bp, sign), - struct _reent *ptr _AND - _CONST char **sp _AND - FPI *fpi _AND - Long *exp _AND - _Bigint **bp _AND - int sign) -{ - _Bigint *b; - _CONST unsigned char *decpt, *s0, *s, *s1; - int esign, havedig, irv, k, n, nbits, up, zret; - __ULong L, lostbits, *x; - Long e, e1; - unsigned char *decimalpoint = (unsigned char *) - _localeconv_r (ptr)->decimal_point; - size_t decp_len = strlen ((const char *) decimalpoint); - unsigned char decp_end = decimalpoint[decp_len - 1]; - - if (!hexdig['0']) - hexdig_init(); - havedig = 0; - s0 = *(_CONST unsigned char **)sp + 2; - while(s0[havedig] == '0') - havedig++; - s0 += havedig; - s = s0; - decpt = 0; - zret = 0; - e = 0; - if (!hexdig[*s]) { - zret = 1; - if (strncmp ((const char *) s, (const char *) decimalpoint, - decp_len) != 0) - goto pcheck; - decpt = (s += decp_len); - if (!hexdig[*s]) - goto pcheck; - while(*s == '0') - s++; - if (hexdig[*s]) - zret = 0; - havedig = 1; - s0 = s; - } - while(hexdig[*s]) - s++; - if (strncmp ((const char *) s, (const char *) decimalpoint, - decp_len) == 0 - && !decpt) { - decpt = (s += decp_len); - while(hexdig[*s]) - s++; - } - if (decpt) - e = -(((Long)(s-decpt)) << 2); - pcheck: - s1 = s; - switch(*s) { - case 'p': - case 'P': - esign = 0; - switch(*++s) { - case '-': - esign = 1; - /* no break */ - case '+': - s++; - } - if ((n = hexdig[*s]) == 0 || n > 0x19) { - s = s1; - break; - } - e1 = n - 0x10; - while((n = hexdig[*++s]) !=0 && n <= 0x19) - e1 = 10*e1 + n - 0x10; - if (esign) - e1 = -e1; - e += e1; - } - *sp = (char*)s; - if (zret) - return havedig ? STRTOG_Zero : STRTOG_NoNumber; - n = s1 - s0 - 1; - for(k = 0; n > 7; n >>= 1) - k++; - b = Balloc(ptr, k); - x = b->_x; - n = 0; - L = 0; - while(s1 > s0) { - if (*--s1 == decp_end && s1 - decp_len + 1 >= s0 - && strncmp ((const char *) s1 - decp_len + 1, - (const char *) decimalpoint, decp_len) == 0) { - s1 -= decp_len - 1; /* Note the --s1 above! */ - continue; - } - if (n == 32) { - *x++ = L; - L = 0; - n = 0; - } - L |= (hexdig[*s1] & 0x0f) << n; - n += 4; - } - *x++ = L; - b->_wds = n = x - b->_x; - n = 32*n - hi0bits(L); - nbits = fpi->nbits; - lostbits = 0; - x = b->_x; - if (n > nbits) { - n -= nbits; - if (any_on(b,n)) { - lostbits = 1; - k = n - 1; - if (x[k>>kshift] & 1 << (k & kmask)) { - lostbits = 2; - if (k > 1 && any_on(b,k-1)) - lostbits = 3; - } - } - rshift(b, n); - e += n; - } - else if (n < nbits) { - n = nbits - n; - b = lshift(ptr, b, n); - e -= n; - x = b->_x; - } - if (e > fpi->emax) { - ovfl: - Bfree(ptr, b); - *bp = 0; - return STRTOG_Infinite | STRTOG_Overflow | STRTOG_Inexhi; - } - irv = STRTOG_Normal; - if (e < fpi->emin) { - irv = STRTOG_Denormal; - n = fpi->emin - e; - if (n >= nbits) { - switch (fpi->rounding) { - case FPI_Round_near: - if (n == nbits && (n < 2 || any_on(b,n-1))) - goto one_bit; - break; - case FPI_Round_up: - if (!sign) - goto one_bit; - break; - case FPI_Round_down: - if (sign) { - one_bit: - *exp = fpi->emin; - x[0] = b->_wds = 1; - *bp = b; - return STRTOG_Denormal | STRTOG_Inexhi - | STRTOG_Underflow; - } - } - Bfree(ptr, b); - *bp = 0; - return STRTOG_Zero | STRTOG_Inexlo | STRTOG_Underflow; - } - k = n - 1; - if (lostbits) - lostbits = 1; - else if (k > 0) - lostbits = any_on(b,k); - if (x[k>>kshift] & 1 << (k & kmask)) - lostbits |= 2; - nbits -= n; - rshift(b,n); - e = fpi->emin; - } - if (lostbits) { - up = 0; - switch(fpi->rounding) { - case FPI_Round_zero: - break; - case FPI_Round_near: - if ((lostbits & 2) - && ((lostbits & 1) | (x[0] & 1))) - up = 1; - break; - case FPI_Round_up: - up = 1 - sign; - break; - case FPI_Round_down: - up = sign; - } - if (up) { - k = b->_wds; - b = increment(ptr, b); - x = b->_x; - if (irv == STRTOG_Denormal) { - if (nbits == fpi->nbits - 1 - && x[nbits >> kshift] & 1 << (nbits & kmask)) - irv = STRTOG_Normal; - } - else if ((b->_wds > k) - || ((n = nbits & kmask) !=0 - && (hi0bits(x[k-1]) < 32-n))) { - rshift(b,1); - if (++e > fpi->emax) - goto ovfl; - } - irv |= STRTOG_Inexhi; - } - else - irv |= STRTOG_Inexlo; - } - *bp = b; - *exp = e; - return irv; -} - diff --git a/newlib/libc/stdlib/gdtoa-hexnan.c b/newlib/libc/stdlib/gdtoa-hexnan.c deleted file mode 100644 index 189fb238d..000000000 --- a/newlib/libc/stdlib/gdtoa-hexnan.c +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************** - -The author of this software is David M. Gay. - -Copyright (C) 2000 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -****************************************************************/ - -/* Please send bug reports to - David M. Gay - Bell Laboratories, Room 2C-463 - 600 Mountain Avenue - Murray Hill, NJ 07974-0636 - U.S.A. - dmg@bell-labs.com - */ - -/* Modified 06-21-2006 by Jeff Johnston to work with newlib. */ - -#include <_ansi.h> -#include <reent.h> -#include <string.h> -#include "mprec.h" -#include "gdtoa.h" - -#ifdef INFNAN_CHECK -static void -_DEFUN (L_shift, (x, x1, i), - __ULong *x _AND - __ULong *x1 _AND - int i) -{ - int j; - - i = 8 - i; - i <<= 2; - j = ULbits - i; - do { - *x |= x[1] << j; - x[1] >>= i; - } while(++x < x1); -} - -int -_DEFUN (hexnan, (sp, fpi, x0), - _CONST char **sp _AND - FPI *fpi _AND - __ULong *x0) -{ - __ULong c, h, *x, *x1, *xe; - _CONST char *s; - int havedig, hd0, i, nbits; - - if (!hexdig['0']) - hexdig_init(); - nbits = fpi->nbits; - x = x0 + (nbits >> kshift); - if (nbits & kmask) - x++; - *--x = 0; - x1 = xe = x; - havedig = hd0 = i = 0; - s = *sp; - while((c = *(_CONST unsigned char*)++s)) { - if (!(h = hexdig[c])) { - if (c <= ' ') { - if (hd0 < havedig) { - if (x < x1 && i < 8) - L_shift(x, x1, i); - if (x <= x0) { - i = 8; - continue; - } - hd0 = havedig; - *--x = 0; - x1 = x; - i = 0; - } - continue; - } - if (/*(*/ c == ')') { - *sp = s + 1; - break; - } - return STRTOG_NaN; - } - havedig++; - if (++i > 8) { - if (x <= x0) - continue; - i = 1; - *--x = 0; - } - *x = ((*x << 4) | (h & 0xf)); - } - if (!havedig) - return STRTOG_NaN; - if (x < x1 && i < 8) - L_shift(x, x1, i); - if (x > x0) { - x1 = x0; - do *x1++ = *x++; - while(x <= xe); - do *x1++ = 0; - while(x1 <= xe); - } - else { - /* truncate high-order word if necessary */ - if ( (i = nbits & (ULbits-1)) !=0) - *xe &= ((__ULong)0xffffffff) >> (ULbits - i); - } - for(x1 = xe;; --x1) { - if (*x1 != 0) - break; - if (x1 == x0) { - *x1 = 1; - break; - } - } - return STRTOG_NaNbits; -} -#endif /* INFNAN_CHECK */ diff --git a/newlib/libc/stdlib/gdtoa.h b/newlib/libc/stdlib/gdtoa.h deleted file mode 100644 index 5029e58de..000000000 --- a/newlib/libc/stdlib/gdtoa.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************** - -The author of this software is David M. Gay. - -Copyright (C) 1998 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -****************************************************************/ - -/* Please send bug reports to David M. Gay (dmg at acm dot org, - * with " at " changed at "@" and " dot " changed to "."). */ - -#ifndef GDTOA_H_INCLUDED -#define GDTOA_H_INCLUDED - - - enum { /* return values from strtodg */ - STRTOG_Zero = 0, - STRTOG_Normal = 1, - STRTOG_Denormal = 2, - STRTOG_Infinite = 3, - STRTOG_NaN = 4, - STRTOG_NaNbits = 5, - STRTOG_NoNumber = 6, - STRTOG_Retmask = 7, - - /* The following may be or-ed into one of the above values. */ - - STRTOG_Neg = 0x08, - STRTOG_Inexlo = 0x10, - STRTOG_Inexhi = 0x20, - STRTOG_Inexact = 0x30, - STRTOG_Underflow= 0x40, - STRTOG_Overflow = 0x80 - }; - - typedef struct -FPI { - int nbits; - int emin; - int emax; - int rounding; - int sudden_underflow; - } FPI; - -enum { /* FPI.rounding values: same as FLT_ROUNDS */ - FPI_Round_zero = 0, - FPI_Round_near = 1, - FPI_Round_up = 2, - FPI_Round_down = 3 - }; - -#endif /* GDTOA_H_INCLUDED */ diff --git a/newlib/libc/stdlib/getenv.c b/newlib/libc/stdlib/getenv.c deleted file mode 100644 index 6e0151461..000000000 --- a/newlib/libc/stdlib/getenv.c +++ /dev/null @@ -1,94 +0,0 @@ -/* -FUNCTION -<<getenv>>---look up environment variable - -INDEX - getenv -INDEX - environ - -ANSI_SYNOPSIS - #include <stdlib.h> - char *getenv(const char *<[name]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - char *getenv(<[name]>) - char *<[name]>; - -DESCRIPTION -<<getenv>> searches the list of environment variable names and values -(using the global pointer ``<<char **environ>>'') for a variable whose -name matches the string at <[name]>. If a variable name matches, -<<getenv>> returns a pointer to the associated value. - -RETURNS -A pointer to the (string) value of the environment variable, or -<<NULL>> if there is no such environment variable. - -PORTABILITY -<<getenv>> is ANSI, but the rules for properly forming names of environment -variables vary from one system to another. - -<<getenv>> requires a global pointer <<environ>>. -*/ - -/* - * Copyright (c) 1987, 2000 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef _REENT_ONLY - -#include <stdlib.h> -#include <stddef.h> -#include <string.h> - -/* - * _findenv -- - * Returns pointer to value associated with name, if any, else NULL. - * Sets offset to be the offset of the name/value combination in the - * environmental array, for use by setenv(3) and unsetenv(3). - * Explicitly removes '=' in argument name. - * - * This routine *should* be a static; don't use it. - */ - -char * -_DEFUN (_findenv, (name, offset), - register _CONST char *name _AND - int *offset) -{ - return _findenv_r (_REENT, name, offset); -} - -/* - * getenv -- - * Returns ptr to value associated with name, if any, else NULL. - */ - -char * -_DEFUN (getenv, (name), - _CONST char *name) -{ - int offset; - char *_findenv_r (); - - return _findenv_r (_REENT, name, &offset); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/getenv_r.c b/newlib/libc/stdlib/getenv_r.c deleted file mode 100644 index 272b097ad..000000000 --- a/newlib/libc/stdlib/getenv_r.c +++ /dev/null @@ -1,136 +0,0 @@ -/* -FUNCTION -<<_getenv_r>>---look up environment variable - -INDEX - _getenv_r -INDEX - environ - -ANSI_SYNOPSIS - #include <stdlib.h> - char *_getenv_r(struct _reent *<[reent_ptr]>, const char *<[name]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - char *_getenv_r(<[reent_ptr]>, <[name]>) - struct _reent *<[reent_ptr]>; - char *<[name]>; - -DESCRIPTION -<<_getenv_r>> searches the list of environment variable names and values -(using the global pointer ``<<char **environ>>'') for a variable whose -name matches the string at <[name]>. If a variable name matches, -<<_getenv_r>> returns a pointer to the associated value. - -RETURNS -A pointer to the (string) value of the environment variable, or -<<NULL>> if there is no such environment variable. - -PORTABILITY -<<_getenv_r>> is not ANSI; the rules for properly forming names of environment -variables vary from one system to another. This implementation does not -permit '=' to be in identifiers. - -<<_getenv_r>> requires a global pointer <<environ>>. -*/ - -/* This file may have been modified by DJ Delorie (Jan 1991). If so, -** these modifications are Copyright (C) 1991 DJ Delorie. -*/ - -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include "envlock.h" - -extern char **environ; - -/* Only deal with a pointer to environ, to work around subtle bugs with shared - libraries and/or small data systems where the user declares his own - 'environ'. */ -static char ***p_environ = &environ; - -/* - * _findenv -- - * Returns pointer to value associated with name, if any, else NULL. - * Sets offset to be the offset of the name/value combination in the - * environmental array, for use by setenv(3) and unsetenv(3). - * - * This routine *should* be a static; don't use it. - */ - -char * -_DEFUN (_findenv_r, (reent_ptr, name, offset), - struct _reent *reent_ptr _AND - register _CONST char *name _AND - int *offset) -{ - register int len; - register char **p; - _CONST char *c; - - ENV_LOCK; - - /* In some embedded systems, this does not get set. This protects - newlib from dereferencing a bad pointer. */ - if (!*p_environ) - { - ENV_UNLOCK; - return NULL; - } - - c = name; - while (*c && *c != '=') c++; - - /* Identifiers may not contain an '=', so cannot match if does */ - if(*c != '=') - { - len = c - name; - for (p = *p_environ; *p; ++p) - if (!strncmp (*p, name, len)) - if (*(c = *p + len) == '=') - { - *offset = p - *p_environ; - ENV_UNLOCK; - return (char *) (++c); - } - } - ENV_UNLOCK; - return NULL; -} - -/* - * _getenv_r -- - * Returns ptr to value associated with name, if any, else NULL. - */ - -char * -_DEFUN (_getenv_r, (reent_ptr, name), - struct _reent *reent_ptr _AND - _CONST char *name) -{ - int offset; - char *_findenv_r (); - - return _findenv_r (reent_ptr, name, &offset); -} diff --git a/newlib/libc/stdlib/getopt.c b/newlib/libc/stdlib/getopt.c deleted file mode 100644 index 944214d5f..000000000 --- a/newlib/libc/stdlib/getopt.c +++ /dev/null @@ -1,479 +0,0 @@ -/**************************************************************************** - -getopt.c - Read command line options - -AUTHOR: Gregory Pietsch -CREATED Fri Jan 10 21:13:05 1997 - -DESCRIPTION: - -The getopt() function parses the command line arguments. Its arguments argc -and argv are the argument count and array as passed to the main() function -on program invocation. The argument optstring is a list of available option -characters. If such a character is followed by a colon (`:'), the option -takes an argument, which is placed in optarg. If such a character is -followed by two colons, the option takes an optional argument, which is -placed in optarg. If the option does not take an argument, optarg is NULL. - -The external variable optind is the index of the next array element of argv -to be processed; it communicates from one call to the next which element to -process. - -The getopt_long() function works like getopt() except that it also accepts -long options started by two dashes `--'. If these take values, it is either -in the form - ---arg=value - - or - ---arg value - -It takes the additional arguments longopts which is a pointer to the first -element of an array of type struct option. The last element of the array -has to be filled with NULL for the name field. - -The longind pointer points to the index of the current long option relative -to longopts if it is non-NULL. - -The getopt() function returns the option character if the option was found -successfully, `:' if there was a missing parameter for one of the options, -`?' for an unknown option character, and EOF for the end of the option list. - -The getopt_long() function's return value is described in the header file. - -The function getopt_long_only() is identical to getopt_long(), except that a -plus sign `+' can introduce long options as well as `--'. - -The following describes how to deal with options that follow non-option -argv-elements. - -If the caller did not specify anything, the default is REQUIRE_ORDER if the -environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. - -REQUIRE_ORDER means don't recognize them as options; stop option processing -when the first non-option is seen. This is what Unix does. This mode of -operation is selected by either setting the environment variable -POSIXLY_CORRECT, or using `+' as the first character of the optstring -parameter. - -PERMUTE is the default. We permute the contents of ARGV as we scan, so that -eventually all the non-options are at the end. This allows options to be -given in any order, even with programs that were not written to expect this. - -RETURN_IN_ORDER is an option available to programs that were written to -expect options and other argv-elements in any order and that care about the -ordering of the two. We describe each non-option argv-element as if it were -the argument of an option with character code 1. Using `-' as the first -character of the optstring parameter selects this mode of operation. - -The special argument `--' forces an end of option-scanning regardless of the -value of ordering. In the case of RETURN_IN_ORDER, only `--' can cause -getopt() and friends to return EOF with optind != argc. - -COPYRIGHT NOTICE AND DISCLAIMER: - -Copyright (C) 1997 Gregory Pietsch - -This file and the accompanying getopt.h header file are hereby placed in the -public domain without restrictions. Just give the author credit, don't -claim you wrote it or prevent anyone else from using it. - -Gregory Pietsch's current e-mail address: -gpietsch@comcast.net -****************************************************************************/ - -#ifndef HAVE_GETOPT - -/* include files */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#define __need_getopt_newlib -#include <getopt.h> - -/* macros */ - -/* types */ -typedef enum GETOPT_ORDERING_T -{ - PERMUTE, - RETURN_IN_ORDER, - REQUIRE_ORDER -} GETOPT_ORDERING_T; - -/* globally-defined variables */ -char *optarg = 0; -int optind = 0; -int opterr = 1; -int optopt = '?'; - -/* static variables */ -static int optwhere = 0; - -/* functions */ - -/* reverse_argv_elements: reverses num elements starting at argv */ -static void -reverse_argv_elements (char **argv, int num) -{ - int i; - char *tmp; - - for (i = 0; i < (num >> 1); i++) - { - tmp = argv[i]; - argv[i] = argv[num - i - 1]; - argv[num - i - 1] = tmp; - } -} - -/* permute: swap two blocks of argv-elements given their lengths */ -static void -permute (char *const argv[], int len1, int len2) -{ - reverse_argv_elements ((char **) argv, len1); - reverse_argv_elements ((char **) argv, len1 + len2); - reverse_argv_elements ((char **) argv, len2); -} - -/* is_option: is this argv-element an option or the end of the option list? */ -static int -is_option (char *argv_element, int only) -{ - return ((argv_element == 0) - || (argv_element[0] == '-') || (only && argv_element[0] == '+')); -} - -/* read_globals: read the values from the globals into a getopt_data - structure */ -static void -read_globals (struct getopt_data *data) -{ - data->optarg = optarg; - data->optind = optind; - data->opterr = opterr; - data->optopt = optopt; - data->optwhere = optwhere; -} - -/* write_globals: write the values into the globals from a getopt_data - structure */ -static void -write_globals (struct getopt_data *data) -{ - optarg = data->optarg; - optind = data->optind; - opterr = data->opterr; - optopt = data->optopt; - optwhere = data->optwhere; -} - -/* getopt_internal: the function that does all the dirty work */ -static int -getopt_internal (int argc, char *const argv[], const char *shortopts, - const struct option *longopts, int *longind, int only, - struct getopt_data *data) -{ - GETOPT_ORDERING_T ordering = PERMUTE; - size_t permute_from = 0; - int num_nonopts = 0; - int optindex = 0; - size_t match_chars = 0; - char *possible_arg = 0; - int longopt_match = -1; - int has_arg = -1; - char *cp = 0; - int arg_next = 0; - - /* first, deal with silly parameters and easy stuff */ - if (argc == 0 || argv == 0 || (shortopts == 0 && longopts == 0) - || data->optind >= argc || argv[data->optind] == 0) - return EOF; - if (strcmp (argv[data->optind], "--") == 0) - { - data->optind++; - return EOF; - } - - /* if this is our first time through */ - if (data->optind == 0) - data->optind = data->optwhere = 1; - - /* define ordering */ - if (shortopts != 0 && (*shortopts == '-' || *shortopts == '+')) - { - ordering = (*shortopts == '-') ? RETURN_IN_ORDER : REQUIRE_ORDER; - shortopts++; - } - else - ordering = (getenv ("POSIXLY_CORRECT") != 0) ? REQUIRE_ORDER : PERMUTE; - - /* - * based on ordering, find our next option, if we're at the beginning of - * one - */ - if (data->optwhere == 1) - { - switch (ordering) - { - default: /* shouldn't happen */ - case PERMUTE: - permute_from = data->optind; - num_nonopts = 0; - while (!is_option (argv[data->optind], only)) - { - data->optind++; - num_nonopts++; - } - if (argv[data->optind] == 0) - { - /* no more options */ - data->optind = permute_from; - return EOF; - } - else if (strcmp (argv[data->optind], "--") == 0) - { - /* no more options, but have to get `--' out of the way */ - permute (argv + permute_from, num_nonopts, 1); - data->optind = permute_from + 1; - return EOF; - } - break; - case RETURN_IN_ORDER: - if (!is_option (argv[data->optind], only)) - { - data->optarg = argv[data->optind++]; - return (data->optopt = 1); - } - break; - case REQUIRE_ORDER: - if (!is_option (argv[data->optind], only)) - return EOF; - break; - } - } - /* we've got an option, so parse it */ - - /* first, is it a long option? */ - if (longopts != 0 - && (memcmp (argv[data->optind], "--", 2) == 0 - || (only && argv[data->optind][0] == '+')) && data->optwhere == 1) - { - /* handle long options */ - if (memcmp (argv[data->optind], "--", 2) == 0) - data->optwhere = 2; - longopt_match = -1; - possible_arg = strchr (argv[data->optind] + data->optwhere, '='); - if (possible_arg == 0) - { - /* no =, so next argv might be arg */ - match_chars = strlen (argv[data->optind]); - possible_arg = argv[data->optind] + match_chars; - match_chars = match_chars - data->optwhere; - } - else - match_chars = (possible_arg - argv[data->optind]) - data->optwhere; - for (optindex = 0; longopts[optindex].name != 0; ++optindex) - { - if (memcmp - (argv[data->optind] + data->optwhere, longopts[optindex].name, - match_chars) == 0) - { - /* do we have an exact match? */ - if (match_chars == (int) (strlen (longopts[optindex].name))) - { - longopt_match = optindex; - break; - } - /* do any characters match? */ - else - { - if (longopt_match < 0) - longopt_match = optindex; - else - { - /* we have ambiguous options */ - if (data->opterr) - fprintf (stderr, "%s: option `%s' is ambiguous " - "(could be `--%s' or `--%s')\n", - argv[0], - argv[data->optind], - longopts[longopt_match].name, - longopts[optindex].name); - return (data->optopt = '?'); - } - } - } - } - if (longopt_match >= 0) - has_arg = longopts[longopt_match].has_arg; - } - - /* if we didn't find a long option, is it a short option? */ - if (longopt_match < 0 && shortopts != 0) - { - cp = strchr (shortopts, argv[data->optind][data->optwhere]); - if (cp == 0) - { - /* couldn't find option in shortopts */ - if (data->opterr) - fprintf (stderr, - "%s: invalid option -- `-%c'\n", - argv[0], argv[data->optind][data->optwhere]); - data->optwhere++; - if (argv[data->optind][data->optwhere] == '\0') - { - data->optind++; - data->optwhere = 1; - } - return (data->optopt = '?'); - } - has_arg = ((cp[1] == ':') - ? ((cp[2] == ':') ? OPTIONAL_ARG : REQUIRED_ARG) : NO_ARG); - possible_arg = argv[data->optind] + data->optwhere + 1; - data->optopt = *cp; - } - - /* get argument and reset data->optwhere */ - arg_next = 0; - switch (has_arg) - { - case OPTIONAL_ARG: - if (*possible_arg == '=') - possible_arg++; - data->optarg = (*possible_arg != '\0') ? possible_arg : 0; - data->optwhere = 1; - break; - case REQUIRED_ARG: - if (*possible_arg == '=') - possible_arg++; - if (*possible_arg != '\0') - { - data->optarg = possible_arg; - data->optwhere = 1; - } - else if (data->optind + 1 >= argc) - { - if (data->opterr) - { - fprintf (stderr, "%s: argument required for option `", argv[0]); - if (longopt_match >= 0) - fprintf (stderr, "--%s'\n", longopts[longopt_match].name); - else - fprintf (stderr, "-%c'\n", *cp); - } - data->optind++; - return (data->optopt = ':'); - } - else - { - data->optarg = argv[data->optind + 1]; - arg_next = 1; - data->optwhere = 1; - } - break; - default: /* shouldn't happen */ - case NO_ARG: - if (longopt_match < 0) - { - data->optwhere++; - if (argv[data->optind][data->optwhere] == '\0') - data->optwhere = 1; - } - else - data->optwhere = 1; - data->optarg = 0; - break; - } - - /* do we have to permute or otherwise modify data->optind? */ - if (ordering == PERMUTE && data->optwhere == 1 && num_nonopts != 0) - { - permute (argv + permute_from, num_nonopts, 1 + arg_next); - data->optind = permute_from + 1 + arg_next; - } - else if (data->optwhere == 1) - data->optind = data->optind + 1 + arg_next; - - /* finally return */ - if (longopt_match >= 0) - { - if (longind != 0) - *longind = longopt_match; - if (longopts[longopt_match].flag != 0) - { - *(longopts[longopt_match].flag) = longopts[longopt_match].val; - return 0; - } - else - return longopts[longopt_match].val; - } - else - return data->optopt; -} - -int -getopt (int argc, char *const argv[], const char *optstring) -{ - struct getopt_data data; - int r; - - read_globals (&data); - r = getopt_internal (argc, argv, optstring, 0, 0, 0, &data); - write_globals (&data); - return r; -} - -int -getopt_long (int argc, char *const argv[], const char *shortopts, - const struct option *longopts, int *longind) -{ - struct getopt_data data; - int r; - - read_globals (&data); - r = getopt_internal (argc, argv, shortopts, longopts, longind, 0, &data); - write_globals (&data); - return r; -} - -int -getopt_long_only (int argc, char *const argv[], const char *shortopts, - const struct option *longopts, int *longind) -{ - struct getopt_data data; - int r; - - read_globals (&data); - r = getopt_internal (argc, argv, shortopts, longopts, longind, 1, &data); - write_globals (&data); - return r; -} - -int -__getopt_r (int argc, char *const argv[], const char *optstring, - struct getopt_data *data) -{ - return getopt_internal (argc, argv, optstring, 0, 0, 0, data); -} - -int -__getopt_long_r (int argc, char *const argv[], const char *shortopts, - const struct option *longopts, int *longind, - struct getopt_data *data) -{ - return getopt_internal (argc, argv, shortopts, longopts, longind, 0, data); -} - -int -__getopt_long_only_r (int argc, char *const argv[], const char *shortopts, - const struct option *longopts, int *longind, - struct getopt_data *data) -{ - return getopt_internal (argc, argv, shortopts, longopts, longind, 1, data); -} - -#endif /* !HAVE_GETOPT */ - -/* end of file GETOPT.C */ diff --git a/newlib/libc/stdlib/getsubopt.3 b/newlib/libc/stdlib/getsubopt.3 deleted file mode 100644 index 83c5f7c6b..000000000 --- a/newlib/libc/stdlib/getsubopt.3 +++ /dev/null @@ -1,149 +0,0 @@ -.\" Copyright (c) 1990, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/stdlib/getsubopt.3,v 1.9 2001/09/07 14:46:35 asmodai Exp $ -.\" -.Dd June 9, 1993 -.Dt GETSUBOPT 3 -.Os -.Sh NAME -.Nm getsubopt -.Nd get sub options from an argument -.Sh LIBRARY -.Lb libc -.Sh SYNOPSIS -.In unistd.h -.Vt extern char *suboptarg ; -.Ft int -.Fn getsubopt "char **optionp" "char * const *tokens" "char **valuep" -.Sh DESCRIPTION -The -.Fn getsubopt -function -parses a string containing tokens delimited by one or more tab, space or -comma -.Pq Ql \&, -characters. -It is intended for use in parsing groups of option arguments provided -as part of a utility command line. -.Pp -The argument -.Fa optionp -is a pointer to a pointer to the string. -The argument -.Fa tokens -is a pointer to a -.Dv NULL Ns -terminated -array of pointers to strings. -.Pp -The -.Fn getsubopt -function -returns the zero-based offset of the pointer in the -.Fa tokens -array referencing a string which matches the first token -in the string, or, \-1 if the string contains no tokens or -.Fa tokens -does not contain a matching string. -.Pp -If the token is of the form ``name=value'', the location referenced by -.Fa valuep -will be set to point to the start of the ``value'' portion of the token. -.Pp -On return from -.Fn getsubopt , -.Fa optionp -will be set to point to the start of the next token in the string, -or the null at the end of the string if no more tokens are present. -The external variable -.Fa suboptarg -will be set to point to the start of the current token, or -.Dv NULL -if no -tokens were present. -The argument -.Fa valuep -will be set to point to the ``value'' portion of the token, or -.Dv NULL -if no ``value'' portion was present. -.Sh EXAMPLES -.Bd -literal -compact -char *tokens[] = { - #define ONE 0 - "one", - #define TWO 1 - "two", - NULL -}; - -\&... - -extern char *optarg, *suboptarg; -char *options, *value; - -while ((ch = getopt(argc, argv, "ab:")) != \-1) { - switch(ch) { - case 'a': - /* process ``a'' option */ - break; - case 'b': - options = optarg; - while (*options) { - switch(getsubopt(&options, tokens, &value)) { - case ONE: - /* process ``one'' sub option */ - break; - case TWO: - /* process ``two'' sub option */ - if (!value) - error("no value for two"); - i = atoi(value); - break; - case \-1: - if (suboptarg) - error("illegal sub option %s", - suboptarg); - else - error("missing sub option"); - break; - } - break; - } -.Ed -.Sh SEE ALSO -.Xr getopt 3 , -.Xr strsep 3 -.Sh HISTORY -The -.Fn getsubopt -function first appeared in -.Bx 4.4 . diff --git a/newlib/libc/stdlib/getsubopt.c b/newlib/libc/stdlib/getsubopt.c deleted file mode 100644 index 250e73d2c..000000000 --- a/newlib/libc/stdlib/getsubopt.c +++ /dev/null @@ -1,101 +0,0 @@ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getsubopt.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -#include <sys/cdefs.h> - -#include <unistd.h> -#include <stdlib.h> -#include <string.h> - -/* - * The SVID interface to getsubopt provides no way of figuring out which - * part of the suboptions list wasn't matched. This makes error messages - * tricky... The extern variable suboptarg is a pointer to the token - * which didn't match. - */ -char *suboptarg; - -int -getsubopt(optionp, tokens, valuep) - char **optionp, **valuep; - char * const *tokens; -{ - int cnt; - char *p; - - suboptarg = *valuep = NULL; - - if (!optionp || !*optionp) - return(-1); - - /* skip leading white-space, commas */ - for (p = *optionp; *p && (*p == ',' || *p == ' ' || *p == '\t'); ++p); - - if (!*p) { - *optionp = p; - return(-1); - } - - /* save the start of the token, and skip the rest of the token. */ - for (suboptarg = p; - *++p && *p != ',' && *p != '=' && *p != ' ' && *p != '\t';); - - if (*p) { - /* - * If there's an equals sign, set the value pointer, and - * skip over the value part of the token. Terminate the - * token. - */ - if (*p == '=') { - *p = '\0'; - for (*valuep = ++p; - *p && *p != ',' && *p != ' ' && *p != '\t'; ++p); - if (*p) - *p++ = '\0'; - } else - *p++ = '\0'; - /* Skip any whitespace or commas after this token. */ - for (; *p && (*p == ',' || *p == ' ' || *p == '\t'); ++p); - } - - /* set optionp for next round. */ - *optionp = p; - - for (cnt = 0; *tokens; ++tokens, ++cnt) - if (!strcmp(suboptarg, *tokens)) - return(cnt); - return(-1); -} diff --git a/newlib/libc/stdlib/jrand48.c b/newlib/libc/stdlib/jrand48.c deleted file mode 100644 index 9e2f92cb6..000000000 --- a/newlib/libc/stdlib/jrand48.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -long -_DEFUN (_jrand48_r, (r, xseed), - struct _reent *r _AND - unsigned short xseed[3]) -{ - __dorand48(r, xseed); - return ((long) xseed[2] << 16) + (long) xseed[1]; -} - -#ifndef _REENT_ONLY -long -_DEFUN (jrand48, (xseed), - unsigned short xseed[3]) -{ - return _jrand48_r (_REENT, xseed); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/l64a.c b/newlib/libc/stdlib/l64a.c deleted file mode 100644 index d415d0478..000000000 --- a/newlib/libc/stdlib/l64a.c +++ /dev/null @@ -1,64 +0,0 @@ -/* l64a - convert long to radix-64 ascii string - * - * Conversion is performed on at most 32-bits of input value starting - * from least significant bits to the most significant bits. - * - * The routine splits the input value into groups of 6 bits for up to - * 32 bits of input. This means that the last group may be 2 bits - * (bits 30 and 31). - * - * Each group of 6 bits forms a value from 0-63 which is converted into - * a character as follows: - * 0 = '.' - * 1 = '/' - * 2-11 = '0' to '9' - * 12-37 = 'A' to 'Z' - * 38-63 = 'a' to 'z' - * - * When the remaining bits are zero or all 32 bits have been translated, - * a nul terminator is appended to the resulting string. An input value of - * 0 results in an empty string. - */ - -#include <_ansi.h> -#include <stdlib.h> -#include <reent.h> - -static const char R64_ARRAY[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - -char * -_DEFUN (l64a, (value), - long value) -{ - return _l64a_r (_REENT, value); -} - -char * -_DEFUN (_l64a_r, (rptr, value), - struct _reent *rptr _AND - long value) -{ - char *ptr; - char *result; - int i, index; - unsigned long tmp = (unsigned long)value & 0xffffffff; - - _REENT_CHECK_MISC(rptr); - result = _REENT_L64A_BUF(rptr); - ptr = result; - - for (i = 0; i < 6; ++i) - { - if (tmp == 0) - { - *ptr = '\0'; - break; - } - - index = tmp & (64 - 1); - *ptr++ = R64_ARRAY[index]; - tmp >>= 6; - } - - return result; -} diff --git a/newlib/libc/stdlib/labs.c b/newlib/libc/stdlib/labs.c deleted file mode 100644 index 634cf7348..000000000 --- a/newlib/libc/stdlib/labs.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -FUNCTION -<<labs>>---long integer absolute value - -INDEX - labs - -ANSI_SYNOPSIS - #include <stdlib.h> - long labs(long <[i]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - long labs(<[i]>) - long <[i]>; - -DESCRIPTION -<<labs>> returns -@tex -$|x|$, -@end tex -the absolute value of <[i]> (also called the magnitude -of <[i]>). That is, if <[i]> is negative, the result is the opposite -of <[i]>, but if <[i]> is nonnegative the result is <[i]>. - -The similar function <<abs>> uses and returns <<int>> rather than -<<long>> values. - -RETURNS -The result is a nonnegative long integer. - -PORTABILITY -<<labs>> is ANSI. - -No supporting OS subroutine calls are required. -*/ - -#include <stdlib.h> - -long -_DEFUN (labs, (x), - long x) -{ - if (x < 0) - { - x = -x; - } - return x; -} diff --git a/newlib/libc/stdlib/lcong48.c b/newlib/libc/stdlib/lcong48.c deleted file mode 100644 index 548f32757..000000000 --- a/newlib/libc/stdlib/lcong48.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -_VOID -_DEFUN (_lcong48_r, (r, p), - struct _reent *r _AND - unsigned short p[7]) -{ - _REENT_CHECK_RAND48(r); - __rand48_seed[0] = p[0]; - __rand48_seed[1] = p[1]; - __rand48_seed[2] = p[2]; - __rand48_mult[0] = p[3]; - __rand48_mult[1] = p[4]; - __rand48_mult[2] = p[5]; - __rand48_add = p[6]; -} - -#ifndef _REENT_ONLY -_VOID -_DEFUN (lcong48, (p), - unsigned short p[7]) -{ - _lcong48_r (_REENT, p); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/ldiv.c b/newlib/libc/stdlib/ldiv.c deleted file mode 100644 index d7508f1c5..000000000 --- a/newlib/libc/stdlib/ldiv.c +++ /dev/null @@ -1,109 +0,0 @@ -/* -FUNCTION -<<ldiv>>---divide two long integers - -INDEX - ldiv - -ANSI_SYNOPSIS - #include <stdlib.h> - ldiv_t ldiv(long <[n]>, long <[d]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - ldiv_t ldiv(<[n]>, <[d]>) - long <[n]>, <[d]>; - -DESCRIPTION -Divide -@tex -$n/d$, -@end tex -@ifnottex -<[n]>/<[d]>, -@end ifnottex -returning quotient and remainder as two long integers in a structure <<ldiv_t>>. - -RETURNS -The result is represented with the structure - -. typedef struct -. { -. long quot; -. long rem; -. } ldiv_t; - -where the <<quot>> field represents the quotient, and <<rem>> the -remainder. For nonzero <[d]>, if `<<<[r]> = ldiv(<[n]>,<[d]>);>>' then -<[n]> equals `<<<[r]>.rem + <[d]>*<[r]>.quot>>'. - -To divide <<int>> rather than <<long>> values, use the similar -function <<div>>. - -PORTABILITY -<<ldiv>> is ANSI. - -No supporting OS subroutines are required. -*/ - - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <stdlib.h> /* ldiv_t */ - -ldiv_t -_DEFUN (ldiv, (num, denom), - long num _AND - long denom) -{ - ldiv_t r; - - /* see div.c for comments */ - - r.quot = num / denom; - r.rem = num % denom; - if (num >= 0 && r.rem < 0) { - ++r.quot; - r.rem -= denom; - } - else if (num < 0 && r.rem > 0) { - --r.quot; - r.rem += denom; - } - return (r); -} diff --git a/newlib/libc/stdlib/ldtoa.c b/newlib/libc/stdlib/ldtoa.c deleted file mode 100644 index ab27e4718..000000000 --- a/newlib/libc/stdlib/ldtoa.c +++ /dev/null @@ -1,3743 +0,0 @@ - /* Extended precision arithmetic functions for long double I/O. - * This program has been placed in the public domain. - */ - -#include <_ansi.h> -#include <reent.h> -#include <string.h> -#include <stdlib.h> -#include "mprec.h" - -/* These are the externally visible entries. */ -/* linux name: long double _IO_strtold (char *, char **); */ -long double _strtold (char *, char **); -char * _ldtoa_r (struct _reent *, long double, int, int, int *, int *, char **); -int _ldcheck (long double *); -#if 0 -void _IO_ldtostr(long double *, char *, int, int, char); -#endif - - /* Number of 16 bit words in external x type format */ - #define NE 10 - - /* Number of 16 bit words in internal format */ - #define NI (NE+3) - - /* Array offset to exponent */ - #define E 1 - - /* Array offset to high guard word */ - #define M 2 - - /* Number of bits of precision */ - #define NBITS ((NI-4)*16) - - /* Maximum number of decimal digits in ASCII conversion - * = NBITS*log10(2) - */ - #define NDEC (NBITS*8/27) - - /* The exponent of 1.0 */ - #define EXONE (0x3fff) - - /* Maximum exponent digits - base 10 */ - #define MAX_EXP_DIGITS 5 - -/* Control structure for long double conversion including rounding precision values. - * rndprc can be set to 80 (if NE=6), 64, 56, 53, or 24 bits. - */ -typedef struct -{ - int rlast; - int rndprc; - int rw; - int re; - int outexpon; - unsigned short rmsk; - unsigned short rmbit; - unsigned short rebit; - unsigned short rbit[NI]; - unsigned short equot[NI]; -} LDPARMS; - -static void esub(short unsigned int *a, short unsigned int *b, short unsigned int *c, LDPARMS *ldp); -static void emul(short unsigned int *a, short unsigned int *b, short unsigned int *c, LDPARMS *ldp); -static void ediv(short unsigned int *a, short unsigned int *b, short unsigned int *c, LDPARMS *ldp); -static int ecmp(short unsigned int *a, short unsigned int *b); -static int enormlz(short unsigned int *x); -static int eshift(short unsigned int *x, int sc); -static void eshup1(register short unsigned int *x); -static void eshup8(register short unsigned int *x); -static void eshup6(register short unsigned int *x); -static void eshdn1(register short unsigned int *x); -static void eshdn8(register short unsigned int *x); -static void eshdn6(register short unsigned int *x); -static void eneg(short unsigned int *x); -static void emov(register short unsigned int *a, register short unsigned int *b); -static void eclear(register short unsigned int *x); -static void einfin(register short unsigned int *x, register LDPARMS *ldp); -static void efloor(short unsigned int *x, short unsigned int *y, LDPARMS *ldp); -static void etoasc(short unsigned int *x, char *string, int ndigs, int outformat, LDPARMS *ldp); - -union uconv -{ - unsigned short pe; - long double d; -}; - -#if LDBL_MANT_DIG == 24 -static void e24toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp); -#elif LDBL_MANT_DIG == 53 -static void e53toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp); -#elif LDBL_MANT_DIG == 64 -static void e64toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp); -#else -static void e113toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp); -#endif - -/* econst.c */ -/* e type constants used by high precision check routines */ - -#if NE == 10 -/* 0.0 */ -static unsigned short ezero[NE] = - {0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,}; - -/* 1.0E0 */ -static unsigned short eone[NE] = - {0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x3fff,}; - -#else - -/* 0.0 */ -static unsigned short ezero[NE] = { -0, 0000000,0000000,0000000,0000000,0000000,}; -/* 1.0E0 */ -static unsigned short eone[NE] = { -0, 0000000,0000000,0000000,0100000,0x3fff,}; - -#endif - -/* Debugging routine for displaying errors */ -#ifdef DEBUG -/* Notice: the order of appearance of the following - * messages is bound to the error codes defined - * in mconf.h. - */ -static char *ermsg[7] = { -"unknown", /* error code 0 */ -"domain", /* error code 1 */ -"singularity", /* et seq. */ -"overflow", -"underflow", -"total loss of precision", -"partial loss of precision" -}; -#define mtherr(name, code) printf( "\n%s %s error\n", name, ermsg[code] ); -#else -#define mtherr(name, code) -#endif - -/* ieee.c - * - * Extended precision IEEE binary floating point arithmetic routines - * - * Numbers are stored in C language as arrays of 16-bit unsigned - * short integers. The arguments of the routines are pointers to - * the arrays. - * - * - * External e type data structure, simulates Intel 8087 chip - * temporary real format but possibly with a larger significand: - * - * NE-1 significand words (least significant word first, - * most significant bit is normally set) - * exponent (value = EXONE for 1.0, - * top bit is the sign) - * - * - * Internal data structure of a number (a "word" is 16 bits): - * - * ei[0] sign word (0 for positive, 0xffff for negative) - * ei[1] biased exponent (value = EXONE for the number 1.0) - * ei[2] high guard word (always zero after normalization) - * ei[3] - * to ei[NI-2] significand (NI-4 significand words, - * most significant word first, - * most significant bit is set) - * ei[NI-1] low guard word (0x8000 bit is rounding place) - * - * - * - * Routines for external format numbers - * - * asctoe( string, e ) ASCII string to extended double e type - * asctoe64( string, &d ) ASCII string to long double - * asctoe53( string, &d ) ASCII string to double - * asctoe24( string, &f ) ASCII string to single - * asctoeg( string, e, prec, ldp ) ASCII string to specified precision - * e24toe( &f, e, ldp ) IEEE single precision to e type - * e53toe( &d, e, ldp ) IEEE double precision to e type - * e64toe( &d, e, ldp ) IEEE long double precision to e type - * e113toe( &d, e, ldp ) IEEE long double precision to e type - * eabs(e) absolute value - * eadd( a, b, c ) c = b + a - * eclear(e) e = 0 - * ecmp (a, b) Returns 1 if a > b, 0 if a == b, - * -1 if a < b, -2 if either a or b is a NaN. - * ediv( a, b, c, ldp ) c = b / a - * efloor( a, b, ldp ) truncate to integer, toward -infinity - * efrexp( a, exp, s ) extract exponent and significand - * eifrac( e, &l, frac ) e to long integer and e type fraction - * euifrac( e, &l, frac ) e to unsigned long integer and e type fraction - * einfin( e, ldp ) set e to infinity, leaving its sign alone - * eldexp( a, n, b ) multiply by 2**n - * emov( a, b ) b = a - * emul( a, b, c, ldp ) c = b * a - * eneg(e) e = -e - * eround( a, b ) b = nearest integer value to a - * esub( a, b, c, ldp ) c = b - a - * e24toasc( &f, str, n ) single to ASCII string, n digits after decimal - * e53toasc( &d, str, n ) double to ASCII string, n digits after decimal - * e64toasc( &d, str, n ) long double to ASCII string - * etoasc(e,str,n,fmt,ldp)e to ASCII string, n digits after decimal - * etoe24( e, &f ) convert e type to IEEE single precision - * etoe53( e, &d ) convert e type to IEEE double precision - * etoe64( e, &d ) convert e type to IEEE long double precision - * ltoe( &l, e ) long (32 bit) integer to e type - * ultoe( &l, e ) unsigned long (32 bit) integer to e type - * eisneg( e ) 1 if sign bit of e != 0, else 0 - * eisinf( e ) 1 if e has maximum exponent (non-IEEE) - * or is infinite (IEEE) - * eisnan( e ) 1 if e is a NaN - * esqrt( a, b ) b = square root of a - * - * - * Routines for internal format numbers - * - * eaddm( ai, bi ) add significands, bi = bi + ai - * ecleaz(ei) ei = 0 - * ecleazs(ei) set ei = 0 but leave its sign alone - * ecmpm( ai, bi ) compare significands, return 1, 0, or -1 - * edivm( ai, bi, ldp ) divide significands, bi = bi / ai - * emdnorm(ai,l,s,exp,ldp) normalize and round off - * emovi( a, ai ) convert external a to internal ai - * emovo( ai, a, ldp ) convert internal ai to external a - * emovz( ai, bi ) bi = ai, low guard word of bi = 0 - * emulm( ai, bi, ldp ) multiply significands, bi = bi * ai - * enormlz(ei) left-justify the significand - * eshdn1( ai ) shift significand and guards down 1 bit - * eshdn8( ai ) shift down 8 bits - * eshdn6( ai ) shift down 16 bits - * eshift( ai, n ) shift ai n bits up (or down if n < 0) - * eshup1( ai ) shift significand and guards up 1 bit - * eshup8( ai ) shift up 8 bits - * eshup6( ai ) shift up 16 bits - * esubm( ai, bi ) subtract significands, bi = bi - ai - * - * - * The result is always normalized and rounded to NI-4 word precision - * after each arithmetic operation. - * - * Exception flags are NOT fully supported. - * - * Define USE_INFINITY in mconf.h for support of infinity; otherwise a - * saturation arithmetic is implemented. - * - * Define NANS for support of Not-a-Number items; otherwise the - * arithmetic will never produce a NaN output, and might be confused - * by a NaN input. - * If NaN's are supported, the output of ecmp(a,b) is -2 if - * either a or b is a NaN. This means asking if(ecmp(a,b) < 0) - * may not be legitimate. Use if(ecmp(a,b) == -1) for less-than - * if in doubt. - * Signaling NaN's are NOT supported; they are treated the same - * as quiet NaN's. - * - * Denormals are always supported here where appropriate (e.g., not - * for conversion to DEC numbers). - */ - -/* - * Revision history: - * - * 5 Jan 84 PDP-11 assembly language version - * 6 Dec 86 C language version - * 30 Aug 88 100 digit version, improved rounding - * 15 May 92 80-bit long double support - * 22 Nov 00 Revised to fit into newlib by Jeff Johnston <jjohnstn@redhat.com> - * - * Author: S. L. Moshier. - * - * Copyright (c) 1984,2000 S.L. Moshier - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION - * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS - * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - */ - -#include <stdio.h> -/* #include "\usr\include\stdio.h" */ -/*#include "ehead.h"*/ -/*#include "mconf.h"*/ -/* mconf.h - * - * Common include file for math routines - * - * - * - * SYNOPSIS: - * - * #include "mconf.h" - * - * - * - * DESCRIPTION: - * - * This file contains definitions for error codes that are - * passed to the common error handling routine mtherr() - * (which see). - * - * The file also includes a conditional assembly definition - * for the type of computer arithmetic (IEEE, DEC, Motorola - * IEEE, or UNKnown). - * - * For Digital Equipment PDP-11 and VAX computers, certain - * IBM systems, and others that use numbers with a 56-bit - * significand, the symbol DEC should be defined. In this - * mode, most floating point constants are given as arrays - * of octal integers to eliminate decimal to binary conversion - * errors that might be introduced by the compiler. - * - * For computers, such as IBM PC, that follow the IEEE - * Standard for Binary Floating Point Arithmetic (ANSI/IEEE - * Std 754-1985), the symbol IBMPC should be defined. These - * numbers have 53-bit significands. In this mode, constants - * are provided as arrays of hexadecimal 16 bit integers. - * - * To accommodate other types of computer arithmetic, all - * constants are also provided in a normal decimal radix - * which one can hope are correctly converted to a suitable - * format by the available C language compiler. To invoke - * this mode, the symbol UNK is defined. - * - * An important difference among these modes is a predefined - * set of machine arithmetic constants for each. The numbers - * MACHEP (the machine roundoff error), MAXNUM (largest number - * represented), and several other parameters are preset by - * the configuration symbol. Check the file const.c to - * ensure that these values are correct for your computer. - * - * For ANSI C compatibility, define ANSIC equal to 1. Currently - * this affects only the atan2() function and others that use it. - */ - -/* Constant definitions for math error conditions - */ - -#define DOMAIN 1 /* argument domain error */ -#define SING 2 /* argument singularity */ -#define OVERFLOW 3 /* overflow range error */ -#define UNDERFLOW 4 /* underflow range error */ -#define TLOSS 5 /* total loss of precision */ -#define PLOSS 6 /* partial loss of precision */ - -#define EDOM 33 -#define ERANGE 34 - -typedef struct - { - double r; - double i; - }cmplx; - -/* Type of computer arithmetic */ - -#ifndef DEC -#ifdef __IEEE_LITTLE_ENDIAN -#define IBMPC 1 -#else /* !__IEEE_LITTLE_ENDIAN */ -#define MIEEE 1 -#endif /* !__IEEE_LITTLE_ENDIAN */ -#endif /* !DEC */ - -/* Define 1 for ANSI C atan2() function - * See atan.c and clog.c. - */ -#define ANSIC 1 - -/*define VOLATILE volatile*/ -#define VOLATILE - -#define NANS -#define USE_INFINITY - -/* NaN's require infinity support. */ -#ifdef NANS -#ifndef INFINITY -#define USE_INFINITY -#endif -#endif - -/* This handles 64-bit long ints. */ -#define LONGBITS (8 * sizeof(long)) - - -static void eaddm(short unsigned int *x, short unsigned int *y); -static void esubm(short unsigned int *x, short unsigned int *y); -static void emdnorm(short unsigned int *s, int lost, int subflg, long int exp, int rcntrl, LDPARMS *ldp); -static int asctoeg(char *ss, short unsigned int *y, int oprec, LDPARMS *ldp); -static void enan(short unsigned int *nan, int size); -#if LDBL_MANT_DIG == 24 -static void toe24(short unsigned int *x, short unsigned int *y); -#elif LDBL_MANT_DIG == 53 -static void toe53(short unsigned int *x, short unsigned int *y); -#elif LDBL_MANT_DIG == 64 -static void toe64(short unsigned int *a, short unsigned int *b); -#else -static void toe113(short unsigned int *a, short unsigned int *b); -#endif -static void eiremain(short unsigned int *den, short unsigned int *num, LDPARMS *ldp); -static int ecmpm(register short unsigned int *a, register short unsigned int *b); -static int edivm(short unsigned int *den, short unsigned int *num, LDPARMS *ldp); -static int emulm(short unsigned int *a, short unsigned int *b, LDPARMS *ldp); -static int eisneg(short unsigned int *x); -static int eisinf(short unsigned int *x); -static void emovi(short unsigned int *a, short unsigned int *b); -static void emovo(short unsigned int *a, short unsigned int *b, LDPARMS *ldp); -static void emovz(register short unsigned int *a, register short unsigned int *b); -static void ecleaz(register short unsigned int *xi); -static void eadd1(short unsigned int *a, short unsigned int *b, short unsigned int *c, int subflg, LDPARMS *ldp); -static int eisnan(short unsigned int *x); -static int eiisnan(short unsigned int *x); - -#ifdef DEC -static void etodec(), todec(), dectoe(); -#endif - -/* -; Clear out entire external format number. -; -; unsigned short x[]; -; eclear( x ); -*/ - -static void eclear(register short unsigned int *x) -{ -register int i; - -for( i=0; i<NE; i++ ) - *x++ = 0; -} - - - -/* Move external format number from a to b. - * - * emov( a, b ); - */ - -static void emov(register short unsigned int *a, register short unsigned int *b) -{ -register int i; - -for( i=0; i<NE; i++ ) - *b++ = *a++; -} - - -/* -; Negate external format number -; -; unsigned short x[NE]; -; eneg( x ); -*/ - -static void eneg(short unsigned int *x) -{ - -#ifdef NANS -if( eisnan(x) ) - return; -#endif -x[NE-1] ^= 0x8000; /* Toggle the sign bit */ -} - - - -/* Return 1 if external format number is negative, - * else return zero. - */ -static int eisneg(short unsigned int *x) -{ - -#ifdef NANS -if( eisnan(x) ) - return( 0 ); -#endif -if( x[NE-1] & 0x8000 ) - return( 1 ); -else - return( 0 ); -} - - -/* Return 1 if external format number has maximum possible exponent, - * else return zero. - */ -static int eisinf(short unsigned int *x) -{ - -if( (x[NE-1] & 0x7fff) == 0x7fff ) - { -#ifdef NANS - if( eisnan(x) ) - return( 0 ); -#endif - return( 1 ); - } -else - return( 0 ); -} - -/* Check if e-type number is not a number. - */ -static int eisnan(short unsigned int *x) -{ - -#ifdef NANS -int i; -/* NaN has maximum exponent */ -if( (x[NE-1] & 0x7fff) != 0x7fff ) - return (0); -/* ... and non-zero significand field. */ -for( i=0; i<NE-1; i++ ) - { - if( *x++ != 0 ) - return (1); - } -#endif -return (0); -} - -/* -; Fill entire number, including exponent and significand, with -; largest possible number. These programs implement a saturation -; value that is an ordinary, legal number. A special value -; "infinity" may also be implemented; this would require tests -; for that value and implementation of special rules for arithmetic -; operations involving inifinity. -*/ - -static void einfin(register short unsigned int *x, register LDPARMS *ldp) -{ -register int i; - -#ifdef USE_INFINITY -for( i=0; i<NE-1; i++ ) - *x++ = 0; -*x |= 32767; -ldp = ldp; -#else -for( i=0; i<NE-1; i++ ) - *x++ = 0xffff; -*x |= 32766; -if( ldp->rndprc < NBITS ) - { - if (ldp->rndprc == 113) - { - *(x - 9) = 0; - *(x - 8) = 0; - } - if( ldp->rndprc == 64 ) - { - *(x-5) = 0; - } - if( ldp->rndprc == 53 ) - { - *(x-4) = 0xf800; - } - else - { - *(x-4) = 0; - *(x-3) = 0; - *(x-2) = 0xff00; - } - } -#endif -} - -/* Move in external format number, - * converting it to internal format. - */ -static void emovi(short unsigned int *a, short unsigned int *b) -{ -register unsigned short *p, *q; -int i; - -q = b; -p = a + (NE-1); /* point to last word of external number */ -/* get the sign bit */ -if( *p & 0x8000 ) - *q++ = 0xffff; -else - *q++ = 0; -/* get the exponent */ -*q = *p--; -*q++ &= 0x7fff; /* delete the sign bit */ -#ifdef USE_INFINITY -if( (*(q-1) & 0x7fff) == 0x7fff ) - { -#ifdef NANS - if( eisnan(a) ) - { - *q++ = 0; - for( i=3; i<NI; i++ ) - *q++ = *p--; - return; - } -#endif - for( i=2; i<NI; i++ ) - *q++ = 0; - return; - } -#endif -/* clear high guard word */ -*q++ = 0; -/* move in the significand */ -for( i=0; i<NE-1; i++ ) - *q++ = *p--; -/* clear low guard word */ -*q = 0; -} - - -/* Move internal format number out, - * converting it to external format. - */ -static void emovo(short unsigned int *a, short unsigned int *b, LDPARMS *ldp) -{ -register unsigned short *p, *q; -unsigned short i; - -p = a; -q = b + (NE-1); /* point to output exponent */ -/* combine sign and exponent */ -i = *p++; -if( i ) - *q-- = *p++ | 0x8000; -else - *q-- = *p++; -#ifdef USE_INFINITY -if( *(p-1) == 0x7fff ) - { -#ifdef NANS - if( eiisnan(a) ) - { - enan( b, NBITS ); - return; - } -#endif - einfin(b, ldp); - return; - } -#endif -/* skip over guard word */ -++p; -/* move the significand */ -for( i=0; i<NE-1; i++ ) - *q-- = *p++; -} - - -/* Clear out internal format number. - */ - -static void ecleaz(register short unsigned int *xi) -{ -register int i; - -for( i=0; i<NI; i++ ) - *xi++ = 0; -} - -/* same, but don't touch the sign. */ - -static void ecleazs(register short unsigned int *xi) -{ -register int i; - -++xi; -for(i=0; i<NI-1; i++) - *xi++ = 0; -} - - - - -/* Move internal format number from a to b. - */ -static void emovz(register short unsigned int *a, register short unsigned int *b) -{ -register int i; - -for( i=0; i<NI-1; i++ ) - *b++ = *a++; -/* clear low guard word */ -*b = 0; -} - -/* Return nonzero if internal format number is a NaN. - */ - -static int eiisnan (short unsigned int *x) -{ -int i; - -if( (x[E] & 0x7fff) == 0x7fff ) - { - for( i=M+1; i<NI; i++ ) - { - if( x[i] != 0 ) - return(1); - } - } -return(0); -} - -#if LDBL_MANT_DIG == 64 - -/* Return nonzero if internal format number is infinite. */ -static int -eiisinf (unsigned short x[]) -{ - -#ifdef NANS - if (eiisnan (x)) - return (0); -#endif - if ((x[E] & 0x7fff) == 0x7fff) - return (1); - return (0); -} -#endif /* LDBL_MANT_DIG == 64 */ - -/* -; Compare significands of numbers in internal format. -; Guard words are included in the comparison. -; -; unsigned short a[NI], b[NI]; -; cmpm( a, b ); -; -; for the significands: -; returns +1 if a > b -; 0 if a == b -; -1 if a < b -*/ -static int ecmpm(register short unsigned int *a, register short unsigned int *b) -{ -int i; - -a += M; /* skip up to significand area */ -b += M; -for( i=M; i<NI; i++ ) - { - if( *a++ != *b++ ) - goto difrnt; - } -return(0); - -difrnt: -if( *(--a) > *(--b) ) - return(1); -else - return(-1); -} - - -/* -; Shift significand down by 1 bit -*/ - -static void eshdn1(register short unsigned int *x) -{ -register unsigned short bits; -int i; - -x += M; /* point to significand area */ - -bits = 0; -for( i=M; i<NI; i++ ) - { - if( *x & 1 ) - bits |= 1; - *x >>= 1; - if( bits & 2 ) - *x |= 0x8000; - bits <<= 1; - ++x; - } -} - - - -/* -; Shift significand up by 1 bit -*/ - -static void eshup1(register short unsigned int *x) -{ -register unsigned short bits; -int i; - -x += NI-1; -bits = 0; - -for( i=M; i<NI; i++ ) - { - if( *x & 0x8000 ) - bits |= 1; - *x <<= 1; - if( bits & 2 ) - *x |= 1; - bits <<= 1; - --x; - } -} - - - -/* -; Shift significand down by 8 bits -*/ - -static void eshdn8(register short unsigned int *x) -{ -register unsigned short newbyt, oldbyt; -int i; - -x += M; -oldbyt = 0; -for( i=M; i<NI; i++ ) - { - newbyt = *x << 8; - *x >>= 8; - *x |= oldbyt; - oldbyt = newbyt; - ++x; - } -} - -/* -; Shift significand up by 8 bits -*/ - -static void eshup8(register short unsigned int *x) -{ -int i; -register unsigned short newbyt, oldbyt; - -x += NI-1; -oldbyt = 0; - -for( i=M; i<NI; i++ ) - { - newbyt = *x >> 8; - *x <<= 8; - *x |= oldbyt; - oldbyt = newbyt; - --x; - } -} - -/* -; Shift significand up by 16 bits -*/ - -static void eshup6(register short unsigned int *x) -{ -int i; -register unsigned short *p; - -p = x + M; -x += M + 1; - -for( i=M; i<NI-1; i++ ) - *p++ = *x++; - -*p = 0; -} - -/* -; Shift significand down by 16 bits -*/ - -static void eshdn6(register short unsigned int *x) -{ -int i; -register unsigned short *p; - -x += NI-1; -p = x + 1; - -for( i=M; i<NI-1; i++ ) - *(--p) = *(--x); - -*(--p) = 0; -} - -/* -; Add significands -; x + y replaces y -*/ - -static void eaddm(short unsigned int *x, short unsigned int *y) -{ -register unsigned long a; -int i; -unsigned int carry; - -x += NI-1; -y += NI-1; -carry = 0; -for( i=M; i<NI; i++ ) - { - a = (unsigned long )(*x) + (unsigned long )(*y) + carry; - if( a & 0x10000 ) - carry = 1; - else - carry = 0; - *y = (unsigned short )a; - --x; - --y; - } -} - -/* -; Subtract significands -; y - x replaces y -*/ - -static void esubm(short unsigned int *x, short unsigned int *y) -{ -unsigned long a; -int i; -unsigned int carry; - -x += NI-1; -y += NI-1; -carry = 0; -for( i=M; i<NI; i++ ) - { - a = (unsigned long )(*y) - (unsigned long )(*x) - carry; - if( a & 0x10000 ) - carry = 1; - else - carry = 0; - *y = (unsigned short )a; - --x; - --y; - } -} - - -/* Divide significands */ - - -/* Multiply significand of e-type number b -by 16-bit quantity a, e-type result to c. */ - -static void m16m(short unsigned int a, short unsigned int *b, short unsigned int *c) -{ -register unsigned short *pp; -register unsigned long carry; -unsigned short *ps; -unsigned short p[NI]; -unsigned long aa, m; -int i; - -aa = a; -pp = &p[NI-2]; -*pp++ = 0; -*pp = 0; -ps = &b[NI-1]; - -for( i=M+1; i<NI; i++ ) - { - if( *ps == 0 ) - { - --ps; - --pp; - *(pp-1) = 0; - } - else - { - m = (unsigned long) aa * *ps--; - carry = (m & 0xffff) + *pp; - *pp-- = (unsigned short )carry; - carry = (carry >> 16) + (m >> 16) + *pp; - *pp = (unsigned short )carry; - *(pp-1) = carry >> 16; - } - } -for( i=M; i<NI; i++ ) - c[i] = p[i]; -} - - -/* Divide significands. Neither the numerator nor the denominator -is permitted to have its high guard word nonzero. */ - - -static int edivm(short unsigned int *den, short unsigned int *num, LDPARMS *ldp) -{ -int i; -register unsigned short *p; -unsigned long tnum; -unsigned short j, tdenm, tquot; -unsigned short tprod[NI+1]; -unsigned short *equot = ldp->equot; - -p = &equot[0]; -*p++ = num[0]; -*p++ = num[1]; - -for( i=M; i<NI; i++ ) - { - *p++ = 0; - } -eshdn1( num ); -tdenm = den[M+1]; -for( i=M; i<NI; i++ ) - { - /* Find trial quotient digit (the radix is 65536). */ - tnum = (((unsigned long) num[M]) << 16) + num[M+1]; - - /* Do not execute the divide instruction if it will overflow. */ - if( (tdenm * 0xffffUL) < tnum ) - tquot = 0xffff; - else - tquot = tnum / tdenm; - - /* Prove that the divide worked. */ -/* - tcheck = (unsigned long )tquot * tdenm; - if( tnum - tcheck > tdenm ) - tquot = 0xffff; -*/ - /* Multiply denominator by trial quotient digit. */ - m16m( tquot, den, tprod ); - /* The quotient digit may have been overestimated. */ - if( ecmpm( tprod, num ) > 0 ) - { - tquot -= 1; - esubm( den, tprod ); - if( ecmpm( tprod, num ) > 0 ) - { - tquot -= 1; - esubm( den, tprod ); - } - } -/* - if( ecmpm( tprod, num ) > 0 ) - { - eshow( "tprod", tprod ); - eshow( "num ", num ); - printf( "tnum = %08lx, tden = %04x, tquot = %04x\n", - tnum, den[M+1], tquot ); - } -*/ - esubm( tprod, num ); -/* - if( ecmpm( num, den ) >= 0 ) - { - eshow( "num ", num ); - eshow( "den ", den ); - printf( "tnum = %08lx, tden = %04x, tquot = %04x\n", - tnum, den[M+1], tquot ); - } -*/ - equot[i] = tquot; - eshup6(num); - } -/* test for nonzero remainder after roundoff bit */ -p = &num[M]; -j = 0; -for( i=M; i<NI; i++ ) - { - j |= *p++; - } -if( j ) - j = 1; - -for( i=0; i<NI; i++ ) - num[i] = equot[i]; - -return( (int )j ); -} - - - -/* Multiply significands */ -static int emulm(short unsigned int *a, short unsigned int *b, LDPARMS *ldp) -{ -unsigned short *p, *q; -unsigned short pprod[NI]; -unsigned short j; -int i; -unsigned short *equot = ldp->equot; - -equot[0] = b[0]; -equot[1] = b[1]; -for( i=M; i<NI; i++ ) - equot[i] = 0; - -j = 0; -p = &a[NI-1]; -q = &equot[NI-1]; -for( i=M+1; i<NI; i++ ) - { - if( *p == 0 ) - { - --p; - } - else - { - m16m( *p--, b, pprod ); - eaddm(pprod, equot); - } - j |= *q; - eshdn6(equot); - } - -for( i=0; i<NI; i++ ) - b[i] = equot[i]; - -/* return flag for lost nonzero bits */ -return( (int)j ); -} - - -/* -static void eshow(str, x) -char *str; -unsigned short *x; -{ -int i; - -printf( "%s ", str ); -for( i=0; i<NI; i++ ) - printf( "%04x ", *x++ ); -printf( "\n" ); -} -*/ - - -/* - * Normalize and round off. - * - * The internal format number to be rounded is "s". - * Input "lost" indicates whether the number is exact. - * This is the so-called sticky bit. - * - * Input "subflg" indicates whether the number was obtained - * by a subtraction operation. In that case if lost is nonzero - * then the number is slightly smaller than indicated. - * - * Input "exp" is the biased exponent, which may be negative. - * the exponent field of "s" is ignored but is replaced by - * "exp" as adjusted by normalization and rounding. - * - * Input "rcntrl" is the rounding control. - */ - - -static void emdnorm(short unsigned int *s, int lost, int subflg, long int exp, int rcntrl, LDPARMS *ldp) -{ -int i, j; -unsigned short r; - -/* Normalize */ -j = enormlz( s ); - -/* a blank significand could mean either zero or infinity. */ -#ifndef USE_INFINITY -if( j > NBITS ) - { - ecleazs( s ); - return; - } -#endif -exp -= j; -#ifndef USE_INFINITY -if( exp >= 32767L ) - goto overf; -#else -if( (j > NBITS) && (exp < 32767L) ) - { - ecleazs( s ); - return; - } -#endif -if( exp < 0L ) - { - if( exp > (long )(-NBITS-1) ) - { - j = (int )exp; - i = eshift( s, j ); - if( i ) - lost = 1; - } - else - { - ecleazs( s ); - return; - } - } -/* Round off, unless told not to by rcntrl. */ -if( rcntrl == 0 ) - goto mdfin; -/* Set up rounding parameters if the control register changed. */ -if( ldp->rndprc != ldp->rlast ) - { - ecleaz( ldp->rbit ); - switch( ldp->rndprc ) - { - default: - case NBITS: - ldp->rw = NI-1; /* low guard word */ - ldp->rmsk = 0xffff; - ldp->rmbit = 0x8000; - ldp->rebit = 1; - ldp->re = ldp->rw - 1; - break; - case 113: - ldp->rw = 10; - ldp->rmsk = 0x7fff; - ldp->rmbit = 0x4000; - ldp->rebit = 0x8000; - ldp->re = ldp->rw; - break; - case 64: - ldp->rw = 7; - ldp->rmsk = 0xffff; - ldp->rmbit = 0x8000; - ldp->rebit = 1; - ldp->re = ldp->rw-1; - break; -/* For DEC arithmetic */ - case 56: - ldp->rw = 6; - ldp->rmsk = 0xff; - ldp->rmbit = 0x80; - ldp->rebit = 0x100; - ldp->re = ldp->rw; - break; - case 53: - ldp->rw = 6; - ldp->rmsk = 0x7ff; - ldp->rmbit = 0x0400; - ldp->rebit = 0x800; - ldp->re = ldp->rw; - break; - case 24: - ldp->rw = 4; - ldp->rmsk = 0xff; - ldp->rmbit = 0x80; - ldp->rebit = 0x100; - ldp->re = ldp->rw; - break; - } - ldp->rbit[ldp->re] = ldp->rebit; - ldp->rlast = ldp->rndprc; - } - -/* Shift down 1 temporarily if the data structure has an implied - * most significant bit and the number is denormal. - * For rndprc = 64 or NBITS, there is no implied bit. - * But Intel long double denormals lose one bit of significance even so. - */ -#if IBMPC -if( (exp <= 0) && (ldp->rndprc != NBITS) ) -#else -if( (exp <= 0) && (ldp->rndprc != 64) && (ldp->rndprc != NBITS) ) -#endif - { - lost |= s[NI-1] & 1; - eshdn1(s); - } -/* Clear out all bits below the rounding bit, - * remembering in r if any were nonzero. - */ -r = s[ldp->rw] & ldp->rmsk; -if( ldp->rndprc < NBITS ) - { - i = ldp->rw + 1; - while( i < NI ) - { - if( s[i] ) - r |= 1; - s[i] = 0; - ++i; - } - } -s[ldp->rw] &= ~ldp->rmsk; -if( (r & ldp->rmbit) != 0 ) - { - if( r == ldp->rmbit ) - { - if( lost == 0 ) - { /* round to even */ - if( (s[ldp->re] & ldp->rebit) == 0 ) - goto mddone; - } - else - { - if( subflg != 0 ) - goto mddone; - } - } - eaddm( ldp->rbit, s ); - } -mddone: -#if IBMPC -if( (exp <= 0) && (ldp->rndprc != NBITS) ) -#else -if( (exp <= 0) && (ldp->rndprc != 64) && (ldp->rndprc != NBITS) ) -#endif - { - eshup1(s); - } -if( s[2] != 0 ) - { /* overflow on roundoff */ - eshdn1(s); - exp += 1; - } -mdfin: -s[NI-1] = 0; -if( exp >= 32767L ) - { -#ifndef USE_INFINITY -overf: -#endif -#ifdef USE_INFINITY - s[1] = 32767; - for( i=2; i<NI-1; i++ ) - s[i] = 0; -#else - s[1] = 32766; - s[2] = 0; - for( i=M+1; i<NI-1; i++ ) - s[i] = 0xffff; - s[NI-1] = 0; - if( (ldp->rndprc < 64) || (ldp->rndprc == 113) ) - { - s[ldp->rw] &= ~ldp->rmsk; - if( ldp->rndprc == 24 ) - { - s[5] = 0; - s[6] = 0; - } - } -#endif - return; - } -if( exp < 0 ) - s[1] = 0; -else - s[1] = (unsigned short )exp; -} - - - -/* -; Subtract external format numbers. -; -; unsigned short a[NE], b[NE], c[NE]; -; LDPARMS *ldp; -; esub( a, b, c, ldp ); c = b - a -*/ - -static void esub(short unsigned int *a, short unsigned int *b, short unsigned int *c, LDPARMS *ldp) -{ - -#ifdef NANS -if( eisnan(a) ) - { - emov (a, c); - return; - } -if( eisnan(b) ) - { - emov(b,c); - return; - } -/* Infinity minus infinity is a NaN. - * Test for subtracting infinities of the same sign. - */ -if( eisinf(a) && eisinf(b) && ((eisneg (a) ^ eisneg (b)) == 0)) - { - mtherr( "esub", DOMAIN ); - enan( c, NBITS ); - return; - } -#endif -eadd1( a, b, c, 1, ldp ); -} - - - -static void eadd1(short unsigned int *a, short unsigned int *b, short unsigned int *c, int subflg, LDPARMS *ldp) -{ -unsigned short ai[NI], bi[NI], ci[NI]; -int i, lost, j, k; -long lt, lta, ltb; - -#ifdef USE_INFINITY -if( eisinf(a) ) - { - emov(a,c); - if( subflg ) - eneg(c); - return; - } -if( eisinf(b) ) - { - emov(b,c); - return; - } -#endif -emovi( a, ai ); -emovi( b, bi ); -if( subflg ) - ai[0] = ~ai[0]; - -/* compare exponents */ -lta = ai[E]; -ltb = bi[E]; -lt = lta - ltb; -if( lt > 0L ) - { /* put the larger number in bi */ - emovz( bi, ci ); - emovz( ai, bi ); - emovz( ci, ai ); - ltb = bi[E]; - lt = -lt; - } -lost = 0; -if( lt != 0L ) - { - if( lt < (long )(-NBITS-1) ) - goto done; /* answer same as larger addend */ - k = (int )lt; - lost = eshift( ai, k ); /* shift the smaller number down */ - } -else - { -/* exponents were the same, so must compare significands */ - i = ecmpm( ai, bi ); - if( i == 0 ) - { /* the numbers are identical in magnitude */ - /* if different signs, result is zero */ - if( ai[0] != bi[0] ) - { - eclear(c); - return; - } - /* if same sign, result is double */ - /* double denomalized tiny number */ - if( (bi[E] == 0) && ((bi[3] & 0x8000) == 0) ) - { - eshup1( bi ); - goto done; - } - /* add 1 to exponent unless both are zero! */ - for( j=1; j<NI-1; j++ ) - { - if( bi[j] != 0 ) - { -/* This could overflow, but let emovo take care of that. */ - ltb += 1; - break; - } - } - bi[E] = (unsigned short )ltb; - goto done; - } - if( i > 0 ) - { /* put the larger number in bi */ - emovz( bi, ci ); - emovz( ai, bi ); - emovz( ci, ai ); - } - } -if( ai[0] == bi[0] ) - { - eaddm( ai, bi ); - subflg = 0; - } -else - { - esubm( ai, bi ); - subflg = 1; - } -emdnorm( bi, lost, subflg, ltb, 64, ldp ); - -done: -emovo( bi, c, ldp ); -} - - - -/* -; Divide. -; -; unsigned short a[NE], b[NE], c[NE]; -; LDPARMS *ldp; -; ediv( a, b, c, ldp ); c = b / a -*/ -static void ediv(short unsigned int *a, short unsigned int *b, short unsigned int *c, LDPARMS *ldp) -{ -unsigned short ai[NI], bi[NI]; -int i; -long lt, lta, ltb; - -#ifdef NANS -/* Return any NaN input. */ -if( eisnan(a) ) - { - emov(a,c); - return; - } -if( eisnan(b) ) - { - emov(b,c); - return; - } -/* Zero over zero, or infinity over infinity, is a NaN. */ -if( ((ecmp(a,ezero) == 0) && (ecmp(b,ezero) == 0)) - || (eisinf (a) && eisinf (b)) ) - { - mtherr( "ediv", DOMAIN ); - enan( c, NBITS ); - return; - } -#endif -/* Infinity over anything else is infinity. */ -#ifdef USE_INFINITY -if( eisinf(b) ) - { - if( eisneg(a) ^ eisneg(b) ) - *(c+(NE-1)) = 0x8000; - else - *(c+(NE-1)) = 0; - einfin(c, ldp); - return; - } -if( eisinf(a) ) - { - eclear(c); - return; - } -#endif -emovi( a, ai ); -emovi( b, bi ); -lta = ai[E]; -ltb = bi[E]; -if( bi[E] == 0 ) - { /* See if numerator is zero. */ - for( i=1; i<NI-1; i++ ) - { - if( bi[i] != 0 ) - { - ltb -= enormlz( bi ); - goto dnzro1; - } - } - eclear(c); - return; - } -dnzro1: - -if( ai[E] == 0 ) - { /* possible divide by zero */ - for( i=1; i<NI-1; i++ ) - { - if( ai[i] != 0 ) - { - lta -= enormlz( ai ); - goto dnzro2; - } - } - if( ai[0] == bi[0] ) - *(c+(NE-1)) = 0; - else - *(c+(NE-1)) = 0x8000; - einfin(c, ldp); - mtherr( "ediv", SING ); - return; - } -dnzro2: - -i = edivm( ai, bi, ldp ); -/* calculate exponent */ -lt = ltb - lta + EXONE; -emdnorm( bi, i, 0, lt, 64, ldp ); -/* set the sign */ -if( ai[0] == bi[0] ) - bi[0] = 0; -else - bi[0] = 0Xffff; -emovo( bi, c, ldp ); -} - - - -/* -; Multiply. -; -; unsigned short a[NE], b[NE], c[NE]; -; LDPARMS *ldp -; emul( a, b, c, ldp ); c = b * a -*/ -static void emul(short unsigned int *a, short unsigned int *b, short unsigned int *c, LDPARMS *ldp) -{ -unsigned short ai[NI], bi[NI]; -int i, j; -long lt, lta, ltb; - -#ifdef NANS -/* NaN times anything is the same NaN. */ -if( eisnan(a) ) - { - emov(a,c); - return; - } -if( eisnan(b) ) - { - emov(b,c); - return; - } -/* Zero times infinity is a NaN. */ -if( (eisinf(a) && (ecmp(b,ezero) == 0)) - || (eisinf(b) && (ecmp(a,ezero) == 0)) ) - { - mtherr( "emul", DOMAIN ); - enan( c, NBITS ); - return; - } -#endif -/* Infinity times anything else is infinity. */ -#ifdef USE_INFINITY -if( eisinf(a) || eisinf(b) ) - { - if( eisneg(a) ^ eisneg(b) ) - *(c+(NE-1)) = 0x8000; - else - *(c+(NE-1)) = 0; - einfin(c, ldp); - return; - } -#endif -emovi( a, ai ); -emovi( b, bi ); -lta = ai[E]; -ltb = bi[E]; -if( ai[E] == 0 ) - { - for( i=1; i<NI-1; i++ ) - { - if( ai[i] != 0 ) - { - lta -= enormlz( ai ); - goto mnzer1; - } - } - eclear(c); - return; - } -mnzer1: - -if( bi[E] == 0 ) - { - for( i=1; i<NI-1; i++ ) - { - if( bi[i] != 0 ) - { - ltb -= enormlz( bi ); - goto mnzer2; - } - } - eclear(c); - return; - } -mnzer2: - -/* Multiply significands */ -j = emulm( ai, bi, ldp ); -/* calculate exponent */ -lt = lta + ltb - (EXONE - 1); -emdnorm( bi, j, 0, lt, 64, ldp ); -/* calculate sign of product */ -if( ai[0] == bi[0] ) - bi[0] = 0; -else - bi[0] = 0xffff; -emovo( bi, c, ldp ); -} - - - -#if LDBL_MANT_DIG > 64 -static void e113toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp) -{ -register unsigned short r; -unsigned short *e, *p; -unsigned short yy[NI]; -int denorm, i; - -e = pe; -denorm = 0; -ecleaz(yy); -#ifdef IBMPC -e += 7; -#endif -r = *e; -yy[0] = 0; -if( r & 0x8000 ) - yy[0] = 0xffff; -r &= 0x7fff; -#ifdef USE_INFINITY -if( r == 0x7fff ) - { -#ifdef NANS -#ifdef IBMPC - for( i=0; i<7; i++ ) - { - if( pe[i] != 0 ) - { - enan( y, NBITS ); - return; - } - } -#else /* !IBMPC */ - for( i=1; i<8; i++ ) - { - if( pe[i] != 0 ) - { - enan( y, NBITS ); - return; - } - } -#endif /* !IBMPC */ -#endif /* NANS */ - eclear( y ); - einfin( y, ldp ); - if( *e & 0x8000 ) - eneg(y); - return; - } -#endif /* INFINITY */ -yy[E] = r; -p = &yy[M + 1]; -#ifdef IBMPC -for( i=0; i<7; i++ ) - *p++ = *(--e); -#else /* IBMPC */ -++e; -for( i=0; i<7; i++ ) - *p++ = *e++; -#endif /* IBMPC */ -/* If denormal, remove the implied bit; else shift down 1. */ -if( r == 0 ) - { - yy[M] = 0; - } -else - { - yy[M] = 1; - eshift( yy, -1 ); - } -emovo(yy,y,ldp); -} - -/* move out internal format to ieee long double */ -static void toe113(short unsigned int *a, short unsigned int *b) -{ -register unsigned short *p, *q; -unsigned short i; - -#ifdef NANS -if( eiisnan(a) ) - { - enan( b, 113 ); - return; - } -#endif -p = a; -#ifdef MIEEE -q = b; -#else -q = b + 7; /* point to output exponent */ -#endif - -/* If not denormal, delete the implied bit. */ -if( a[E] != 0 ) - { - eshup1 (a); - } -/* combine sign and exponent */ -i = *p++; -#ifdef MIEEE -if( i ) - *q++ = *p++ | 0x8000; -else - *q++ = *p++; -#else -if( i ) - *q-- = *p++ | 0x8000; -else - *q-- = *p++; -#endif -/* skip over guard word */ -++p; -/* move the significand */ -#ifdef MIEEE -for (i = 0; i < 7; i++) - *q++ = *p++; -#else -for (i = 0; i < 7; i++) - *q-- = *p++; -#endif -} -#endif /* LDBL_MANT_DIG > 64 */ - - -#if LDBL_MANT_DIG == 64 -static void e64toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp) -{ -unsigned short yy[NI]; -unsigned short *p, *q, *e; -int i; - -e = pe; -p = yy; - -for( i=0; i<NE-5; i++ ) - *p++ = 0; -#ifdef IBMPC -for( i=0; i<5; i++ ) - *p++ = *e++; -#endif -#ifdef DEC -for( i=0; i<5; i++ ) - *p++ = *e++; -#endif -#ifdef MIEEE -p = &yy[0] + (NE-1); -*p-- = *e++; -++e; /* MIEEE skips over 2nd short */ -for( i=0; i<4; i++ ) - *p-- = *e++; -#endif - -#ifdef IBMPC -/* For Intel long double, shift denormal significand up 1 - -- but only if the top significand bit is zero. */ -if((yy[NE-1] & 0x7fff) == 0 && (yy[NE-2] & 0x8000) == 0) - { - unsigned short temp[NI+1]; - emovi(yy, temp); - eshup1(temp); - emovo(temp,y,ldp); - return; - } -#endif -#ifdef USE_INFINITY -/* Point to the exponent field. */ -p = &yy[NE-1]; -if( (*p & 0x7fff) == 0x7fff ) - { -#ifdef NANS -#ifdef IBMPC - for( i=0; i<4; i++ ) - { - if((i != 3 && pe[i] != 0) - /* Check for Intel long double infinity pattern. */ - || (i == 3 && pe[i] != 0x8000)) - { - enan( y, NBITS ); - return; - } - } -#endif -#ifdef MIEEE - for( i=2; i<=5; i++ ) - { - if( pe[i] != 0 ) - { - enan( y, NBITS ); - return; - } - } -#endif -#endif /* NANS */ - eclear( y ); - einfin( y, ldp ); - if( *p & 0x8000 ) - eneg(y); - return; - } -#endif /* USE_INFINITY */ -p = yy; -q = y; -for( i=0; i<NE; i++ ) - *q++ = *p++; -} - -/* move out internal format to ieee long double */ -static void toe64(short unsigned int *a, short unsigned int *b) -{ -register unsigned short *p, *q; -unsigned short i; - -#ifdef NANS -if( eiisnan(a) ) - { - enan( b, 64 ); - return; - } -#endif -#ifdef IBMPC -/* Shift Intel denormal significand down 1. */ -if( a[E] == 0 ) - eshdn1(a); -#endif -p = a; -#ifdef MIEEE -q = b; -#else -q = b + 4; /* point to output exponent */ -/* NOTE: Intel data type is 96 bits wide, clear the last word here. */ -*(q+1)= 0; -#endif - -/* combine sign and exponent */ -i = *p++; -#ifdef MIEEE -if( i ) - *q++ = *p++ | 0x8000; -else - *q++ = *p++; -*q++ = 0; /* leave 2nd short blank */ -#else -if( i ) - *q-- = *p++ | 0x8000; -else - *q-- = *p++; -#endif -/* skip over guard word */ -++p; -/* move the significand */ -#ifdef MIEEE -for( i=0; i<4; i++ ) - *q++ = *p++; -#else -#ifdef USE_INFINITY -#ifdef IBMPC -if (eiisinf (a)) - { - /* Intel long double infinity. */ - *q-- = 0x8000; - *q-- = 0; - *q-- = 0; - *q = 0; - return; - } -#endif /* IBMPC */ -#endif /* USE_INFINITY */ -for( i=0; i<4; i++ ) - *q-- = *p++; -#endif -} - -#endif /* LDBL_MANT_DIG == 64 */ - -#if LDBL_MANT_DIG == 53 -/* -; Convert IEEE double precision to e type -; double d; -; unsigned short x[N+2]; -; e53toe( &d, x ); -*/ -static void e53toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp) -{ -#ifdef DEC - -dectoe( pe, y ); /* see etodec.c */ - -#else - -register unsigned short r; -register unsigned short *p, *e; -unsigned short yy[NI]; -int denorm, k; - -e = pe; -denorm = 0; /* flag if denormalized number */ -ecleaz(yy); -#ifdef IBMPC -e += 3; -#endif -#ifdef DEC -e += 3; -#endif -r = *e; -yy[0] = 0; -if( r & 0x8000 ) - yy[0] = 0xffff; -yy[M] = (r & 0x0f) | 0x10; -r &= ~0x800f; /* strip sign and 4 significand bits */ -#ifdef USE_INFINITY -if( r == 0x7ff0 ) - { -#ifdef NANS -#ifdef IBMPC - if( ((pe[3] & 0xf) != 0) || (pe[2] != 0) - || (pe[1] != 0) || (pe[0] != 0) ) - { - enan( y, NBITS ); - return; - } -#else /* !IBMPC */ - if( ((pe[0] & 0xf) != 0) || (pe[1] != 0) - || (pe[2] != 0) || (pe[3] != 0) ) - { - enan( y, NBITS ); - return; - } -#endif /* !IBMPC */ -#endif /* NANS */ - eclear( y ); - einfin( y, ldp ); - if( yy[0] ) - eneg(y); - return; - } -#endif -r >>= 4; -/* If zero exponent, then the significand is denormalized. - * So, take back the understood high significand bit. */ -if( r == 0 ) - { - denorm = 1; - yy[M] &= ~0x10; - } -r += EXONE - 01777; -yy[E] = r; -p = &yy[M+1]; -#ifdef IBMPC -*p++ = *(--e); -*p++ = *(--e); -*p++ = *(--e); -#else /* !IBMPC */ -++e; -*p++ = *e++; -*p++ = *e++; -*p++ = *e++; -#endif /* !IBMPC */ -(void )eshift( yy, -5 ); -if( denorm ) - { /* if zero exponent, then normalize the significand */ - if( (k = enormlz(yy)) > NBITS ) - ecleazs(yy); - else - yy[E] -= (unsigned short )(k-1); - } -emovo( yy, y, ldp ); -#endif /* !DEC */ -} - -/* -; e type to IEEE double precision -; double d; -; unsigned short x[NE]; -; etoe53( x, &d ); -*/ - -#ifdef DEC - -static void etoe53( x, e ) -unsigned short *x, *e; -{ -etodec( x, e ); /* see etodec.c */ -} - -static void toe53( x, y ) -unsigned short *x, *y; -{ -todec( x, y ); -} - -#else - -static void toe53(short unsigned int *x, short unsigned int *y) -{ -unsigned short i; -unsigned short *p; - - -#ifdef NANS -if( eiisnan(x) ) - { - enan( y, 53 ); - return; - } -#endif -p = &x[0]; -#ifdef IBMPC -y += 3; -#endif -#ifdef DEC -y += 3; -#endif -*y = 0; /* output high order */ -if( *p++ ) - *y = 0x8000; /* output sign bit */ - -i = *p++; -if( i >= (unsigned int )2047 ) - { /* Saturate at largest number less than infinity. */ -#ifdef USE_INFINITY - *y |= 0x7ff0; -#ifdef IBMPC - *(--y) = 0; - *(--y) = 0; - *(--y) = 0; -#else /* !IBMPC */ - ++y; - *y++ = 0; - *y++ = 0; - *y++ = 0; -#endif /* IBMPC */ -#else /* !USE_INFINITY */ - *y |= (unsigned short )0x7fef; -#ifdef IBMPC - *(--y) = 0xffff; - *(--y) = 0xffff; - *(--y) = 0xffff; -#else /* !IBMPC */ - ++y; - *y++ = 0xffff; - *y++ = 0xffff; - *y++ = 0xffff; -#endif -#endif /* !USE_INFINITY */ - return; - } -if( i == 0 ) - { - (void )eshift( x, 4 ); - } -else - { - i <<= 4; - (void )eshift( x, 5 ); - } -i |= *p++ & (unsigned short )0x0f; /* *p = xi[M] */ -*y |= (unsigned short )i; /* high order output already has sign bit set */ -#ifdef IBMPC -*(--y) = *p++; -*(--y) = *p++; -*(--y) = *p; -#else /* !IBMPC */ -++y; -*y++ = *p++; -*y++ = *p++; -*y++ = *p++; -#endif /* !IBMPC */ -} - -#endif /* not DEC */ -#endif /* LDBL_MANT_DIG == 53 */ - -#if LDBL_MANT_DIG == 24 -/* -; Convert IEEE single precision to e type -; float d; -; unsigned short x[N+2]; -; dtox( &d, x ); -*/ -void e24toe( short unsigned int *pe, short unsigned int *y, LDPARMS *ldp ) -{ -register unsigned short r; -register unsigned short *p, *e; -unsigned short yy[NI]; -int denorm, k; - -e = pe; -denorm = 0; /* flag if denormalized number */ -ecleaz(yy); -#ifdef IBMPC -e += 1; -#endif -#ifdef DEC -e += 1; -#endif -r = *e; -yy[0] = 0; -if( r & 0x8000 ) - yy[0] = 0xffff; -yy[M] = (r & 0x7f) | 0200; -r &= ~0x807f; /* strip sign and 7 significand bits */ -#ifdef USE_INFINITY -if( r == 0x7f80 ) - { -#ifdef NANS -#ifdef MIEEE - if( ((pe[0] & 0x7f) != 0) || (pe[1] != 0) ) - { - enan( y, NBITS ); - return; - } -#else /* !MIEEE */ - if( ((pe[1] & 0x7f) != 0) || (pe[0] != 0) ) - { - enan( y, NBITS ); - return; - } -#endif /* !MIEEE */ -#endif /* NANS */ - eclear( y ); - einfin( y, ldp ); - if( yy[0] ) - eneg(y); - return; - } -#endif -r >>= 7; -/* If zero exponent, then the significand is denormalized. - * So, take back the understood high significand bit. */ -if( r == 0 ) - { - denorm = 1; - yy[M] &= ~0200; - } -r += EXONE - 0177; -yy[E] = r; -p = &yy[M+1]; -#ifdef IBMPC -*p++ = *(--e); -#endif -#ifdef DEC -*p++ = *(--e); -#endif -#ifdef MIEEE -++e; -*p++ = *e++; -#endif -(void )eshift( yy, -8 ); -if( denorm ) - { /* if zero exponent, then normalize the significand */ - if( (k = enormlz(yy)) > NBITS ) - ecleazs(yy); - else - yy[E] -= (unsigned short )(k-1); - } -emovo( yy, y, ldp ); -} - -static void toe24(short unsigned int *x, short unsigned int *y) -{ -unsigned short i; -unsigned short *p; - -#ifdef NANS -if( eiisnan(x) ) - { - enan( y, 24 ); - return; - } -#endif -p = &x[0]; -#ifdef IBMPC -y += 1; -#endif -#ifdef DEC -y += 1; -#endif -*y = 0; /* output high order */ -if( *p++ ) - *y = 0x8000; /* output sign bit */ - -i = *p++; -if( i >= 255 ) - { /* Saturate at largest number less than infinity. */ -#ifdef USE_INFINITY - *y |= (unsigned short )0x7f80; -#ifdef IBMPC - *(--y) = 0; -#endif -#ifdef DEC - *(--y) = 0; -#endif -#ifdef MIEEE - ++y; - *y = 0; -#endif -#else /* !USE_INFINITY */ - *y |= (unsigned short )0x7f7f; -#ifdef IBMPC - *(--y) = 0xffff; -#endif -#ifdef DEC - *(--y) = 0xffff; -#endif -#ifdef MIEEE - ++y; - *y = 0xffff; -#endif -#endif /* !USE_INFINITY */ - return; - } -if( i == 0 ) - { - (void )eshift( x, 7 ); - } -else - { - i <<= 7; - (void )eshift( x, 8 ); - } -i |= *p++ & (unsigned short )0x7f; /* *p = xi[M] */ -*y |= i; /* high order output already has sign bit set */ -#ifdef IBMPC -*(--y) = *p; -#endif -#ifdef DEC -*(--y) = *p; -#endif -#ifdef MIEEE -++y; -*y = *p; -#endif -} -#endif /* LDBL_MANT_DIG == 24 */ - -/* Compare two e type numbers. - * - * unsigned short a[NE], b[NE]; - * ecmp( a, b ); - * - * returns +1 if a > b - * 0 if a == b - * -1 if a < b - * -2 if either a or b is a NaN. - */ -static int ecmp(short unsigned int *a, short unsigned int *b) -{ -unsigned short ai[NI], bi[NI]; -register unsigned short *p, *q; -register int i; -int msign; - -#ifdef NANS -if (eisnan (a) || eisnan (b)) - return( -2 ); -#endif -emovi( a, ai ); -p = ai; -emovi( b, bi ); -q = bi; - -if( *p != *q ) - { /* the signs are different */ -/* -0 equals + 0 */ - for( i=1; i<NI-1; i++ ) - { - if( ai[i] != 0 ) - goto nzro; - if( bi[i] != 0 ) - goto nzro; - } - return(0); -nzro: - if( *p == 0 ) - return( 1 ); - else - return( -1 ); - } -/* both are the same sign */ -if( *p == 0 ) - msign = 1; -else - msign = -1; -i = NI-1; -do - { - if( *p++ != *q++ ) - { - goto diff; - } - } -while( --i > 0 ); - -return(0); /* equality */ - - - -diff: - -if( *(--p) > *(--q) ) - return( msign ); /* p is bigger */ -else - return( -msign ); /* p is littler */ -} - - -/* -; Shift significand -; -; Shifts significand area up or down by the number of bits -; given by the variable sc. -*/ -static int eshift(short unsigned int *x, int sc) -{ -unsigned short lost; -unsigned short *p; - -if( sc == 0 ) - return( 0 ); - -lost = 0; -p = x + NI-1; - -if( sc < 0 ) - { - sc = -sc; - while( sc >= 16 ) - { - lost |= *p; /* remember lost bits */ - eshdn6(x); - sc -= 16; - } - - while( sc >= 8 ) - { - lost |= *p & 0xff; - eshdn8(x); - sc -= 8; - } - - while( sc > 0 ) - { - lost |= *p & 1; - eshdn1(x); - sc -= 1; - } - } -else - { - while( sc >= 16 ) - { - eshup6(x); - sc -= 16; - } - - while( sc >= 8 ) - { - eshup8(x); - sc -= 8; - } - - while( sc > 0 ) - { - eshup1(x); - sc -= 1; - } - } -if( lost ) - lost = 1; -return( (int )lost ); -} - - - -/* -; normalize -; -; Shift normalizes the significand area pointed to by argument -; shift count (up = positive) is returned. -*/ -static int enormlz(short unsigned int *x) -{ -register unsigned short *p; -int sc; - -sc = 0; -p = &x[M]; -if( *p != 0 ) - goto normdn; -++p; -if( *p & 0x8000 ) - return( 0 ); /* already normalized */ -while( *p == 0 ) - { - eshup6(x); - sc += 16; -/* With guard word, there are NBITS+16 bits available. - * return true if all are zero. - */ - if( sc > NBITS ) - return( sc ); - } -/* see if high byte is zero */ -while( (*p & 0xff00) == 0 ) - { - eshup8(x); - sc += 8; - } -/* now shift 1 bit at a time */ -while( (*p & 0x8000) == 0) - { - eshup1(x); - sc += 1; - if( sc > (NBITS+16) ) - { - mtherr( "enormlz", UNDERFLOW ); - return( sc ); - } - } -return( sc ); - -/* Normalize by shifting down out of the high guard word - of the significand */ -normdn: - -if( *p & 0xff00 ) - { - eshdn8(x); - sc -= 8; - } -while( *p != 0 ) - { - eshdn1(x); - sc -= 1; - - if( sc < -NBITS ) - { - mtherr( "enormlz", OVERFLOW ); - return( sc ); - } - } -return( sc ); -} - - - - -/* Convert e type number to decimal format ASCII string. - * The constants are for 64 bit precision. - */ - -#define NTEN 12 -#define MAXP 4096 - -#if NE == 10 -static unsigned short etens[NTEN + 1][NE] = -{ - {0x6576, 0x4a92, 0x804a, 0x153f, - 0xc94c, 0x979a, 0x8a20, 0x5202, 0xc460, 0x7525,}, /* 10**4096 */ - {0x6a32, 0xce52, 0x329a, 0x28ce, - 0xa74d, 0x5de4, 0xc53d, 0x3b5d, 0x9e8b, 0x5a92,}, /* 10**2048 */ - {0x526c, 0x50ce, 0xf18b, 0x3d28, - 0x650d, 0x0c17, 0x8175, 0x7586, 0xc976, 0x4d48,}, - {0x9c66, 0x58f8, 0xbc50, 0x5c54, - 0xcc65, 0x91c6, 0xa60e, 0xa0ae, 0xe319, 0x46a3,}, - {0x851e, 0xeab7, 0x98fe, 0x901b, - 0xddbb, 0xde8d, 0x9df9, 0xebfb, 0xaa7e, 0x4351,}, - {0x0235, 0x0137, 0x36b1, 0x336c, - 0xc66f, 0x8cdf, 0x80e9, 0x47c9, 0x93ba, 0x41a8,}, - {0x50f8, 0x25fb, 0xc76b, 0x6b71, - 0x3cbf, 0xa6d5, 0xffcf, 0x1f49, 0xc278, 0x40d3,}, - {0x0000, 0x0000, 0x0000, 0x0000, - 0xf020, 0xb59d, 0x2b70, 0xada8, 0x9dc5, 0x4069,}, - {0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0400, 0xc9bf, 0x8e1b, 0x4034,}, - {0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x2000, 0xbebc, 0x4019,}, - {0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x9c40, 0x400c,}, - {0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xc800, 0x4005,}, - {0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xa000, 0x4002,}, /* 10**1 */ -}; - -static unsigned short emtens[NTEN + 1][NE] = -{ - {0x2030, 0xcffc, 0xa1c3, 0x8123, - 0x2de3, 0x9fde, 0xd2ce, 0x04c8, 0xa6dd, 0x0ad8,}, /* 10**-4096 */ - {0x8264, 0xd2cb, 0xf2ea, 0x12d4, - 0x4925, 0x2de4, 0x3436, 0x534f, 0xceae, 0x256b,}, /* 10**-2048 */ - {0xf53f, 0xf698, 0x6bd3, 0x0158, - 0x87a6, 0xc0bd, 0xda57, 0x82a5, 0xa2a6, 0x32b5,}, - {0xe731, 0x04d4, 0xe3f2, 0xd332, - 0x7132, 0xd21c, 0xdb23, 0xee32, 0x9049, 0x395a,}, - {0xa23e, 0x5308, 0xfefb, 0x1155, - 0xfa91, 0x1939, 0x637a, 0x4325, 0xc031, 0x3cac,}, - {0xe26d, 0xdbde, 0xd05d, 0xb3f6, - 0xac7c, 0xe4a0, 0x64bc, 0x467c, 0xddd0, 0x3e55,}, - {0x2a20, 0x6224, 0x47b3, 0x98d7, - 0x3f23, 0xe9a5, 0xa539, 0xea27, 0xa87f, 0x3f2a,}, - {0x0b5b, 0x4af2, 0xa581, 0x18ed, - 0x67de, 0x94ba, 0x4539, 0x1ead, 0xcfb1, 0x3f94,}, - {0xbf71, 0xa9b3, 0x7989, 0xbe68, - 0x4c2e, 0xe15b, 0xc44d, 0x94be, 0xe695, 0x3fc9,}, - {0x3d4d, 0x7c3d, 0x36ba, 0x0d2b, - 0xfdc2, 0xcefc, 0x8461, 0x7711, 0xabcc, 0x3fe4,}, - {0xc155, 0xa4a8, 0x404e, 0x6113, - 0xd3c3, 0x652b, 0xe219, 0x1758, 0xd1b7, 0x3ff1,}, - {0xd70a, 0x70a3, 0x0a3d, 0xa3d7, - 0x3d70, 0xd70a, 0x70a3, 0x0a3d, 0xa3d7, 0x3ff8,}, - {0xcccd, 0xcccc, 0xcccc, 0xcccc, - 0xcccc, 0xcccc, 0xcccc, 0xcccc, 0xcccc, 0x3ffb,}, /* 10**-1 */ -}; -#else -static unsigned short etens[NTEN+1][NE] = { -{0xc94c,0x979a,0x8a20,0x5202,0xc460,0x7525,},/* 10**4096 */ -{0xa74d,0x5de4,0xc53d,0x3b5d,0x9e8b,0x5a92,},/* 10**2048 */ -{0x650d,0x0c17,0x8175,0x7586,0xc976,0x4d48,}, -{0xcc65,0x91c6,0xa60e,0xa0ae,0xe319,0x46a3,}, -{0xddbc,0xde8d,0x9df9,0xebfb,0xaa7e,0x4351,}, -{0xc66f,0x8cdf,0x80e9,0x47c9,0x93ba,0x41a8,}, -{0x3cbf,0xa6d5,0xffcf,0x1f49,0xc278,0x40d3,}, -{0xf020,0xb59d,0x2b70,0xada8,0x9dc5,0x4069,}, -{0x0000,0x0000,0x0400,0xc9bf,0x8e1b,0x4034,}, -{0x0000,0x0000,0x0000,0x2000,0xbebc,0x4019,}, -{0x0000,0x0000,0x0000,0x0000,0x9c40,0x400c,}, -{0x0000,0x0000,0x0000,0x0000,0xc800,0x4005,}, -{0x0000,0x0000,0x0000,0x0000,0xa000,0x4002,}, /* 10**1 */ -}; - -static unsigned short emtens[NTEN+1][NE] = { -{0x2de4,0x9fde,0xd2ce,0x04c8,0xa6dd,0x0ad8,}, /* 10**-4096 */ -{0x4925,0x2de4,0x3436,0x534f,0xceae,0x256b,}, /* 10**-2048 */ -{0x87a6,0xc0bd,0xda57,0x82a5,0xa2a6,0x32b5,}, -{0x7133,0xd21c,0xdb23,0xee32,0x9049,0x395a,}, -{0xfa91,0x1939,0x637a,0x4325,0xc031,0x3cac,}, -{0xac7d,0xe4a0,0x64bc,0x467c,0xddd0,0x3e55,}, -{0x3f24,0xe9a5,0xa539,0xea27,0xa87f,0x3f2a,}, -{0x67de,0x94ba,0x4539,0x1ead,0xcfb1,0x3f94,}, -{0x4c2f,0xe15b,0xc44d,0x94be,0xe695,0x3fc9,}, -{0xfdc2,0xcefc,0x8461,0x7711,0xabcc,0x3fe4,}, -{0xd3c3,0x652b,0xe219,0x1758,0xd1b7,0x3ff1,}, -{0x3d71,0xd70a,0x70a3,0x0a3d,0xa3d7,0x3ff8,}, -{0xcccd,0xcccc,0xcccc,0xcccc,0xcccc,0x3ffb,}, /* 10**-1 */ -}; -#endif - - - -/* ASCII string outputs for unix */ - - -#if 0 -void _IO_ldtostr(x, string, ndigs, flags, fmt) -long double *x; -char *string; -int ndigs; -int flags; -char fmt; -{ -unsigned short w[NI]; -char *t, *u; -LDPARMS rnd; -LDPARMS *ldp = &rnd; - -rnd.rlast = -1; -rnd.rndprc = NBITS; - -if (sizeof(long double) == 16) - e113toe( (unsigned short *)x, w, ldp ); -else - e64toe( (unsigned short *)x, w, ldp ); - -etoasc( w, string, ndigs, -1, ldp ); -if( ndigs == 0 && flags == 0 ) - { - /* Delete the decimal point unless alternate format. */ - t = string; - while( *t != '.' ) - ++t; - u = t + 1; - while( *t != '\0' ) - *t++ = *u++; - } -if (*string == ' ') - { - t = string; - u = t + 1; - while( *t != '\0' ) - *t++ = *u++; - } -if (fmt == 'E') - { - t = string; - while( *t != 'e' ) - ++t; - *t = 'E'; - } -} - -#endif - -/* This routine will not return more than NDEC+1 digits. */ - -char * -_ldtoa_r (struct _reent *ptr, long double d, int mode, int ndigits, int *decpt, - int *sign, char **rve) -{ -unsigned short e[NI]; -char *s, *p; -int i, j, k; -int orig_ndigits; -LDPARMS rnd; -LDPARMS *ldp = &rnd; -char *outstr; -char outbuf[NDEC + MAX_EXP_DIGITS + 10]; -union uconv du; -du.d = d; - -orig_ndigits = ndigits; -rnd.rlast = -1; -rnd.rndprc = NBITS; - - _REENT_CHECK_MP(ptr); - -/* reentrancy addition to use mprec storage pool */ -if (_REENT_MP_RESULT(ptr)) - { - _REENT_MP_RESULT(ptr)->_k = _REENT_MP_RESULT_K(ptr); - _REENT_MP_RESULT(ptr)->_maxwds = 1 << _REENT_MP_RESULT_K(ptr); - Bfree (ptr, _REENT_MP_RESULT(ptr)); - _REENT_MP_RESULT(ptr) = 0; - } - -#if LDBL_MANT_DIG == 24 -e24toe( &du.pe, e, ldp ); -#elif LDBL_MANT_DIG == 53 -e53toe( &du.pe, e, ldp ); -#elif LDBL_MANT_DIG == 64 -e64toe( &du.pe, e, ldp ); -#else -e113toe( &du.pe, e, ldp ); -#endif - -if( eisneg(e) ) - *sign = 1; -else - *sign = 0; -/* Mode 3 is "f" format. */ -if( mode != 3 ) - ndigits -= 1; -/* Mode 0 is for %.999 format, which is supposed to give a - minimum length string that will convert back to the same binary value. - For now, just ask for 20 digits which is enough but sometimes too many. */ -if( mode == 0 ) - ndigits = 20; - -/* This sanity limit must agree with the corresponding one in etoasc, to - keep straight the returned value of outexpon. */ -if( ndigits > NDEC ) - ndigits = NDEC; - -etoasc( e, outbuf, ndigits, mode, ldp ); -s = outbuf; -if( eisinf(e) || eisnan(e) ) - { - *decpt = 9999; - goto stripspaces; - } -*decpt = ldp->outexpon + 1; - -/* Transform the string returned by etoasc into what the caller wants. */ - -/* Look for decimal point and delete it from the string. */ -s = outbuf; -while( *s != '\0' ) - { - if( *s == '.' ) - goto yesdecpt; - ++s; - } -goto nodecpt; - -yesdecpt: - -/* Delete the decimal point. */ -while( *s != '\0' ) - { - *s = *(s+1); - ++s; - } - -nodecpt: - -/* Back up over the exponent field. */ -while( *s != 'E' && s > outbuf) - --s; -*s = '\0'; - -stripspaces: - -/* Strip leading spaces and sign. */ -p = outbuf; -while( *p == ' ' || *p == '-') - ++p; - -/* Find new end of string. */ -s = outbuf; -while( (*s++ = *p++) != '\0' ) - ; ---s; - -/* Strip trailing zeros. */ -if( mode == 2 ) - k = 1; -else if( ndigits > ldp->outexpon ) - k = ndigits; -else - k = ldp->outexpon; - -while( *(s-1) == '0' && ((s - outbuf) > k)) - *(--s) = '\0'; - -/* In f format, flush small off-scale values to zero. - Rounding has been taken care of by etoasc. */ -if( mode == 3 && ((ndigits + ldp->outexpon) < 0)) - { - s = outbuf; - *s = '\0'; - *decpt = 0; - } - -/* reentrancy addition to use mprec storage pool */ -/* we want to have enough space to hold the formatted result */ - -if (mode == 3) /* f format, account for sign + dec digits + decpt + frac */ - i = *decpt + orig_ndigits + 3; -else /* account for sign + max precision digs + E + exp sign + exponent */ - i = orig_ndigits + MAX_EXP_DIGITS + 4; - -j = sizeof (__ULong); -for (_REENT_MP_RESULT_K(ptr) = 0; sizeof (_Bigint) - sizeof (__ULong) + j <= i; j <<= 1) - _REENT_MP_RESULT_K(ptr)++; -_REENT_MP_RESULT(ptr) = Balloc (ptr, _REENT_MP_RESULT_K(ptr)); - -/* Copy from internal temporary buffer to permanent buffer. */ -outstr = (char *)_REENT_MP_RESULT(ptr); -strcpy (outstr, outbuf); - -if( rve ) - *rve = outstr + (s - outbuf); - -return outstr; -} - -/* Routine used to tell if long double is NaN or Infinity or regular number. - Returns: 0 = regular number - 1 = Nan - 2 = Infinity -*/ -int -_ldcheck (long double *d) -{ -unsigned short e[NI]; -LDPARMS rnd; -LDPARMS *ldp = &rnd; - -union uconv du; - -rnd.rlast = -1; -rnd.rndprc = NBITS; -du.d = *d; -#if LDBL_MANT_DIG == 24 -e24toe( &du.pe, e, ldp ); -#elif LDBL_MANT_DIG == 53 -e53toe( &du.pe, e, ldp ); -#elif LDBL_MANT_DIG == 64 -e64toe( &du.pe, e, ldp ); -#else -e113toe( &du.pe, e, ldp ); -#endif - -if( (e[NE-1] & 0x7fff) == 0x7fff ) - { -#ifdef NANS - if( eisnan(e) ) - return( 1 ); -#endif - return( 2 ); - } -else - return( 0 ); -} /* _ldcheck */ - -static void etoasc(short unsigned int *x, char *string, int ndigits, int outformat, LDPARMS *ldp) -{ -long digit; -unsigned short y[NI], t[NI], u[NI], w[NI]; -unsigned short *p, *r, *ten; -unsigned short sign; -int i, j, k, expon, rndsav, ndigs; -char *s, *ss; -unsigned short m; -unsigned short *equot = ldp->equot; - -ndigs = ndigits; -rndsav = ldp->rndprc; -#ifdef NANS -if( eisnan(x) ) - { - sprintf( string, " NaN " ); - expon = 9999; - goto bxit; - } -#endif -ldp->rndprc = NBITS; /* set to full precision */ -emov( x, y ); /* retain external format */ -if( y[NE-1] & 0x8000 ) - { - sign = 0xffff; - y[NE-1] &= 0x7fff; - } -else - { - sign = 0; - } -expon = 0; -ten = &etens[NTEN][0]; -emov( eone, t ); -/* Test for zero exponent */ -if( y[NE-1] == 0 ) - { - for( k=0; k<NE-1; k++ ) - { - if( y[k] != 0 ) - goto tnzro; /* denormalized number */ - } - goto isone; /* legal all zeros */ - } -tnzro: - -/* Test for infinity. - */ -if( y[NE-1] == 0x7fff ) - { - if( sign ) - sprintf( string, " -Infinity " ); - else - sprintf( string, " Infinity " ); - expon = 9999; - goto bxit; - } - -/* Test for exponent nonzero but significand denormalized. - * This is an error condition. - */ -if( (y[NE-1] != 0) && ((y[NE-2] & 0x8000) == 0) ) - { - mtherr( "etoasc", DOMAIN ); - sprintf( string, "NaN" ); - expon = 9999; - goto bxit; - } - -/* Compare to 1.0 */ -i = ecmp( eone, y ); -if( i == 0 ) - goto isone; - -if( i < 0 ) - { /* Number is greater than 1 */ -/* Convert significand to an integer and strip trailing decimal zeros. */ - emov( y, u ); - u[NE-1] = EXONE + NBITS - 1; - - p = &etens[NTEN-4][0]; - m = 16; -do - { - ediv( p, u, t, ldp ); - efloor( t, w, ldp ); - for( j=0; j<NE-1; j++ ) - { - if( t[j] != w[j] ) - goto noint; - } - emov( t, u ); - expon += (int )m; -noint: - p += NE; - m >>= 1; - } -while( m != 0 ); - -/* Rescale from integer significand */ - u[NE-1] += y[NE-1] - (unsigned int )(EXONE + NBITS - 1); - emov( u, y ); -/* Find power of 10 */ - emov( eone, t ); - m = MAXP; - p = &etens[0][0]; - while( ecmp( ten, u ) <= 0 ) - { - if( ecmp( p, u ) <= 0 ) - { - ediv( p, u, u, ldp ); - emul( p, t, t, ldp ); - expon += (int )m; - } - m >>= 1; - if( m == 0 ) - break; - p += NE; - } - } -else - { /* Number is less than 1.0 */ -/* Pad significand with trailing decimal zeros. */ - if( y[NE-1] == 0 ) - { - while( (y[NE-2] & 0x8000) == 0 ) - { - emul( ten, y, y, ldp ); - expon -= 1; - } - } - else - { - emovi( y, w ); - for( i=0; i<NDEC+1; i++ ) - { - if( (w[NI-1] & 0x7) != 0 ) - break; -/* multiply by 10 */ - emovz( w, u ); - eshdn1( u ); - eshdn1( u ); - eaddm( w, u ); - u[1] += 3; - while( u[2] != 0 ) - { - eshdn1(u); - u[1] += 1; - } - if( u[NI-1] != 0 ) - break; - if( eone[NE-1] <= u[1] ) - break; - emovz( u, w ); - expon -= 1; - } - emovo( w, y, ldp ); - } - k = -MAXP; - p = &emtens[0][0]; - r = &etens[0][0]; - emov( y, w ); - emov( eone, t ); - while( ecmp( eone, w ) > 0 ) - { - if( ecmp( p, w ) >= 0 ) - { - emul( r, w, w, ldp ); - emul( r, t, t, ldp ); - expon += k; - } - k /= 2; - if( k == 0 ) - break; - p += NE; - r += NE; - } - ediv( t, eone, t, ldp ); - } -isone: -/* Find the first (leading) digit. */ -emovi( t, w ); -emovz( w, t ); -emovi( y, w ); -emovz( w, y ); -eiremain( t, y, ldp ); -digit = equot[NI-1]; -while( (digit == 0) && (ecmp(y,ezero) != 0) ) - { - eshup1( y ); - emovz( y, u ); - eshup1( u ); - eshup1( u ); - eaddm( u, y ); - eiremain( t, y, ldp ); - digit = equot[NI-1]; - expon -= 1; - } -s = string; -if( sign ) - *s++ = '-'; -else - *s++ = ' '; -/* Examine number of digits requested by caller. */ -if( outformat == 3 ) - ndigs += expon; -/* -else if( ndigs < 0 ) - ndigs = 0; -*/ -if( ndigs > NDEC ) - ndigs = NDEC; -if( digit == 10 ) - { - *s++ = '1'; - *s++ = '.'; - if( ndigs > 0 ) - { - *s++ = '0'; - ndigs -= 1; - } - expon += 1; - if( ndigs < 0 ) - { - ss = s; - goto doexp; - } - } -else - { - *s++ = (char )digit + '0'; - *s++ = '.'; - } -/* Generate digits after the decimal point. */ -for( k=0; k<=ndigs; k++ ) - { -/* multiply current number by 10, without normalizing */ - eshup1( y ); - emovz( y, u ); - eshup1( u ); - eshup1( u ); - eaddm( u, y ); - eiremain( t, y, ldp ); - *s++ = (char )equot[NI-1] + '0'; - } -digit = equot[NI-1]; ---s; -ss = s; -/* round off the ASCII string */ -if( digit > 4 ) - { -/* Test for critical rounding case in ASCII output. */ - if( digit == 5 ) - { - emovo( y, t, ldp ); - if( ecmp(t,ezero) != 0 ) - goto roun; /* round to nearest */ - if( ndigs < 0 || (*(s-1-(*(s-1)=='.')) & 1) == 0 ) - goto doexp; /* round to even */ - } -/* Round up and propagate carry-outs */ -roun: - --s; - k = *s & 0x7f; -/* Carry out to most significant digit? */ - if( ndigs < 0 ) - { - /* This will print like "1E-6". */ - *s = '1'; - expon += 1; - goto doexp; - } - else if( k == '.' ) - { - --s; - k = *s; - k += 1; - *s = (char )k; -/* Most significant digit carries to 10? */ - if( k > '9' ) - { - expon += 1; - *s = '1'; - } - goto doexp; - } -/* Round up and carry out from less significant digits */ - k += 1; - *s = (char )k; - if( k > '9' ) - { - *s = '0'; - goto roun; - } - } -doexp: -#ifdef __GO32__ -if( expon >= 0 ) - sprintf( ss, "e+%02d", expon ); -else - sprintf( ss, "e-%02d", -expon ); -#else - sprintf( ss, "E%d", expon ); -#endif -bxit: -ldp->rndprc = rndsav; -ldp->outexpon = expon; -} - - - - -/* -; ASCTOQ -; ASCTOQ.MAC LATEST REV: 11 JAN 84 -; SLM, 3 JAN 78 -; -; Convert ASCII string to quadruple precision floating point -; -; Numeric input is free field decimal number -; with max of 15 digits with or without -; decimal point entered as ASCII from teletype. -; Entering E after the number followed by a second -; number causes the second number to be interpreted -; as a power of 10 to be multiplied by the first number -; (i.e., "scientific" notation). -; -; Usage: -; asctoq( string, q ); -*/ - -long double _strtold (char *s, char **se) -{ - union uconv x; - LDPARMS rnd; - LDPARMS *ldp = &rnd; - int lenldstr; - - rnd.rlast = -1; - rnd.rndprc = NBITS; - - lenldstr = asctoeg( s, &x.pe, LDBL_MANT_DIG, ldp ); - if (se) - *se = s + lenldstr; - return x.d; -} - -#define REASONABLE_LEN 200 - -static int -asctoeg(char *ss, short unsigned int *y, int oprec, LDPARMS *ldp) -{ -unsigned short yy[NI], xt[NI], tt[NI]; -int esign, decflg, sgnflg, nexp, exp, prec, lost; -int k, trail, c, rndsav; -long lexp; -unsigned short nsign, *p; -char *sp, *s, *lstr; -int lenldstr; -int mflag = 0; -char tmpstr[REASONABLE_LEN]; - -/* Copy the input string. */ -c = strlen (ss) + 2; -if (c <= REASONABLE_LEN) - lstr = tmpstr; -else - { - lstr = (char *) calloc (c, 1); - mflag = 1; - } -s = ss; -lenldstr = 0; -while( *s == ' ' ) /* skip leading spaces */ - { - ++s; - ++lenldstr; - } -sp = lstr; -for( k=0; k<c; k++ ) - { - if( (*sp++ = *s++) == '\0' ) - break; - } -*sp = '\0'; -s = lstr; - -rndsav = ldp->rndprc; -ldp->rndprc = NBITS; /* Set to full precision */ -lost = 0; -nsign = 0; -decflg = 0; -sgnflg = 0; -nexp = 0; -exp = 0; -prec = 0; -ecleaz( yy ); -trail = 0; - -nxtcom: -k = *s - '0'; -if( (k >= 0) && (k <= 9) ) - { -/* Ignore leading zeros */ - if( (prec == 0) && (decflg == 0) && (k == 0) ) - goto donchr; -/* Identify and strip trailing zeros after the decimal point. */ - if( (trail == 0) && (decflg != 0) ) - { - sp = s; - while( (*sp >= '0') && (*sp <= '9') ) - ++sp; -/* Check for syntax error */ - c = *sp & 0x7f; - if( (c != 'e') && (c != 'E') && (c != '\0') - && (c != '\n') && (c != '\r') && (c != ' ') - && (c != ',') ) - goto error; - --sp; - while( *sp == '0' ) - *sp-- = 'z'; - trail = 1; - if( *s == 'z' ) - goto donchr; - } -/* If enough digits were given to more than fill up the yy register, - * continuing until overflow into the high guard word yy[2] - * guarantees that there will be a roundoff bit at the top - * of the low guard word after normalization. - */ - if( yy[2] == 0 ) - { - if( decflg ) - nexp += 1; /* count digits after decimal point */ - eshup1( yy ); /* multiply current number by 10 */ - emovz( yy, xt ); - eshup1( xt ); - eshup1( xt ); - eaddm( xt, yy ); - ecleaz( xt ); - xt[NI-2] = (unsigned short )k; - eaddm( xt, yy ); - } - else - { - /* Mark any lost non-zero digit. */ - lost |= k; - /* Count lost digits before the decimal point. */ - if (decflg == 0) - nexp -= 1; - } - prec += 1; - goto donchr; - } - -switch( *s ) - { - case 'z': - break; - case 'E': - case 'e': - goto expnt; - case '.': /* decimal point */ - if( decflg ) - goto error; - ++decflg; - break; - case '-': - nsign = 0xffff; - if( sgnflg ) - goto error; - ++sgnflg; - break; - case '+': - if( sgnflg ) - goto error; - ++sgnflg; - break; - case ',': - case ' ': - case '\0': - case '\n': - case '\r': - goto daldone; - case 'i': - case 'I': - goto infinite; - default: - error: -#ifdef NANS - enan( yy, NI*16 ); -#else - mtherr( "asctoe", DOMAIN ); - ecleaz(yy); -#endif - goto aexit; - } -donchr: -++s; -goto nxtcom; - -/* Exponent interpretation */ -expnt: - -esign = 1; -exp = 0; -++s; -/* check for + or - */ -if( *s == '-' ) - { - esign = -1; - ++s; - } -if( *s == '+' ) - ++s; -while( (*s >= '0') && (*s <= '9') ) - { - exp *= 10; - exp += *s++ - '0'; - if (exp > 4977) - { - if (esign < 0) - goto zero; - else - goto infinite; - } - } -if( esign < 0 ) - exp = -exp; -if( exp > 4932 ) - { -infinite: - ecleaz(yy); - yy[E] = 0x7fff; /* infinity */ - goto aexit; - } -if( exp < -4977 ) - { -zero: - ecleaz(yy); - goto aexit; - } - -daldone: -nexp = exp - nexp; -/* Pad trailing zeros to minimize power of 10, per IEEE spec. */ -while( (nexp > 0) && (yy[2] == 0) ) - { - emovz( yy, xt ); - eshup1( xt ); - eshup1( xt ); - eaddm( yy, xt ); - eshup1( xt ); - if( xt[2] != 0 ) - break; - nexp -= 1; - emovz( xt, yy ); - } -if( (k = enormlz(yy)) > NBITS ) - { - ecleaz(yy); - goto aexit; - } -lexp = (EXONE - 1 + NBITS) - k; -emdnorm( yy, lost, 0, lexp, 64, ldp ); -/* convert to external format */ - - -/* Multiply by 10**nexp. If precision is 64 bits, - * the maximum relative error incurred in forming 10**n - * for 0 <= n <= 324 is 8.2e-20, at 10**180. - * For 0 <= n <= 999, the peak relative error is 1.4e-19 at 10**947. - * For 0 >= n >= -999, it is -1.55e-19 at 10**-435. - */ -lexp = yy[E]; -if( nexp == 0 ) - { - k = 0; - goto expdon; - } -esign = 1; -if( nexp < 0 ) - { - nexp = -nexp; - esign = -1; - if( nexp > 4096 ) - { /* Punt. Can't handle this without 2 divides. */ - emovi( etens[0], tt ); - lexp -= tt[E]; - k = edivm( tt, yy, ldp ); - lexp += EXONE; - nexp -= 4096; - } - } -p = &etens[NTEN][0]; -emov( eone, xt ); -exp = 1; -do - { - if( exp & nexp ) - emul( p, xt, xt, ldp ); - p -= NE; - exp = exp + exp; - } -while( exp <= MAXP ); - -emovi( xt, tt ); -if( esign < 0 ) - { - lexp -= tt[E]; - k = edivm( tt, yy, ldp ); - lexp += EXONE; - } -else - { - lexp += tt[E]; - k = emulm( tt, yy, ldp ); - lexp -= EXONE - 1; - } - -expdon: - -/* Round and convert directly to the destination type */ -if( oprec == 53 ) - lexp -= EXONE - 0x3ff; -else if( oprec == 24 ) - lexp -= EXONE - 0177; -#ifdef DEC -else if( oprec == 56 ) - lexp -= EXONE - 0201; -#endif -ldp->rndprc = oprec; -emdnorm( yy, k, 0, lexp, 64, ldp ); - -aexit: - -ldp->rndprc = rndsav; -yy[0] = nsign; -switch( oprec ) - { -#ifdef DEC - case 56: - todec( yy, y ); /* see etodec.c */ - break; -#endif -#if LDBL_MANT_DIG == 53 - case 53: - toe53( yy, y ); - break; -#elif LDBL_MANT_DIG == 24 - case 24: - toe24( yy, y ); - break; -#elif LDBL_MANT_DIG == 64 - case 64: - toe64( yy, y ); - break; -#elif LDBL_MANT_DIG == 113 - case 113: - toe113( yy, y ); - break; -#else - case NBITS: - emovo( yy, y, ldp ); - break; -#endif - } -lenldstr += s - lstr; -if (mflag) - free (lstr); -return lenldstr; -} - - - -/* y = largest integer not greater than x - * (truncated toward minus infinity) - * - * unsigned short x[NE], y[NE] - * LDPARMS *ldp - * - * efloor( x, y, ldp ); - */ -static unsigned short bmask[] = { -0xffff, -0xfffe, -0xfffc, -0xfff8, -0xfff0, -0xffe0, -0xffc0, -0xff80, -0xff00, -0xfe00, -0xfc00, -0xf800, -0xf000, -0xe000, -0xc000, -0x8000, -0x0000, -}; - -static void efloor(short unsigned int *x, short unsigned int *y, LDPARMS *ldp) -{ -register unsigned short *p; -int e, expon, i; -unsigned short f[NE]; - -emov( x, f ); /* leave in external format */ -expon = (int )f[NE-1]; -e = (expon & 0x7fff) - (EXONE - 1); -if( e <= 0 ) - { - eclear(y); - goto isitneg; - } -/* number of bits to clear out */ -e = NBITS - e; -emov( f, y ); -if( e <= 0 ) - return; - -p = &y[0]; -while( e >= 16 ) - { - *p++ = 0; - e -= 16; - } -/* clear the remaining bits */ -*p &= bmask[e]; -/* truncate negatives toward minus infinity */ -isitneg: - -if( (unsigned short )expon & (unsigned short )0x8000 ) - { - for( i=0; i<NE-1; i++ ) - { - if( f[i] != y[i] ) - { - esub( eone, y, y, ldp ); - break; - } - } - } -} - - - -static void eiremain(short unsigned int *den, short unsigned int *num, LDPARMS *ldp) -{ -long ld, ln; -unsigned short j; - unsigned short *equot = ldp->equot; - -ld = den[E]; -ld -= enormlz( den ); -ln = num[E]; -ln -= enormlz( num ); -ecleaz( equot ); -while( ln >= ld ) - { - if( ecmpm(den,num) <= 0 ) - { - esubm(den, num); - j = 1; - } - else - { - j = 0; - } - eshup1(equot); - equot[NI-1] |= j; - eshup1(num); - ln -= 1; - } -emdnorm( num, 0, 0, ln, 0, ldp ); -} - -/* NaN bit patterns - */ -#ifdef MIEEE -static unsigned short nan113[8] = { - 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}; -static unsigned short nan64[6] = {0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}; -static unsigned short nan53[4] = {0x7fff, 0xffff, 0xffff, 0xffff}; -static unsigned short nan24[2] = {0x7fff, 0xffff}; -#else /* !MIEEE */ -static unsigned short nan113[8] = {0, 0, 0, 0, 0, 0, 0x8000, 0x7fff}; -static unsigned short nan64[6] = {0, 0, 0, 0, 0xc000, 0x7fff}; -static unsigned short nan53[4] = {0, 0, 0, 0x7ff8}; -static unsigned short nan24[2] = {0, 0x7fc0}; -#endif /* !MIEEE */ - - -static void enan (short unsigned int *nan, int size) -{ -int i, n; -unsigned short *p; - -switch( size ) - { -#ifndef DEC - case 113: - n = 8; - p = nan113; - break; - - case 64: - n = 6; - p = nan64; - break; - - case 53: - n = 4; - p = nan53; - break; - - case 24: - n = 2; - p = nan24; - break; - - case NBITS: - for( i=0; i<NE-2; i++ ) - *nan++ = 0; - *nan++ = 0xc000; - *nan++ = 0x7fff; - return; - - case NI*16: - *nan++ = 0; - *nan++ = 0x7fff; - *nan++ = 0; - *nan++ = 0xc000; - for( i=4; i<NI; i++ ) - *nan++ = 0; - return; -#endif - default: - mtherr( "enan", DOMAIN ); - return; - } -for (i=0; i < n; i++) - *nan++ = *p++; -} diff --git a/newlib/libc/stdlib/llabs.c b/newlib/libc/stdlib/llabs.c deleted file mode 100644 index 11246c354..000000000 --- a/newlib/libc/stdlib/llabs.c +++ /dev/null @@ -1,66 +0,0 @@ -/* -FUNCTION -<<llabs>>---compute the absolute value of an long long integer. - -INDEX - llabs - -ANSI_SYNOPSIS - #include <stdlib.h> - long long llabs(long long j); - -TRAD_SYNOPSIS - #include <stdlib.h> - long long llabs(<[j]>) - long long <[j]>; - -DESCRIPTION -The <<llabs>> function computes the absolute value of the long long integer -argument <[j]> (also called the magnitude of <[j]>). - -The similar function <<labs>> uses and returns <<long>> rather than -<<long long>> values. - -RETURNS -A nonnegative long long integer. - -PORTABILITY -<<llabs>> is ISO 9899 (C99) compatable. - -No supporting OS subroutines are required. -*/ - -/*- - * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <stdlib.h> - -long long -_DEFUN(llabs, (j), - long long j) -{ - return (j < 0 ? -j : j); -} diff --git a/newlib/libc/stdlib/lldiv.c b/newlib/libc/stdlib/lldiv.c deleted file mode 100644 index 6b853e4b6..000000000 --- a/newlib/libc/stdlib/lldiv.c +++ /dev/null @@ -1,115 +0,0 @@ -/* -FUNCTION -<<lldiv>>---divide two long long integers - -INDEX - lldiv - -ANSI_SYNOPSIS - #include <stdlib.h> - lldiv_t lldiv(long long <[n]>, long long <[d]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - lldiv_t lldiv(<[n]>, <[d]>) - long long <[n]>, <[d]>; - -DESCRIPTION -Divide -@tex -$n/d$, -@end tex -@ifnottex -<[n]>/<[d]>, -@end ifnottex -returning quotient and remainder as two long long integers in a structure -<<lldiv_t>>. - -RETURNS -The result is represented with the structure - -. typedef struct -. { -. long long quot; -. long long rem; -. } lldiv_t; - -where the <<quot>> field represents the quotient, and <<rem>> the -remainder. For nonzero <[d]>, if `<<<[r]> = ldiv(<[n]>,<[d]>);>>' then -<[n]> equals `<<<[r]>.rem + <[d]>*<[r]>.quot>>'. - -To divide <<long>> rather than <<long long>> values, use the similar -function <<ldiv>>. - -PORTABILITY -<<lldiv>> is ISO 9899 (C99) compatable. - -No supporting OS subroutines are required. -*/ - -/*- - * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <stdlib.h> - -/* - * The ANSI standard says that |r.quot| <= |n/d|, where - * n/d is to be computed in infinite precision. In other - * words, we should always truncate the quotient towards - * 0, never -infinity. - * - * Machine division and remainer may work either way when - * one or both of n or d is negative. If only one is - * negative and r.quot has been truncated towards -inf, - * r.rem will have the same sign as denom and the opposite - * sign of num; if both are negative and r.quot has been - * truncated towards -inf, r.rem will be positive (will - * have the opposite sign of num). These are considered - * `wrong'. - * - * If both are num and denom are positive, r will always - * be positive. - * - * This all boils down to: - * if num >= 0, but r.rem < 0, we got the wrong answer. - * In that case, to get the right answer, add 1 to r.quot and - * subtract denom from r.rem. - */ -lldiv_t -_DEFUN (lldiv, (number, denom), - long long numer _AND long long denom) -{ - lldiv_t retval; - - retval.quot = numer / denom; - retval.rem = numer % denom; - if (numer >= 0 && retval.rem < 0) { - retval.quot++; - retval.rem -= denom; - } - return (retval); -} - diff --git a/newlib/libc/stdlib/local.h b/newlib/libc/stdlib/local.h deleted file mode 100644 index 12e6998c1..000000000 --- a/newlib/libc/stdlib/local.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Misc. local definitions for libc/stdlib */ - -#ifndef _LOCAL_H_ -#define _LOCAL_H_ - -char * _EXFUN(_gcvt,(struct _reent *, double , int , char *, char, int)); - -char *__locale_charset(_NOARGS); - -#ifndef __mbstate_t_defined -#include <wchar.h> -#endif - -extern int (*__wctomb) (struct _reent *, char *, wchar_t, const char *, - mbstate_t *); -int __ascii_wctomb (struct _reent *, char *, wchar_t, const char *, - mbstate_t *); -#ifdef _MB_CAPABLE -int __utf8_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -int __sjis_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -int __eucjp_wctomb (struct _reent *, char *, wchar_t, const char *, - mbstate_t *); -int __jis_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -int __iso_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -int __cp_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -#ifdef __CYGWIN__ -int __gbk_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -int __kr_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -int __big5_wctomb (struct _reent *, char *, wchar_t, const char *, mbstate_t *); -#endif -#endif - -extern int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __ascii_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -#ifdef _MB_CAPABLE -int __utf8_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __sjis_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __eucjp_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __jis_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __iso_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __cp_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -#ifdef __CYGWIN__ -int __gbk_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __kr_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -int __big5_mbtowc (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *); -#endif -#endif - -extern wchar_t __iso_8859_conv[14][0x60]; -int __iso_8859_index (const char *); - -extern wchar_t __cp_conv[][0x80]; -int __cp_index (const char *); - -#endif diff --git a/newlib/libc/stdlib/lrand48.c b/newlib/libc/stdlib/lrand48.c deleted file mode 100644 index bfc693b75..000000000 --- a/newlib/libc/stdlib/lrand48.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -long -_DEFUN (_lrand48_r, (r), - struct _reent *r) -{ - _REENT_CHECK_RAND48(r); - __dorand48(r, __rand48_seed); - return (long)((unsigned long) __rand48_seed[2] << 15) + - ((unsigned long) __rand48_seed[1] >> 1); -} - -#ifndef _REENT_ONLY -long -_DEFUN_VOID (lrand48) -{ - return _lrand48_r (_REENT); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/malign.c b/newlib/libc/stdlib/malign.c deleted file mode 100644 index 1eded306b..000000000 --- a/newlib/libc/stdlib/malign.c +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef MALLOC_PROVIDED -/* malign.c -- a wrapper for memalign_r. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdlib.h> -#include <malloc.h> - -#ifndef _REENT_ONLY - -_PTR -_DEFUN (memalign, (align, nbytes), - size_t align _AND - size_t nbytes) -{ - return _memalign_r (_REENT, align, nbytes); -} - -#endif -#endif diff --git a/newlib/libc/stdlib/malloc.c b/newlib/libc/stdlib/malloc.c deleted file mode 100644 index 160a13eff..000000000 --- a/newlib/libc/stdlib/malloc.c +++ /dev/null @@ -1,227 +0,0 @@ -/* VxWorks provides its own version of malloc, and we can't use this - one because VxWorks does not provide sbrk. So we have a hook to - not compile this code. */ - -/* The routines here are simple cover fns to the routines that do the real - work (the reentrant versions). */ -/* FIXME: Does the warning below (see WARNINGS) about non-reentrancy still - apply? A first guess would be "no", but how about reentrancy in the *same* - thread? */ - -#ifdef MALLOC_PROVIDED - -int _dummy_malloc = 1; - -#else - -/* -FUNCTION -<<malloc>>, <<realloc>>, <<free>>---manage memory - -INDEX - malloc -INDEX - realloc -INDEX - reallocf -INDEX - free -INDEX - memalign -INDEX - malloc_usable_size -INDEX - _malloc_r -INDEX - _realloc_r -INDEX - _reallocf_r -INDEX - _free_r -INDEX - _memalign_r -INDEX - _malloc_usable_size_r - -ANSI_SYNOPSIS - #include <stdlib.h> - void *malloc(size_t <[nbytes]>); - void *realloc(void *<[aptr]>, size_t <[nbytes]>); - void *reallocf(void *<[aptr]>, size_t <[nbytes]>); - void free(void *<[aptr]>); - - void *memalign(size_t <[align]>, size_t <[nbytes]>); - - size_t malloc_usable_size(void *<[aptr]>); - - void *_malloc_r(void *<[reent]>, size_t <[nbytes]>); - void *_realloc_r(void *<[reent]>, - void *<[aptr]>, size_t <[nbytes]>); - void *_reallocf_r(void *<[reent]>, - void *<[aptr]>, size_t <[nbytes]>); - void _free_r(void *<[reent]>, void *<[aptr]>); - - void *_memalign_r(void *<[reent]>, - size_t <[align]>, size_t <[nbytes]>); - - size_t _malloc_usable_size_r(void *<[reent]>, void *<[aptr]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - char *malloc(<[nbytes]>) - size_t <[nbytes]>; - - char *realloc(<[aptr]>, <[nbytes]>) - char *<[aptr]>; - size_t <[nbytes]>; - - char *reallocf(<[aptr]>, <[nbytes]>) - char *<[aptr]>; - size_t <[nbytes]>; - - void free(<[aptr]>) - char *<[aptr]>; - - char *memalign(<[align]>, <[nbytes]>) - size_t <[align]>; - size_t <[nbytes]>; - - size_t malloc_usable_size(<[aptr]>) - char *<[aptr]>; - - char *_malloc_r(<[reent]>,<[nbytes]>) - char *<[reent]>; - size_t <[nbytes]>; - - char *_realloc_r(<[reent]>, <[aptr]>, <[nbytes]>) - char *<[reent]>; - char *<[aptr]>; - size_t <[nbytes]>; - - char *_reallocf_r(<[reent]>, <[aptr]>, <[nbytes]>) - char *<[reent]>; - char *<[aptr]>; - size_t <[nbytes]>; - - void _free_r(<[reent]>, <[aptr]>) - char *<[reent]>; - char *<[aptr]>; - - char *_memalign_r(<[reent]>, <[align]>, <[nbytes]>) - char *<[reent]>; - size_t <[align]>; - size_t <[nbytes]>; - - size_t malloc_usable_size(<[reent]>, <[aptr]>) - char *<[reent]>; - char *<[aptr]>; - -DESCRIPTION -These functions manage a pool of system memory. - -Use <<malloc>> to request allocation of an object with at least -<[nbytes]> bytes of storage available. If the space is available, -<<malloc>> returns a pointer to a newly allocated block as its result. - -If you already have a block of storage allocated by <<malloc>>, but -you no longer need all the space allocated to it, you can make it -smaller by calling <<realloc>> with both the object pointer and the -new desired size as arguments. <<realloc>> guarantees that the -contents of the smaller object match the beginning of the original object. - -Similarly, if you need more space for an object, use <<realloc>> to -request the larger size; again, <<realloc>> guarantees that the -beginning of the new, larger object matches the contents of the -original object. - -When you no longer need an object originally allocated by <<malloc>> -or <<realloc>> (or the related function <<calloc>>), return it to the -memory storage pool by calling <<free>> with the address of the object -as the argument. You can also use <<realloc>> for this purpose by -calling it with <<0>> as the <[nbytes]> argument. - -The <<reallocf>> function behaves just like <<realloc>> except if the -function is required to allocate new storage and this fails. In this -case <<reallocf>> will free the original object passed in whereas -<<realloc>> will not. - -The <<memalign>> function returns a block of size <[nbytes]> aligned -to a <[align]> boundary. The <[align]> argument must be a power of -two. - -The <<malloc_usable_size>> function takes a pointer to a block -allocated by <<malloc>>. It returns the amount of space that is -available in the block. This may or may not be more than the size -requested from <<malloc>>, due to alignment or minimum size -constraints. - -The alternate functions <<_malloc_r>>, <<_realloc_r>>, <<_reallocf_r>>, -<<_free_r>>, <<_memalign_r>>, and <<_malloc_usable_size_r>> are reentrant -versions. The extra argument <[reent]> is a pointer to a reentrancy structure. - -If you have multiple threads of execution which may call any of these -routines, or if any of these routines may be called reentrantly, then -you must provide implementations of the <<__malloc_lock>> and -<<__malloc_unlock>> functions for your system. See the documentation -for those functions. - -These functions operate by calling the function <<_sbrk_r>> or -<<sbrk>>, which allocates space. You may need to provide one of these -functions for your system. <<_sbrk_r>> is called with a positive -value to allocate more space, and with a negative value to release -previously allocated space if it is no longer required. -@xref{Stubs}. - -RETURNS -<<malloc>> returns a pointer to the newly allocated space, if -successful; otherwise it returns <<NULL>>. If your application needs -to generate empty objects, you may use <<malloc(0)>> for this purpose. - -<<realloc>> returns a pointer to the new block of memory, or <<NULL>> -if a new block could not be allocated. <<NULL>> is also the result -when you use `<<realloc(<[aptr]>,0)>>' (which has the same effect as -`<<free(<[aptr]>)>>'). You should always check the result of -<<realloc>>; successful reallocation is not guaranteed even when -you request a smaller object. - -<<free>> does not return a result. - -<<memalign>> returns a pointer to the newly allocated space. - -<<malloc_usable_size>> returns the usable size. - -PORTABILITY -<<malloc>>, <<realloc>>, and <<free>> are specified by the ANSI C -standard, but other conforming implementations of <<malloc>> may -behave differently when <[nbytes]> is zero. - -<<memalign>> is part of SVR4. - -<<malloc_usable_size>> is not portable. - -Supporting OS subroutines required: <<sbrk>>. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdlib.h> -#include <malloc.h> - -#ifndef _REENT_ONLY - -_PTR -_DEFUN (malloc, (nbytes), - size_t nbytes) /* get a block */ -{ - return _malloc_r (_REENT, nbytes); -} - -void -_DEFUN (free, (aptr), - _PTR aptr) -{ - _free_r (_REENT, aptr); -} - -#endif - -#endif /* ! defined (MALLOC_PROVIDED) */ diff --git a/newlib/libc/stdlib/mallocr.c b/newlib/libc/stdlib/mallocr.c deleted file mode 100644 index e7cdace22..000000000 --- a/newlib/libc/stdlib/mallocr.c +++ /dev/null @@ -1,3692 +0,0 @@ -#ifdef MALLOC_PROVIDED -int _dummy_mallocr = 1; -#else -/* ---------- To make a malloc.h, start cutting here ------------ */ - -/* - A version of malloc/free/realloc written by Doug Lea and released to the - public domain. Send questions/comments/complaints/performance data - to dl@cs.oswego.edu - -* VERSION 2.6.4 Thu Nov 28 07:54:55 1996 Doug Lea (dl at gee) - - Note: There may be an updated version of this malloc obtainable at - ftp://g.oswego.edu/pub/misc/malloc.c - Check before installing! - -* Why use this malloc? - - This is not the fastest, most space-conserving, most portable, or - most tunable malloc ever written. However it is among the fastest - while also being among the most space-conserving, portable and tunable. - Consistent balance across these factors results in a good general-purpose - allocator. For a high-level description, see - http://g.oswego.edu/dl/html/malloc.html - -* Synopsis of public routines - - (Much fuller descriptions are contained in the program documentation below.) - - malloc(size_t n); - Return a pointer to a newly allocated chunk of at least n bytes, or null - if no space is available. - free(Void_t* p); - Release the chunk of memory pointed to by p, or no effect if p is null. - realloc(Void_t* p, size_t n); - Return a pointer to a chunk of size n that contains the same data - as does chunk p up to the minimum of (n, p's size) bytes, or null - if no space is available. The returned pointer may or may not be - the same as p. If p is null, equivalent to malloc. Unless the - #define REALLOC_ZERO_BYTES_FREES below is set, realloc with a - size argument of zero (re)allocates a minimum-sized chunk. - memalign(size_t alignment, size_t n); - Return a pointer to a newly allocated chunk of n bytes, aligned - in accord with the alignment argument, which must be a power of - two. - valloc(size_t n); - Equivalent to memalign(pagesize, n), where pagesize is the page - size of the system (or as near to this as can be figured out from - all the includes/defines below.) - pvalloc(size_t n); - Equivalent to valloc(minimum-page-that-holds(n)), that is, - round up n to nearest pagesize. - calloc(size_t unit, size_t quantity); - Returns a pointer to quantity * unit bytes, with all locations - set to zero. - cfree(Void_t* p); - Equivalent to free(p). - malloc_trim(size_t pad); - Release all but pad bytes of freed top-most memory back - to the system. Return 1 if successful, else 0. - malloc_usable_size(Void_t* p); - Report the number usable allocated bytes associated with allocated - chunk p. This may or may not report more bytes than were requested, - due to alignment and minimum size constraints. - malloc_stats(); - Prints brief summary statistics on stderr. - mallinfo() - Returns (by copy) a struct containing various summary statistics. - mallopt(int parameter_number, int parameter_value) - Changes one of the tunable parameters described below. Returns - 1 if successful in changing the parameter, else 0. - -* Vital statistics: - - Alignment: 8-byte - 8 byte alignment is currently hardwired into the design. This - seems to suffice for all current machines and C compilers. - - Assumed pointer representation: 4 or 8 bytes - Code for 8-byte pointers is untested by me but has worked - reliably by Wolfram Gloger, who contributed most of the - changes supporting this. - - Assumed size_t representation: 4 or 8 bytes - Note that size_t is allowed to be 4 bytes even if pointers are 8. - - Minimum overhead per allocated chunk: 4 or 8 bytes - Each malloced chunk has a hidden overhead of 4 bytes holding size - and status information. - - Minimum allocated size: 4-byte ptrs: 16 bytes (including 4 overhead) - 8-byte ptrs: 24/32 bytes (including, 4/8 overhead) - - When a chunk is freed, 12 (for 4byte ptrs) or 20 (for 8 byte - ptrs but 4 byte size) or 24 (for 8/8) additional bytes are - needed; 4 (8) for a trailing size field - and 8 (16) bytes for free list pointers. Thus, the minimum - allocatable size is 16/24/32 bytes. - - Even a request for zero bytes (i.e., malloc(0)) returns a - pointer to something of the minimum allocatable size. - - Maximum allocated size: 4-byte size_t: 2^31 - 8 bytes - 8-byte size_t: 2^63 - 16 bytes - - It is assumed that (possibly signed) size_t bit values suffice to - represent chunk sizes. `Possibly signed' is due to the fact - that `size_t' may be defined on a system as either a signed or - an unsigned type. To be conservative, values that would appear - as negative numbers are avoided. - Requests for sizes with a negative sign bit will return a - minimum-sized chunk. - - Maximum overhead wastage per allocated chunk: normally 15 bytes - - Alignnment demands, plus the minimum allocatable size restriction - make the normal worst-case wastage 15 bytes (i.e., up to 15 - more bytes will be allocated than were requested in malloc), with - two exceptions: - 1. Because requests for zero bytes allocate non-zero space, - the worst case wastage for a request of zero bytes is 24 bytes. - 2. For requests >= mmap_threshold that are serviced via - mmap(), the worst case wastage is 8 bytes plus the remainder - from a system page (the minimal mmap unit); typically 4096 bytes. - -* Limitations - - Here are some features that are NOT currently supported - - * No user-definable hooks for callbacks and the like. - * No automated mechanism for fully checking that all accesses - to malloced memory stay within their bounds. - * No support for compaction. - -* Synopsis of compile-time options: - - People have reported using previous versions of this malloc on all - versions of Unix, sometimes by tweaking some of the defines - below. It has been tested most extensively on Solaris and - Linux. It is also reported to work on WIN32 platforms. - People have also reported adapting this malloc for use in - stand-alone embedded systems. - - The implementation is in straight, hand-tuned ANSI C. Among other - consequences, it uses a lot of macros. Because of this, to be at - all usable, this code should be compiled using an optimizing compiler - (for example gcc -O2) that can simplify expressions and control - paths. - - __STD_C (default: derived from C compiler defines) - Nonzero if using ANSI-standard C compiler, a C++ compiler, or - a C compiler sufficiently close to ANSI to get away with it. - DEBUG (default: NOT defined) - Define to enable debugging. Adds fairly extensive assertion-based - checking to help track down memory errors, but noticeably slows down - execution. - SEPARATE_OBJECTS (default: NOT defined) - Define this to compile into separate .o files. You must then - compile malloc.c several times, defining a DEFINE_* macro each - time. The list of DEFINE_* macros appears below. - MALLOC_LOCK (default: NOT defined) - MALLOC_UNLOCK (default: NOT defined) - Define these to C expressions which are run to lock and unlock - the malloc data structures. Calls may be nested; that is, - MALLOC_LOCK may be called more than once before the corresponding - MALLOC_UNLOCK calls. MALLOC_LOCK must avoid waiting for a lock - that it already holds. - MALLOC_ALIGNMENT (default: NOT defined) - Define this to 16 if you need 16 byte alignment instead of 8 byte alignment - which is the normal default. - REALLOC_ZERO_BYTES_FREES (default: NOT defined) - Define this if you think that realloc(p, 0) should be equivalent - to free(p). Otherwise, since malloc returns a unique pointer for - malloc(0), so does realloc(p, 0). - HAVE_MEMCPY (default: defined) - Define if you are not otherwise using ANSI STD C, but still - have memcpy and memset in your C library and want to use them. - Otherwise, simple internal versions are supplied. - USE_MEMCPY (default: 1 if HAVE_MEMCPY is defined, 0 otherwise) - Define as 1 if you want the C library versions of memset and - memcpy called in realloc and calloc (otherwise macro versions are used). - At least on some platforms, the simple macro versions usually - outperform libc versions. - HAVE_MMAP (default: defined as 1) - Define to non-zero to optionally make malloc() use mmap() to - allocate very large blocks. - HAVE_MREMAP (default: defined as 0 unless Linux libc set) - Define to non-zero to optionally make realloc() use mremap() to - reallocate very large blocks. - malloc_getpagesize (default: derived from system #includes) - Either a constant or routine call returning the system page size. - HAVE_USR_INCLUDE_MALLOC_H (default: NOT defined) - Optionally define if you are on a system with a /usr/include/malloc.h - that declares struct mallinfo. It is not at all necessary to - define this even if you do, but will ensure consistency. - INTERNAL_SIZE_T (default: size_t) - Define to a 32-bit type (probably `unsigned int') if you are on a - 64-bit machine, yet do not want or need to allow malloc requests of - greater than 2^31 to be handled. This saves space, especially for - very small chunks. - INTERNAL_LINUX_C_LIB (default: NOT defined) - Defined only when compiled as part of Linux libc. - Also note that there is some odd internal name-mangling via defines - (for example, internally, `malloc' is named `mALLOc') needed - when compiling in this case. These look funny but don't otherwise - affect anything. - INTERNAL_NEWLIB (default: NOT defined) - Defined only when compiled as part of the Cygnus newlib - distribution. - WIN32 (default: undefined) - Define this on MS win (95, nt) platforms to compile in sbrk emulation. - LACKS_UNISTD_H (default: undefined) - Define this if your system does not have a <unistd.h>. - MORECORE (default: sbrk) - The name of the routine to call to obtain more memory from the system. - MORECORE_FAILURE (default: -1) - The value returned upon failure of MORECORE. - MORECORE_CLEARS (default 1) - True (1) if the routine mapped to MORECORE zeroes out memory (which - holds for sbrk). - DEFAULT_TRIM_THRESHOLD - DEFAULT_TOP_PAD - DEFAULT_MMAP_THRESHOLD - DEFAULT_MMAP_MAX - Default values of tunable parameters (described in detail below) - controlling interaction with host system routines (sbrk, mmap, etc). - These values may also be changed dynamically via mallopt(). The - preset defaults are those that give best performance for typical - programs/systems. - - -*/ - - - - -/* Preliminaries */ - -#ifndef __STD_C -#ifdef __STDC__ -#define __STD_C 1 -#else -#if __cplusplus -#define __STD_C 1 -#else -#define __STD_C 0 -#endif /*__cplusplus*/ -#endif /*__STDC__*/ -#endif /*__STD_C*/ - -#ifndef Void_t -#if __STD_C -#define Void_t void -#else -#define Void_t char -#endif -#endif /*Void_t*/ - -#if __STD_C -#include <stddef.h> /* for size_t */ -#else -#include <sys/types.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdio.h> /* needed for malloc_stats */ -#include <limits.h> /* needed for overflow checks */ -#include <errno.h> /* needed to set errno to ENOMEM */ - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#endif - -/* - Compile-time options -*/ - - -/* - - Special defines for Cygnus newlib distribution. - - */ - -#ifdef INTERNAL_NEWLIB - -#include <sys/config.h> - -/* - In newlib, all the publically visible routines take a reentrancy - pointer. We don't currently do anything much with it, but we do - pass it to the lock routine. - */ - -#include <reent.h> - -#define POINTER_UINT unsigned _POINTER_INT -#define SEPARATE_OBJECTS -#define HAVE_MMAP 0 -#define MORECORE(size) _sbrk_r(reent_ptr, (size)) -#define MORECORE_CLEARS 0 -#define MALLOC_LOCK __malloc_lock(reent_ptr) -#define MALLOC_UNLOCK __malloc_unlock(reent_ptr) - -#ifdef __CYGWIN__ -# undef _WIN32 -# undef WIN32 -#endif - -#ifndef _WIN32 -#ifdef SMALL_MEMORY -#define malloc_getpagesize (128) -#else -#define malloc_getpagesize (4096) -#endif -#endif - -#if __STD_C -extern void __malloc_lock(struct _reent *); -extern void __malloc_unlock(struct _reent *); -#else -extern void __malloc_lock(); -extern void __malloc_unlock(); -#endif - -#if __STD_C -#define RARG struct _reent *reent_ptr, -#define RONEARG struct _reent *reent_ptr -#else -#define RARG reent_ptr -#define RONEARG reent_ptr -#define RDECL struct _reent *reent_ptr; -#endif - -#define RERRNO reent_ptr->_errno -#define RCALL reent_ptr, -#define RONECALL reent_ptr - -#else /* ! INTERNAL_NEWLIB */ - -#define POINTER_UINT unsigned long -#define RARG -#define RONEARG -#define RDECL -#define RERRNO errno -#define RCALL -#define RONECALL - -#endif /* ! INTERNAL_NEWLIB */ - -/* - Debugging: - - Because freed chunks may be overwritten with link fields, this - malloc will often die when freed memory is overwritten by user - programs. This can be very effective (albeit in an annoying way) - in helping track down dangling pointers. - - If you compile with -DDEBUG, a number of assertion checks are - enabled that will catch more memory errors. You probably won't be - able to make much sense of the actual assertion errors, but they - should help you locate incorrectly overwritten memory. The - checking is fairly extensive, and will slow down execution - noticeably. Calling malloc_stats or mallinfo with DEBUG set will - attempt to check every non-mmapped allocated and free chunk in the - course of computing the summmaries. (By nature, mmapped regions - cannot be checked very much automatically.) - - Setting DEBUG may also be helpful if you are trying to modify - this code. The assertions in the check routines spell out in more - detail the assumptions and invariants underlying the algorithms. - -*/ - -#if DEBUG -#include <assert.h> -#else -#define assert(x) ((void)0) -#endif - - -/* - SEPARATE_OBJECTS should be defined if you want each function to go - into a separate .o file. You must then compile malloc.c once per - function, defining the appropriate DEFINE_ macro. See below for the - list of macros. - */ - -#ifndef SEPARATE_OBJECTS -#define DEFINE_MALLOC -#define DEFINE_FREE -#define DEFINE_REALLOC -#define DEFINE_CALLOC -#define DEFINE_CFREE -#define DEFINE_MEMALIGN -#define DEFINE_VALLOC -#define DEFINE_PVALLOC -#define DEFINE_MALLINFO -#define DEFINE_MALLOC_STATS -#define DEFINE_MALLOC_USABLE_SIZE -#define DEFINE_MALLOPT - -#define STATIC static -#else -#define STATIC -#endif - -/* - Define MALLOC_LOCK and MALLOC_UNLOCK to C expressions to run to - lock and unlock the malloc data structures. MALLOC_LOCK may be - called recursively. - */ - -#ifndef MALLOC_LOCK -#define MALLOC_LOCK -#endif - -#ifndef MALLOC_UNLOCK -#define MALLOC_UNLOCK -#endif - -/* - INTERNAL_SIZE_T is the word-size used for internal bookkeeping - of chunk sizes. On a 64-bit machine, you can reduce malloc - overhead by defining INTERNAL_SIZE_T to be a 32 bit `unsigned int' - at the expense of not being able to handle requests greater than - 2^31. This limitation is hardly ever a concern; you are encouraged - to set this. However, the default version is the same as size_t. -*/ - -#ifndef INTERNAL_SIZE_T -#define INTERNAL_SIZE_T size_t -#endif - -/* - Following is needed on implementations whereby long > size_t. - The problem is caused because the code performs subtractions of - size_t values and stores the result in long values. In the case - where long > size_t and the first value is actually less than - the second value, the resultant value is positive. For example, - (long)(x - y) where x = 0 and y is 1 ends up being 0x00000000FFFFFFFF - which is 2*31 - 1 instead of 0xFFFFFFFFFFFFFFFF. This is due to the - fact that assignment from unsigned to signed won't sign extend. -*/ - -#define long_sub_size_t(x, y) \ - (sizeof (long) > sizeof (INTERNAL_SIZE_T) && x < y \ - ? -(long) (y - x) \ - : (long) (x - y)) - -/* - REALLOC_ZERO_BYTES_FREES should be set if a call to - realloc with zero bytes should be the same as a call to free. - Some people think it should. Otherwise, since this malloc - returns a unique pointer for malloc(0), so does realloc(p, 0). -*/ - - -/* #define REALLOC_ZERO_BYTES_FREES */ - - -/* - WIN32 causes an emulation of sbrk to be compiled in - mmap-based options are not currently supported in WIN32. -*/ - -/* #define WIN32 */ -#ifdef WIN32 -#define MORECORE wsbrk -#define HAVE_MMAP 0 -#endif - - -/* - HAVE_MEMCPY should be defined if you are not otherwise using - ANSI STD C, but still have memcpy and memset in your C library - and want to use them in calloc and realloc. Otherwise simple - macro versions are defined here. - - USE_MEMCPY should be defined as 1 if you actually want to - have memset and memcpy called. People report that the macro - versions are often enough faster than libc versions on many - systems that it is better to use them. - -*/ - -#define HAVE_MEMCPY - -/* Although the original macro is called USE_MEMCPY, newlib actually - uses memmove to handle cases whereby a platform's memcpy implementation - copies backwards and thus destructive overlap may occur in realloc - whereby we are reclaiming free memory prior to the old allocation. */ -#ifndef USE_MEMCPY -#ifdef HAVE_MEMCPY -#define USE_MEMCPY 1 -#else -#define USE_MEMCPY 0 -#endif -#endif - -#if (__STD_C || defined(HAVE_MEMCPY)) - -#if __STD_C -void* memset(void*, int, size_t); -void* memcpy(void*, const void*, size_t); -void* memmove(void*, const void*, size_t); -#else -Void_t* memset(); -Void_t* memcpy(); -Void_t* memmove(); -#endif -#endif - -#if USE_MEMCPY - -/* The following macros are only invoked with (2n+1)-multiples of - INTERNAL_SIZE_T units, with a positive integer n. This is exploited - for fast inline execution when n is small. */ - -#define MALLOC_ZERO(charp, nbytes) \ -do { \ - INTERNAL_SIZE_T mzsz = (nbytes); \ - if(mzsz <= 9*sizeof(mzsz)) { \ - INTERNAL_SIZE_T* mz = (INTERNAL_SIZE_T*) (charp); \ - if(mzsz >= 5*sizeof(mzsz)) { *mz++ = 0; \ - *mz++ = 0; \ - if(mzsz >= 7*sizeof(mzsz)) { *mz++ = 0; \ - *mz++ = 0; \ - if(mzsz >= 9*sizeof(mzsz)) { *mz++ = 0; \ - *mz++ = 0; }}} \ - *mz++ = 0; \ - *mz++ = 0; \ - *mz = 0; \ - } else memset((charp), 0, mzsz); \ -} while(0) - -#define MALLOC_COPY(dest,src,nbytes) \ -do { \ - INTERNAL_SIZE_T mcsz = (nbytes); \ - if(mcsz <= 9*sizeof(mcsz)) { \ - INTERNAL_SIZE_T* mcsrc = (INTERNAL_SIZE_T*) (src); \ - INTERNAL_SIZE_T* mcdst = (INTERNAL_SIZE_T*) (dest); \ - if(mcsz >= 5*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \ - *mcdst++ = *mcsrc++; \ - if(mcsz >= 7*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \ - *mcdst++ = *mcsrc++; \ - if(mcsz >= 9*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \ - *mcdst++ = *mcsrc++; }}} \ - *mcdst++ = *mcsrc++; \ - *mcdst++ = *mcsrc++; \ - *mcdst = *mcsrc ; \ - } else memmove(dest, src, mcsz); \ -} while(0) - -#else /* !USE_MEMCPY */ - -/* Use Duff's device for good zeroing/copying performance. */ - -#define MALLOC_ZERO(charp, nbytes) \ -do { \ - INTERNAL_SIZE_T* mzp = (INTERNAL_SIZE_T*)(charp); \ - long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \ - if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \ - switch (mctmp) { \ - case 0: for(;;) { *mzp++ = 0; \ - case 7: *mzp++ = 0; \ - case 6: *mzp++ = 0; \ - case 5: *mzp++ = 0; \ - case 4: *mzp++ = 0; \ - case 3: *mzp++ = 0; \ - case 2: *mzp++ = 0; \ - case 1: *mzp++ = 0; if(mcn <= 0) break; mcn--; } \ - } \ -} while(0) - -#define MALLOC_COPY(dest,src,nbytes) \ -do { \ - INTERNAL_SIZE_T* mcsrc = (INTERNAL_SIZE_T*) src; \ - INTERNAL_SIZE_T* mcdst = (INTERNAL_SIZE_T*) dest; \ - long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \ - if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \ - switch (mctmp) { \ - case 0: for(;;) { *mcdst++ = *mcsrc++; \ - case 7: *mcdst++ = *mcsrc++; \ - case 6: *mcdst++ = *mcsrc++; \ - case 5: *mcdst++ = *mcsrc++; \ - case 4: *mcdst++ = *mcsrc++; \ - case 3: *mcdst++ = *mcsrc++; \ - case 2: *mcdst++ = *mcsrc++; \ - case 1: *mcdst++ = *mcsrc++; if(mcn <= 0) break; mcn--; } \ - } \ -} while(0) - -#endif - - -/* - Define HAVE_MMAP to optionally make malloc() use mmap() to - allocate very large blocks. These will be returned to the - operating system immediately after a free(). -*/ - -#ifndef HAVE_MMAP -#define HAVE_MMAP 1 -#endif - -/* - Define HAVE_MREMAP to make realloc() use mremap() to re-allocate - large blocks. This is currently only possible on Linux with - kernel versions newer than 1.3.77. -*/ - -#ifndef HAVE_MREMAP -#ifdef INTERNAL_LINUX_C_LIB -#define HAVE_MREMAP 1 -#else -#define HAVE_MREMAP 0 -#endif -#endif - -#if HAVE_MMAP - -#include <unistd.h> -#include <fcntl.h> -#include <sys/mman.h> - -#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) -#define MAP_ANONYMOUS MAP_ANON -#endif - -#endif /* HAVE_MMAP */ - -/* - Access to system page size. To the extent possible, this malloc - manages memory from the system in page-size units. - - The following mechanics for getpagesize were adapted from - bsd/gnu getpagesize.h -*/ - -#ifndef LACKS_UNISTD_H -# include <unistd.h> -#endif - -#ifndef malloc_getpagesize -# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */ -# ifndef _SC_PAGE_SIZE -# define _SC_PAGE_SIZE _SC_PAGESIZE -# endif -# endif -# ifdef _SC_PAGE_SIZE -# define malloc_getpagesize sysconf(_SC_PAGE_SIZE) -# else -# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE) - extern size_t getpagesize(); -# define malloc_getpagesize getpagesize() -# else -# include <sys/param.h> -# ifdef EXEC_PAGESIZE -# define malloc_getpagesize EXEC_PAGESIZE -# else -# ifdef NBPG -# ifndef CLSIZE -# define malloc_getpagesize NBPG -# else -# define malloc_getpagesize (NBPG * CLSIZE) -# endif -# else -# ifdef NBPC -# define malloc_getpagesize NBPC -# else -# ifdef PAGESIZE -# define malloc_getpagesize PAGESIZE -# else -# define malloc_getpagesize (4096) /* just guess */ -# endif -# endif -# endif -# endif -# endif -# endif -#endif - - - -/* - - This version of malloc supports the standard SVID/XPG mallinfo - routine that returns a struct containing the same kind of - information you can get from malloc_stats. It should work on - any SVID/XPG compliant system that has a /usr/include/malloc.h - defining struct mallinfo. (If you'd like to install such a thing - yourself, cut out the preliminary declarations as described above - and below and save them in a malloc.h file. But there's no - compelling reason to bother to do this.) - - The main declaration needed is the mallinfo struct that is returned - (by-copy) by mallinfo(). The SVID/XPG malloinfo struct contains a - bunch of fields, most of which are not even meaningful in this - version of malloc. Some of these fields are are instead filled by - mallinfo() with other numbers that might possibly be of interest. - - HAVE_USR_INCLUDE_MALLOC_H should be set if you have a - /usr/include/malloc.h file that includes a declaration of struct - mallinfo. If so, it is included; else an SVID2/XPG2 compliant - version is declared below. These must be precisely the same for - mallinfo() to work. - -*/ - -/* #define HAVE_USR_INCLUDE_MALLOC_H */ - -#if HAVE_USR_INCLUDE_MALLOC_H -#include "/usr/include/malloc.h" -#else - -/* SVID2/XPG mallinfo structure */ - -struct mallinfo { - int arena; /* total space allocated from system */ - int ordblks; /* number of non-inuse chunks */ - int smblks; /* unused -- always zero */ - int hblks; /* number of mmapped regions */ - int hblkhd; /* total space in mmapped regions */ - int usmblks; /* unused -- always zero */ - int fsmblks; /* unused -- always zero */ - int uordblks; /* total allocated space */ - int fordblks; /* total non-inuse space */ - int keepcost; /* top-most, releasable (via malloc_trim) space */ -}; - -/* SVID2/XPG mallopt options */ - -#define M_MXFAST 1 /* UNUSED in this malloc */ -#define M_NLBLKS 2 /* UNUSED in this malloc */ -#define M_GRAIN 3 /* UNUSED in this malloc */ -#define M_KEEP 4 /* UNUSED in this malloc */ - -#endif - -/* mallopt options that actually do something */ - -#define M_TRIM_THRESHOLD -1 -#define M_TOP_PAD -2 -#define M_MMAP_THRESHOLD -3 -#define M_MMAP_MAX -4 - - - -#ifndef DEFAULT_TRIM_THRESHOLD -#define DEFAULT_TRIM_THRESHOLD (128L * 1024L) -#endif - -/* - M_TRIM_THRESHOLD is the maximum amount of unused top-most memory - to keep before releasing via malloc_trim in free(). - - Automatic trimming is mainly useful in long-lived programs. - Because trimming via sbrk can be slow on some systems, and can - sometimes be wasteful (in cases where programs immediately - afterward allocate more large chunks) the value should be high - enough so that your overall system performance would improve by - releasing. - - The trim threshold and the mmap control parameters (see below) - can be traded off with one another. Trimming and mmapping are - two different ways of releasing unused memory back to the - system. Between these two, it is often possible to keep - system-level demands of a long-lived program down to a bare - minimum. For example, in one test suite of sessions measuring - the XF86 X server on Linux, using a trim threshold of 128K and a - mmap threshold of 192K led to near-minimal long term resource - consumption. - - If you are using this malloc in a long-lived program, it should - pay to experiment with these values. As a rough guide, you - might set to a value close to the average size of a process - (program) running on your system. Releasing this much memory - would allow such a process to run in memory. Generally, it's - worth it to tune for trimming rather tham memory mapping when a - program undergoes phases where several large chunks are - allocated and released in ways that can reuse each other's - storage, perhaps mixed with phases where there are no such - chunks at all. And in well-behaved long-lived programs, - controlling release of large blocks via trimming versus mapping - is usually faster. - - However, in most programs, these parameters serve mainly as - protection against the system-level effects of carrying around - massive amounts of unneeded memory. Since frequent calls to - sbrk, mmap, and munmap otherwise degrade performance, the default - parameters are set to relatively high values that serve only as - safeguards. - - The default trim value is high enough to cause trimming only in - fairly extreme (by current memory consumption standards) cases. - It must be greater than page size to have any useful effect. To - disable trimming completely, you can set to (unsigned long)(-1); - - -*/ - - -#ifndef DEFAULT_TOP_PAD -#define DEFAULT_TOP_PAD (0) -#endif - -/* - M_TOP_PAD is the amount of extra `padding' space to allocate or - retain whenever sbrk is called. It is used in two ways internally: - - * When sbrk is called to extend the top of the arena to satisfy - a new malloc request, this much padding is added to the sbrk - request. - - * When malloc_trim is called automatically from free(), - it is used as the `pad' argument. - - In both cases, the actual amount of padding is rounded - so that the end of the arena is always a system page boundary. - - The main reason for using padding is to avoid calling sbrk so - often. Having even a small pad greatly reduces the likelihood - that nearly every malloc request during program start-up (or - after trimming) will invoke sbrk, which needlessly wastes - time. - - Automatic rounding-up to page-size units is normally sufficient - to avoid measurable overhead, so the default is 0. However, in - systems where sbrk is relatively slow, it can pay to increase - this value, at the expense of carrying around more memory than - the program needs. - -*/ - - -#ifndef DEFAULT_MMAP_THRESHOLD -#define DEFAULT_MMAP_THRESHOLD (128 * 1024) -#endif - -/* - - M_MMAP_THRESHOLD is the request size threshold for using mmap() - to service a request. Requests of at least this size that cannot - be allocated using already-existing space will be serviced via mmap. - (If enough normal freed space already exists it is used instead.) - - Using mmap segregates relatively large chunks of memory so that - they can be individually obtained and released from the host - system. A request serviced through mmap is never reused by any - other request (at least not directly; the system may just so - happen to remap successive requests to the same locations). - - Segregating space in this way has the benefit that mmapped space - can ALWAYS be individually released back to the system, which - helps keep the system level memory demands of a long-lived - program low. Mapped memory can never become `locked' between - other chunks, as can happen with normally allocated chunks, which - menas that even trimming via malloc_trim would not release them. - - However, it has the disadvantages that: - - 1. The space cannot be reclaimed, consolidated, and then - used to service later requests, as happens with normal chunks. - 2. It can lead to more wastage because of mmap page alignment - requirements - 3. It causes malloc performance to be more dependent on host - system memory management support routines which may vary in - implementation quality and may impose arbitrary - limitations. Generally, servicing a request via normal - malloc steps is faster than going through a system's mmap. - - All together, these considerations should lead you to use mmap - only for relatively large requests. - - -*/ - - - -#ifndef DEFAULT_MMAP_MAX -#if HAVE_MMAP -#define DEFAULT_MMAP_MAX (64) -#else -#define DEFAULT_MMAP_MAX (0) -#endif -#endif - -/* - M_MMAP_MAX is the maximum number of requests to simultaneously - service using mmap. This parameter exists because: - - 1. Some systems have a limited number of internal tables for - use by mmap. - 2. In most systems, overreliance on mmap can degrade overall - performance. - 3. If a program allocates many large regions, it is probably - better off using normal sbrk-based allocation routines that - can reclaim and reallocate normal heap memory. Using a - small value allows transition into this mode after the - first few allocations. - - Setting to 0 disables all use of mmap. If HAVE_MMAP is not set, - the default value is 0, and attempts to set it to non-zero values - in mallopt will fail. -*/ - - - - -/* - - Special defines for linux libc - - Except when compiled using these special defines for Linux libc - using weak aliases, this malloc is NOT designed to work in - multithreaded applications. No semaphores or other concurrency - control are provided to ensure that multiple malloc or free calls - don't run at the same time, which could be disasterous. A single - semaphore could be used across malloc, realloc, and free (which is - essentially the effect of the linux weak alias approach). It would - be hard to obtain finer granularity. - -*/ - - -#ifdef INTERNAL_LINUX_C_LIB - -#if __STD_C - -Void_t * __default_morecore_init (ptrdiff_t); -Void_t *(*__morecore)(ptrdiff_t) = __default_morecore_init; - -#else - -Void_t * __default_morecore_init (); -Void_t *(*__morecore)() = __default_morecore_init; - -#endif - -#define MORECORE (*__morecore) -#define MORECORE_FAILURE 0 -#define MORECORE_CLEARS 1 - -#else /* INTERNAL_LINUX_C_LIB */ - -#ifndef INTERNAL_NEWLIB -#if __STD_C -extern Void_t* sbrk(ptrdiff_t); -#else -extern Void_t* sbrk(); -#endif -#endif - -#ifndef MORECORE -#define MORECORE sbrk -#endif - -#ifndef MORECORE_FAILURE -#define MORECORE_FAILURE -1 -#endif - -#ifndef MORECORE_CLEARS -#define MORECORE_CLEARS 1 -#endif - -#endif /* INTERNAL_LINUX_C_LIB */ - -#if defined(INTERNAL_LINUX_C_LIB) && defined(__ELF__) - -#define cALLOc __libc_calloc -#define fREe __libc_free -#define mALLOc __libc_malloc -#define mEMALIGn __libc_memalign -#define rEALLOc __libc_realloc -#define vALLOc __libc_valloc -#define pvALLOc __libc_pvalloc -#define mALLINFo __libc_mallinfo -#define mALLOPt __libc_mallopt - -#pragma weak calloc = __libc_calloc -#pragma weak free = __libc_free -#pragma weak cfree = __libc_free -#pragma weak malloc = __libc_malloc -#pragma weak memalign = __libc_memalign -#pragma weak realloc = __libc_realloc -#pragma weak valloc = __libc_valloc -#pragma weak pvalloc = __libc_pvalloc -#pragma weak mallinfo = __libc_mallinfo -#pragma weak mallopt = __libc_mallopt - -#else - -#ifdef INTERNAL_NEWLIB - -#define cALLOc _calloc_r -#define fREe _free_r -#define mALLOc _malloc_r -#define mEMALIGn _memalign_r -#define rEALLOc _realloc_r -#define vALLOc _valloc_r -#define pvALLOc _pvalloc_r -#define mALLINFo _mallinfo_r -#define mALLOPt _mallopt_r - -#define malloc_stats _malloc_stats_r -#define malloc_trim _malloc_trim_r -#define malloc_usable_size _malloc_usable_size_r - -#define malloc_update_mallinfo __malloc_update_mallinfo - -#define malloc_av_ __malloc_av_ -#define malloc_current_mallinfo __malloc_current_mallinfo -#define malloc_max_sbrked_mem __malloc_max_sbrked_mem -#define malloc_max_total_mem __malloc_max_total_mem -#define malloc_sbrk_base __malloc_sbrk_base -#define malloc_top_pad __malloc_top_pad -#define malloc_trim_threshold __malloc_trim_threshold - -#else /* ! INTERNAL_NEWLIB */ - -#define cALLOc calloc -#define fREe free -#define mALLOc malloc -#define mEMALIGn memalign -#define rEALLOc realloc -#define vALLOc valloc -#define pvALLOc pvalloc -#define mALLINFo mallinfo -#define mALLOPt mallopt - -#endif /* ! INTERNAL_NEWLIB */ -#endif - -/* Public routines */ - -#if __STD_C - -Void_t* mALLOc(RARG size_t); -void fREe(RARG Void_t*); -Void_t* rEALLOc(RARG Void_t*, size_t); -Void_t* mEMALIGn(RARG size_t, size_t); -Void_t* vALLOc(RARG size_t); -Void_t* pvALLOc(RARG size_t); -Void_t* cALLOc(RARG size_t, size_t); -void cfree(Void_t*); -int malloc_trim(RARG size_t); -size_t malloc_usable_size(RARG Void_t*); -void malloc_stats(RONEARG); -int mALLOPt(RARG int, int); -struct mallinfo mALLINFo(RONEARG); -#else -Void_t* mALLOc(); -void fREe(); -Void_t* rEALLOc(); -Void_t* mEMALIGn(); -Void_t* vALLOc(); -Void_t* pvALLOc(); -Void_t* cALLOc(); -void cfree(); -int malloc_trim(); -size_t malloc_usable_size(); -void malloc_stats(); -int mALLOPt(); -struct mallinfo mALLINFo(); -#endif - - -#ifdef __cplusplus -}; /* end of extern "C" */ -#endif - -/* ---------- To make a malloc.h, end cutting here ------------ */ - - -/* - Emulation of sbrk for WIN32 - All code within the ifdef WIN32 is untested by me. -*/ - - -#ifdef WIN32 - -#define AlignPage(add) (((add) + (malloc_getpagesize-1)) & \ -~(malloc_getpagesize-1)) - -/* resrve 64MB to insure large contiguous space */ -#define RESERVED_SIZE (1024*1024*64) -#define NEXT_SIZE (2048*1024) -#define TOP_MEMORY ((unsigned long)2*1024*1024*1024) - -struct GmListElement; -typedef struct GmListElement GmListElement; - -struct GmListElement -{ - GmListElement* next; - void* base; -}; - -static GmListElement* head = 0; -static unsigned int gNextAddress = 0; -static unsigned int gAddressBase = 0; -static unsigned int gAllocatedSize = 0; - -static -GmListElement* makeGmListElement (void* bas) -{ - GmListElement* this; - this = (GmListElement*)(void*)LocalAlloc (0, sizeof (GmListElement)); - ASSERT (this); - if (this) - { - this->base = bas; - this->next = head; - head = this; - } - return this; -} - -void gcleanup () -{ - BOOL rval; - ASSERT ( (head == NULL) || (head->base == (void*)gAddressBase)); - if (gAddressBase && (gNextAddress - gAddressBase)) - { - rval = VirtualFree ((void*)gAddressBase, - gNextAddress - gAddressBase, - MEM_DECOMMIT); - ASSERT (rval); - } - while (head) - { - GmListElement* next = head->next; - rval = VirtualFree (head->base, 0, MEM_RELEASE); - ASSERT (rval); - LocalFree (head); - head = next; - } -} - -static -void* findRegion (void* start_address, unsigned long size) -{ - MEMORY_BASIC_INFORMATION info; - while ((unsigned long)start_address < TOP_MEMORY) - { - VirtualQuery (start_address, &info, sizeof (info)); - if (info.State != MEM_FREE) - start_address = (char*)info.BaseAddress + info.RegionSize; - else if (info.RegionSize >= size) - return start_address; - else - start_address = (char*)info.BaseAddress + info.RegionSize; - } - return NULL; - -} - - -void* wsbrk (long size) -{ - void* tmp; - if (size > 0) - { - if (gAddressBase == 0) - { - gAllocatedSize = max (RESERVED_SIZE, AlignPage (size)); - gNextAddress = gAddressBase = - (unsigned int)VirtualAlloc (NULL, gAllocatedSize, - MEM_RESERVE, PAGE_NOACCESS); - } else if (AlignPage (gNextAddress + size) > (gAddressBase + -gAllocatedSize)) - { - long new_size = max (NEXT_SIZE, AlignPage (size)); - void* new_address = (void*)(gAddressBase+gAllocatedSize); - do - { - new_address = findRegion (new_address, new_size); - - if (new_address == 0) - return (void*)-1; - - gAddressBase = gNextAddress = - (unsigned int)VirtualAlloc (new_address, new_size, - MEM_RESERVE, PAGE_NOACCESS); - // repeat in case of race condition - // The region that we found has been snagged - // by another thread - } - while (gAddressBase == 0); - - ASSERT (new_address == (void*)gAddressBase); - - gAllocatedSize = new_size; - - if (!makeGmListElement ((void*)gAddressBase)) - return (void*)-1; - } - if ((size + gNextAddress) > AlignPage (gNextAddress)) - { - void* res; - res = VirtualAlloc ((void*)AlignPage (gNextAddress), - (size + gNextAddress - - AlignPage (gNextAddress)), - MEM_COMMIT, PAGE_READWRITE); - if (res == 0) - return (void*)-1; - } - tmp = (void*)gNextAddress; - gNextAddress = (unsigned int)tmp + size; - return tmp; - } - else if (size < 0) - { - unsigned int alignedGoal = AlignPage (gNextAddress + size); - /* Trim by releasing the virtual memory */ - if (alignedGoal >= gAddressBase) - { - VirtualFree ((void*)alignedGoal, gNextAddress - alignedGoal, - MEM_DECOMMIT); - gNextAddress = gNextAddress + size; - return (void*)gNextAddress; - } - else - { - VirtualFree ((void*)gAddressBase, gNextAddress - gAddressBase, - MEM_DECOMMIT); - gNextAddress = gAddressBase; - return (void*)-1; - } - } - else - { - return (void*)gNextAddress; - } -} - -#endif - - - -/* - Type declarations -*/ - - -struct malloc_chunk -{ - INTERNAL_SIZE_T prev_size; /* Size of previous chunk (if free). */ - INTERNAL_SIZE_T size; /* Size in bytes, including overhead. */ - struct malloc_chunk* fd; /* double links -- used only if free. */ - struct malloc_chunk* bk; -}; - -typedef struct malloc_chunk* mchunkptr; - -/* - - malloc_chunk details: - - (The following includes lightly edited explanations by Colin Plumb.) - - Chunks of memory are maintained using a `boundary tag' method as - described in e.g., Knuth or Standish. (See the paper by Paul - Wilson ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a - survey of such techniques.) Sizes of free chunks are stored both - in the front of each chunk and at the end. This makes - consolidating fragmented chunks into bigger chunks very fast. The - size fields also hold bits representing whether chunks are free or - in use. - - An allocated chunk looks like this: - - - chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Size of previous chunk, if allocated | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Size of chunk, in bytes |P| - mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | User data starts here... . - . . - . (malloc_usable_space() bytes) . - . | -nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Size of chunk | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - - - Where "chunk" is the front of the chunk for the purpose of most of - the malloc code, but "mem" is the pointer that is returned to the - user. "Nextchunk" is the beginning of the next contiguous chunk. - - Chunks always begin on even word boundries, so the mem portion - (which is returned to the user) is also on an even word boundary, and - thus double-word aligned. - - Free chunks are stored in circular doubly-linked lists, and look like this: - - chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Size of previous chunk | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - `head:' | Size of chunk, in bytes |P| - mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Forward pointer to next chunk in list | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Back pointer to previous chunk in list | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Unused space (may be 0 bytes long) . - . . - . | -nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - `foot:' | Size of chunk, in bytes | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - - The P (PREV_INUSE) bit, stored in the unused low-order bit of the - chunk size (which is always a multiple of two words), is an in-use - bit for the *previous* chunk. If that bit is *clear*, then the - word before the current chunk size contains the previous chunk - size, and can be used to find the front of the previous chunk. - (The very first chunk allocated always has this bit set, - preventing access to non-existent (or non-owned) memory.) - - Note that the `foot' of the current chunk is actually represented - as the prev_size of the NEXT chunk. (This makes it easier to - deal with alignments etc). - - The two exceptions to all this are - - 1. The special chunk `top', which doesn't bother using the - trailing size field since there is no - next contiguous chunk that would have to index off it. (After - initialization, `top' is forced to always exist. If it would - become less than MINSIZE bytes long, it is replenished via - malloc_extend_top.) - - 2. Chunks allocated via mmap, which have the second-lowest-order - bit (IS_MMAPPED) set in their size fields. Because they are - never merged or traversed from any other chunk, they have no - foot size or inuse information. - - Available chunks are kept in any of several places (all declared below): - - * `av': An array of chunks serving as bin headers for consolidated - chunks. Each bin is doubly linked. The bins are approximately - proportionally (log) spaced. There are a lot of these bins - (128). This may look excessive, but works very well in - practice. All procedures maintain the invariant that no - consolidated chunk physically borders another one. Chunks in - bins are kept in size order, with ties going to the - approximately least recently used chunk. - - The chunks in each bin are maintained in decreasing sorted order by - size. This is irrelevant for the small bins, which all contain - the same-sized chunks, but facilitates best-fit allocation for - larger chunks. (These lists are just sequential. Keeping them in - order almost never requires enough traversal to warrant using - fancier ordered data structures.) Chunks of the same size are - linked with the most recently freed at the front, and allocations - are taken from the back. This results in LRU or FIFO allocation - order, which tends to give each chunk an equal opportunity to be - consolidated with adjacent freed chunks, resulting in larger free - chunks and less fragmentation. - - * `top': The top-most available chunk (i.e., the one bordering the - end of available memory) is treated specially. It is never - included in any bin, is used only if no other chunk is - available, and is released back to the system if it is very - large (see M_TRIM_THRESHOLD). - - * `last_remainder': A bin holding only the remainder of the - most recently split (non-top) chunk. This bin is checked - before other non-fitting chunks, so as to provide better - locality for runs of sequentially allocated chunks. - - * Implicitly, through the host system's memory mapping tables. - If supported, requests greater than a threshold are usually - serviced via calls to mmap, and then later released via munmap. - -*/ - - - - - - -/* sizes, alignments */ - -#define SIZE_SZ (sizeof(INTERNAL_SIZE_T)) -#ifndef MALLOC_ALIGNMENT -#define MALLOC_ALIGN 8 -#define MALLOC_ALIGNMENT (SIZE_SZ < 4 ? 8 : (SIZE_SZ + SIZE_SZ)) -#else -#define MALLOC_ALIGN MALLOC_ALIGNMENT -#endif -#define MALLOC_ALIGN_MASK (MALLOC_ALIGNMENT - 1) -#define MINSIZE (sizeof(struct malloc_chunk)) - -/* conversion from malloc headers to user pointers, and back */ - -#define chunk2mem(p) ((Void_t*)((char*)(p) + 2*SIZE_SZ)) -#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - 2*SIZE_SZ)) - -/* pad request bytes into a usable size */ - -#define request2size(req) \ - (((unsigned long)((req) + (SIZE_SZ + MALLOC_ALIGN_MASK)) < \ - (unsigned long)(MINSIZE + MALLOC_ALIGN_MASK)) ? ((MINSIZE + MALLOC_ALIGN_MASK) & ~(MALLOC_ALIGN_MASK)) : \ - (((req) + (SIZE_SZ + MALLOC_ALIGN_MASK)) & ~(MALLOC_ALIGN_MASK))) - -/* Check if m has acceptable alignment */ - -#define aligned_OK(m) (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0) - - - - -/* - Physical chunk operations -*/ - - -/* size field is or'ed with PREV_INUSE when previous adjacent chunk in use */ - -#define PREV_INUSE 0x1 - -/* size field is or'ed with IS_MMAPPED if the chunk was obtained with mmap() */ - -#define IS_MMAPPED 0x2 - -/* Bits to mask off when extracting size */ - -#define SIZE_BITS (PREV_INUSE|IS_MMAPPED) - - -/* Ptr to next physical malloc_chunk. */ - -#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->size & ~PREV_INUSE) )) - -/* Ptr to previous physical malloc_chunk */ - -#define prev_chunk(p)\ - ((mchunkptr)( ((char*)(p)) - ((p)->prev_size) )) - - -/* Treat space at ptr + offset as a chunk */ - -#define chunk_at_offset(p, s) ((mchunkptr)(((char*)(p)) + (s))) - - - - -/* - Dealing with use bits -*/ - -/* extract p's inuse bit */ - -#define inuse(p)\ -((((mchunkptr)(((char*)(p))+((p)->size & ~PREV_INUSE)))->size) & PREV_INUSE) - -/* extract inuse bit of previous chunk */ - -#define prev_inuse(p) ((p)->size & PREV_INUSE) - -/* check for mmap()'ed chunk */ - -#define chunk_is_mmapped(p) ((p)->size & IS_MMAPPED) - -/* set/clear chunk as in use without otherwise disturbing */ - -#define set_inuse(p)\ -((mchunkptr)(((char*)(p)) + ((p)->size & ~PREV_INUSE)))->size |= PREV_INUSE - -#define clear_inuse(p)\ -((mchunkptr)(((char*)(p)) + ((p)->size & ~PREV_INUSE)))->size &= ~(PREV_INUSE) - -/* check/set/clear inuse bits in known places */ - -#define inuse_bit_at_offset(p, s)\ - (((mchunkptr)(((char*)(p)) + (s)))->size & PREV_INUSE) - -#define set_inuse_bit_at_offset(p, s)\ - (((mchunkptr)(((char*)(p)) + (s)))->size |= PREV_INUSE) - -#define clear_inuse_bit_at_offset(p, s)\ - (((mchunkptr)(((char*)(p)) + (s)))->size &= ~(PREV_INUSE)) - - - - -/* - Dealing with size fields -*/ - -/* Get size, ignoring use bits */ - -#define chunksize(p) ((p)->size & ~(SIZE_BITS)) - -/* Set size at head, without disturbing its use bit */ - -#define set_head_size(p, s) ((p)->size = (((p)->size & PREV_INUSE) | (s))) - -/* Set size/use ignoring previous bits in header */ - -#define set_head(p, s) ((p)->size = (s)) - -/* Set size at footer (only when chunk is not in use) */ - -#define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_size = (s)) - - - - - -/* - Bins - - The bins, `av_' are an array of pairs of pointers serving as the - heads of (initially empty) doubly-linked lists of chunks, laid out - in a way so that each pair can be treated as if it were in a - malloc_chunk. (This way, the fd/bk offsets for linking bin heads - and chunks are the same). - - Bins for sizes < 512 bytes contain chunks of all the same size, spaced - 8 bytes apart. Larger bins are approximately logarithmically - spaced. (See the table below.) The `av_' array is never mentioned - directly in the code, but instead via bin access macros. - - Bin layout: - - 64 bins of size 8 - 32 bins of size 64 - 16 bins of size 512 - 8 bins of size 4096 - 4 bins of size 32768 - 2 bins of size 262144 - 1 bin of size what's left - - There is actually a little bit of slop in the numbers in bin_index - for the sake of speed. This makes no difference elsewhere. - - The special chunks `top' and `last_remainder' get their own bins, - (this is implemented via yet more trickery with the av_ array), - although `top' is never properly linked to its bin since it is - always handled specially. - -*/ - -#ifdef SEPARATE_OBJECTS -#define av_ malloc_av_ -#endif - -#define NAV 128 /* number of bins */ - -typedef struct malloc_chunk* mbinptr; - -/* access macros */ - -#define bin_at(i) ((mbinptr)((char*)&(av_[2*(i) + 2]) - 2*SIZE_SZ)) -#define next_bin(b) ((mbinptr)((char*)(b) + 2 * sizeof(mbinptr))) -#define prev_bin(b) ((mbinptr)((char*)(b) - 2 * sizeof(mbinptr))) - -/* - The first 2 bins are never indexed. The corresponding av_ cells are instead - used for bookkeeping. This is not to save space, but to simplify - indexing, maintain locality, and avoid some initialization tests. -*/ - -#define top (bin_at(0)->fd) /* The topmost chunk */ -#define last_remainder (bin_at(1)) /* remainder from last split */ - - -/* - Because top initially points to its own bin with initial - zero size, thus forcing extension on the first malloc request, - we avoid having any special code in malloc to check whether - it even exists yet. But we still need to in malloc_extend_top. -*/ - -#define initial_top ((mchunkptr)(bin_at(0))) - -/* Helper macro to initialize bins */ - -#define IAV(i) bin_at(i), bin_at(i) - -#ifdef DEFINE_MALLOC -STATIC mbinptr av_[NAV * 2 + 2] = { - 0, 0, - IAV(0), IAV(1), IAV(2), IAV(3), IAV(4), IAV(5), IAV(6), IAV(7), - IAV(8), IAV(9), IAV(10), IAV(11), IAV(12), IAV(13), IAV(14), IAV(15), - IAV(16), IAV(17), IAV(18), IAV(19), IAV(20), IAV(21), IAV(22), IAV(23), - IAV(24), IAV(25), IAV(26), IAV(27), IAV(28), IAV(29), IAV(30), IAV(31), - IAV(32), IAV(33), IAV(34), IAV(35), IAV(36), IAV(37), IAV(38), IAV(39), - IAV(40), IAV(41), IAV(42), IAV(43), IAV(44), IAV(45), IAV(46), IAV(47), - IAV(48), IAV(49), IAV(50), IAV(51), IAV(52), IAV(53), IAV(54), IAV(55), - IAV(56), IAV(57), IAV(58), IAV(59), IAV(60), IAV(61), IAV(62), IAV(63), - IAV(64), IAV(65), IAV(66), IAV(67), IAV(68), IAV(69), IAV(70), IAV(71), - IAV(72), IAV(73), IAV(74), IAV(75), IAV(76), IAV(77), IAV(78), IAV(79), - IAV(80), IAV(81), IAV(82), IAV(83), IAV(84), IAV(85), IAV(86), IAV(87), - IAV(88), IAV(89), IAV(90), IAV(91), IAV(92), IAV(93), IAV(94), IAV(95), - IAV(96), IAV(97), IAV(98), IAV(99), IAV(100), IAV(101), IAV(102), IAV(103), - IAV(104), IAV(105), IAV(106), IAV(107), IAV(108), IAV(109), IAV(110), IAV(111), - IAV(112), IAV(113), IAV(114), IAV(115), IAV(116), IAV(117), IAV(118), IAV(119), - IAV(120), IAV(121), IAV(122), IAV(123), IAV(124), IAV(125), IAV(126), IAV(127) -}; -#else -extern mbinptr av_[NAV * 2 + 2]; -#endif - - - -/* field-extraction macros */ - -#define first(b) ((b)->fd) -#define last(b) ((b)->bk) - -/* - Indexing into bins -*/ - -#define bin_index(sz) \ -(((((unsigned long)(sz)) >> 9) == 0) ? (((unsigned long)(sz)) >> 3): \ - ((((unsigned long)(sz)) >> 9) <= 4) ? 56 + (((unsigned long)(sz)) >> 6): \ - ((((unsigned long)(sz)) >> 9) <= 20) ? 91 + (((unsigned long)(sz)) >> 9): \ - ((((unsigned long)(sz)) >> 9) <= 84) ? 110 + (((unsigned long)(sz)) >> 12): \ - ((((unsigned long)(sz)) >> 9) <= 340) ? 119 + (((unsigned long)(sz)) >> 15): \ - ((((unsigned long)(sz)) >> 9) <= 1364) ? 124 + (((unsigned long)(sz)) >> 18): \ - 126) -/* - bins for chunks < 512 are all spaced SMALLBIN_WIDTH bytes apart, and hold - identically sized chunks. This is exploited in malloc. -*/ - -#define MAX_SMALLBIN_SIZE 512 -#define SMALLBIN_WIDTH 8 -#define SMALLBIN_WIDTH_BITS 3 -#define MAX_SMALLBIN (MAX_SMALLBIN_SIZE / SMALLBIN_WIDTH) - 1 - -#define smallbin_index(sz) (((unsigned long)(sz)) >> SMALLBIN_WIDTH_BITS) - -/* - Requests are `small' if both the corresponding and the next bin are small -*/ - -#define is_small_request(nb) (nb < MAX_SMALLBIN_SIZE - SMALLBIN_WIDTH) - - - -/* - To help compensate for the large number of bins, a one-level index - structure is used for bin-by-bin searching. `binblocks' is a - one-word bitvector recording whether groups of BINBLOCKWIDTH bins - have any (possibly) non-empty bins, so they can be skipped over - all at once during during traversals. The bits are NOT always - cleared as soon as all bins in a block are empty, but instead only - when all are noticed to be empty during traversal in malloc. -*/ - -#define BINBLOCKWIDTH 4 /* bins per block */ - -#define binblocks (bin_at(0)->size) /* bitvector of nonempty blocks */ - -/* bin<->block macros */ - -#define idx2binblock(ix) ((unsigned long)1 << (ix / BINBLOCKWIDTH)) -#define mark_binblock(ii) (binblocks |= idx2binblock(ii)) -#define clear_binblock(ii) (binblocks &= ~(idx2binblock(ii))) - - - - - -/* Other static bookkeeping data */ - -#ifdef SEPARATE_OBJECTS -#define trim_threshold malloc_trim_threshold -#define top_pad malloc_top_pad -#define n_mmaps_max malloc_n_mmaps_max -#define mmap_threshold malloc_mmap_threshold -#define sbrk_base malloc_sbrk_base -#define max_sbrked_mem malloc_max_sbrked_mem -#define max_total_mem malloc_max_total_mem -#define current_mallinfo malloc_current_mallinfo -#define n_mmaps malloc_n_mmaps -#define max_n_mmaps malloc_max_n_mmaps -#define mmapped_mem malloc_mmapped_mem -#define max_mmapped_mem malloc_max_mmapped_mem -#endif - -/* variables holding tunable values */ - -#ifdef DEFINE_MALLOC - -STATIC unsigned long trim_threshold = DEFAULT_TRIM_THRESHOLD; -STATIC unsigned long top_pad = DEFAULT_TOP_PAD; -#if HAVE_MMAP -STATIC unsigned int n_mmaps_max = DEFAULT_MMAP_MAX; -STATIC unsigned long mmap_threshold = DEFAULT_MMAP_THRESHOLD; -#endif - -/* The first value returned from sbrk */ -STATIC char* sbrk_base = (char*)(-1); - -/* The maximum memory obtained from system via sbrk */ -STATIC unsigned long max_sbrked_mem = 0; - -/* The maximum via either sbrk or mmap */ -STATIC unsigned long max_total_mem = 0; - -/* internal working copy of mallinfo */ -STATIC struct mallinfo current_mallinfo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -#if HAVE_MMAP - -/* Tracking mmaps */ - -STATIC unsigned int n_mmaps = 0; -STATIC unsigned int max_n_mmaps = 0; -STATIC unsigned long mmapped_mem = 0; -STATIC unsigned long max_mmapped_mem = 0; - -#endif - -#else /* ! DEFINE_MALLOC */ - -extern unsigned long trim_threshold; -extern unsigned long top_pad; -#if HAVE_MMAP -extern unsigned int n_mmaps_max; -extern unsigned long mmap_threshold; -#endif -extern char* sbrk_base; -extern unsigned long max_sbrked_mem; -extern unsigned long max_total_mem; -extern struct mallinfo current_mallinfo; -#if HAVE_MMAP -extern unsigned int n_mmaps; -extern unsigned int max_n_mmaps; -extern unsigned long mmapped_mem; -extern unsigned long max_mmapped_mem; -#endif - -#endif /* ! DEFINE_MALLOC */ - -/* The total memory obtained from system via sbrk */ -#define sbrked_mem (current_mallinfo.arena) - - - -/* - Debugging support -*/ - -#if DEBUG - - -/* - These routines make a number of assertions about the states - of data structures that should be true at all times. If any - are not true, it's very likely that a user program has somehow - trashed memory. (It's also possible that there is a coding error - in malloc. In which case, please report it!) -*/ - -#if __STD_C -static void do_check_chunk(mchunkptr p) -#else -static void do_check_chunk(p) mchunkptr p; -#endif -{ - INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE; - - /* No checkable chunk is mmapped */ - assert(!chunk_is_mmapped(p)); - - /* Check for legal address ... */ - assert((char*)p >= sbrk_base); - if (p != top) - assert((char*)p + sz <= (char*)top); - else - assert((char*)p + sz <= sbrk_base + sbrked_mem); - -} - - -#if __STD_C -static void do_check_free_chunk(mchunkptr p) -#else -static void do_check_free_chunk(p) mchunkptr p; -#endif -{ - INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE; - mchunkptr next = chunk_at_offset(p, sz); - - do_check_chunk(p); - - /* Check whether it claims to be free ... */ - assert(!inuse(p)); - - /* Unless a special marker, must have OK fields */ - if ((long)sz >= (long)MINSIZE) - { - assert((sz & MALLOC_ALIGN_MASK) == 0); - assert(aligned_OK(chunk2mem(p))); - /* ... matching footer field */ - assert(next->prev_size == sz); - /* ... and is fully consolidated */ - assert(prev_inuse(p)); - assert (next == top || inuse(next)); - - /* ... and has minimally sane links */ - assert(p->fd->bk == p); - assert(p->bk->fd == p); - } - else /* markers are always of size SIZE_SZ */ - assert(sz == SIZE_SZ); -} - -#if __STD_C -static void do_check_inuse_chunk(mchunkptr p) -#else -static void do_check_inuse_chunk(p) mchunkptr p; -#endif -{ - mchunkptr next = next_chunk(p); - do_check_chunk(p); - - /* Check whether it claims to be in use ... */ - assert(inuse(p)); - - /* ... and is surrounded by OK chunks. - Since more things can be checked with free chunks than inuse ones, - if an inuse chunk borders them and debug is on, it's worth doing them. - */ - if (!prev_inuse(p)) - { - mchunkptr prv = prev_chunk(p); - assert(next_chunk(prv) == p); - do_check_free_chunk(prv); - } - if (next == top) - { - assert(prev_inuse(next)); - assert(chunksize(next) >= MINSIZE); - } - else if (!inuse(next)) - do_check_free_chunk(next); - -} - -#if __STD_C -static void do_check_malloced_chunk(mchunkptr p, INTERNAL_SIZE_T s) -#else -static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s; -#endif -{ - INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE; - long room = long_sub_size_t(sz, s); - - do_check_inuse_chunk(p); - - /* Legal size ... */ - assert((long)sz >= (long)MINSIZE); - assert((sz & MALLOC_ALIGN_MASK) == 0); - assert(room >= 0); - assert(room < (long)MINSIZE); - - /* ... and alignment */ - assert(aligned_OK(chunk2mem(p))); - - - /* ... and was allocated at front of an available chunk */ - assert(prev_inuse(p)); - -} - - -#define check_free_chunk(P) do_check_free_chunk(P) -#define check_inuse_chunk(P) do_check_inuse_chunk(P) -#define check_chunk(P) do_check_chunk(P) -#define check_malloced_chunk(P,N) do_check_malloced_chunk(P,N) -#else -#define check_free_chunk(P) -#define check_inuse_chunk(P) -#define check_chunk(P) -#define check_malloced_chunk(P,N) -#endif - - - -/* - Macro-based internal utilities -*/ - - -/* - Linking chunks in bin lists. - Call these only with variables, not arbitrary expressions, as arguments. -*/ - -/* - Place chunk p of size s in its bin, in size order, - putting it ahead of others of same size. -*/ - - -#define frontlink(P, S, IDX, BK, FD) \ -{ \ - if (S < MAX_SMALLBIN_SIZE) \ - { \ - IDX = smallbin_index(S); \ - mark_binblock(IDX); \ - BK = bin_at(IDX); \ - FD = BK->fd; \ - P->bk = BK; \ - P->fd = FD; \ - FD->bk = BK->fd = P; \ - } \ - else \ - { \ - IDX = bin_index(S); \ - BK = bin_at(IDX); \ - FD = BK->fd; \ - if (FD == BK) mark_binblock(IDX); \ - else \ - { \ - while (FD != BK && S < chunksize(FD)) FD = FD->fd; \ - BK = FD->bk; \ - } \ - P->bk = BK; \ - P->fd = FD; \ - FD->bk = BK->fd = P; \ - } \ -} - - -/* take a chunk off a list */ - -#define unlink(P, BK, FD) \ -{ \ - BK = P->bk; \ - FD = P->fd; \ - FD->bk = BK; \ - BK->fd = FD; \ -} \ - -/* Place p as the last remainder */ - -#define link_last_remainder(P) \ -{ \ - last_remainder->fd = last_remainder->bk = P; \ - P->fd = P->bk = last_remainder; \ -} - -/* Clear the last_remainder bin */ - -#define clear_last_remainder \ - (last_remainder->fd = last_remainder->bk = last_remainder) - - - - - - -/* Routines dealing with mmap(). */ - -#if HAVE_MMAP - -#ifdef DEFINE_MALLOC - -#if __STD_C -static mchunkptr mmap_chunk(size_t size) -#else -static mchunkptr mmap_chunk(size) size_t size; -#endif -{ - size_t page_mask = malloc_getpagesize - 1; - mchunkptr p; - -#ifndef MAP_ANONYMOUS - static int fd = -1; -#endif - - if(n_mmaps >= n_mmaps_max) return 0; /* too many regions */ - - /* For mmapped chunks, the overhead is one SIZE_SZ unit larger, because - * there is no following chunk whose prev_size field could be used. - */ - size = (size + SIZE_SZ + page_mask) & ~page_mask; - -#ifdef MAP_ANONYMOUS - p = (mchunkptr)mmap(0, size, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); -#else /* !MAP_ANONYMOUS */ - if (fd < 0) - { - fd = open("/dev/zero", O_RDWR); - if(fd < 0) return 0; - } - p = (mchunkptr)mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); -#endif - - if(p == (mchunkptr)-1) return 0; - - n_mmaps++; - if (n_mmaps > max_n_mmaps) max_n_mmaps = n_mmaps; - - /* We demand that eight bytes into a page must be 8-byte aligned. */ - assert(aligned_OK(chunk2mem(p))); - - /* The offset to the start of the mmapped region is stored - * in the prev_size field of the chunk; normally it is zero, - * but that can be changed in memalign(). - */ - p->prev_size = 0; - set_head(p, size|IS_MMAPPED); - - mmapped_mem += size; - if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem) - max_mmapped_mem = mmapped_mem; - if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem) - max_total_mem = mmapped_mem + sbrked_mem; - return p; -} - -#endif /* DEFINE_MALLOC */ - -#ifdef SEPARATE_OBJECTS -#define munmap_chunk malloc_munmap_chunk -#endif - -#ifdef DEFINE_FREE - -#if __STD_C -STATIC void munmap_chunk(mchunkptr p) -#else -STATIC void munmap_chunk(p) mchunkptr p; -#endif -{ - INTERNAL_SIZE_T size = chunksize(p); - int ret; - - assert (chunk_is_mmapped(p)); - assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem)); - assert((n_mmaps > 0)); - assert(((p->prev_size + size) & (malloc_getpagesize-1)) == 0); - - n_mmaps--; - mmapped_mem -= (size + p->prev_size); - - ret = munmap((char *)p - p->prev_size, size + p->prev_size); - - /* munmap returns non-zero on failure */ - assert(ret == 0); -} - -#else /* ! DEFINE_FREE */ - -#if __STD_C -extern void munmap_chunk(mchunkptr); -#else -extern void munmap_chunk(); -#endif - -#endif /* ! DEFINE_FREE */ - -#if HAVE_MREMAP - -#ifdef DEFINE_REALLOC - -#if __STD_C -static mchunkptr mremap_chunk(mchunkptr p, size_t new_size) -#else -static mchunkptr mremap_chunk(p, new_size) mchunkptr p; size_t new_size; -#endif -{ - size_t page_mask = malloc_getpagesize - 1; - INTERNAL_SIZE_T offset = p->prev_size; - INTERNAL_SIZE_T size = chunksize(p); - char *cp; - - assert (chunk_is_mmapped(p)); - assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem)); - assert((n_mmaps > 0)); - assert(((size + offset) & (malloc_getpagesize-1)) == 0); - - /* Note the extra SIZE_SZ overhead as in mmap_chunk(). */ - new_size = (new_size + offset + SIZE_SZ + page_mask) & ~page_mask; - - cp = (char *)mremap((char *)p - offset, size + offset, new_size, 1); - - if (cp == (char *)-1) return 0; - - p = (mchunkptr)(cp + offset); - - assert(aligned_OK(chunk2mem(p))); - - assert((p->prev_size == offset)); - set_head(p, (new_size - offset)|IS_MMAPPED); - - mmapped_mem -= size + offset; - mmapped_mem += new_size; - if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem) - max_mmapped_mem = mmapped_mem; - if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem) - max_total_mem = mmapped_mem + sbrked_mem; - return p; -} - -#endif /* DEFINE_REALLOC */ - -#endif /* HAVE_MREMAP */ - -#endif /* HAVE_MMAP */ - - - - -#ifdef DEFINE_MALLOC - -/* - Extend the top-most chunk by obtaining memory from system. - Main interface to sbrk (but see also malloc_trim). -*/ - -#if __STD_C -static void malloc_extend_top(RARG INTERNAL_SIZE_T nb) -#else -static void malloc_extend_top(RARG nb) RDECL INTERNAL_SIZE_T nb; -#endif -{ - char* brk; /* return value from sbrk */ - INTERNAL_SIZE_T front_misalign; /* unusable bytes at front of sbrked space */ - INTERNAL_SIZE_T correction; /* bytes for 2nd sbrk call */ - int correction_failed = 0; /* whether we should relax the assertion */ - char* new_brk; /* return of 2nd sbrk call */ - INTERNAL_SIZE_T top_size; /* new size of top chunk */ - - mchunkptr old_top = top; /* Record state of old top */ - INTERNAL_SIZE_T old_top_size = chunksize(old_top); - char* old_end = (char*)(chunk_at_offset(old_top, old_top_size)); - - /* Pad request with top_pad plus minimal overhead */ - - INTERNAL_SIZE_T sbrk_size = nb + top_pad + MINSIZE; - unsigned long pagesz = malloc_getpagesize; - - /* If not the first time through, round to preserve page boundary */ - /* Otherwise, we need to correct to a page size below anyway. */ - /* (We also correct below if an intervening foreign sbrk call.) */ - - if (sbrk_base != (char*)(-1)) - sbrk_size = (sbrk_size + (pagesz - 1)) & ~(pagesz - 1); - - brk = (char*)(MORECORE (sbrk_size)); - - /* Fail if sbrk failed or if a foreign sbrk call killed our space */ - if (brk == (char*)(MORECORE_FAILURE) || - (brk < old_end && old_top != initial_top)) - return; - - sbrked_mem += sbrk_size; - - if (brk == old_end /* can just add bytes to current top, unless - previous correction failed */ - && ((POINTER_UINT)old_end & (pagesz - 1)) == 0) - { - top_size = sbrk_size + old_top_size; - set_head(top, top_size | PREV_INUSE); - } - else - { - if (sbrk_base == (char*)(-1)) /* First time through. Record base */ - sbrk_base = brk; - else /* Someone else called sbrk(). Count those bytes as sbrked_mem. */ - sbrked_mem += brk - (char*)old_end; - - /* Guarantee alignment of first new chunk made from this space */ - front_misalign = (POINTER_UINT)chunk2mem(brk) & MALLOC_ALIGN_MASK; - if (front_misalign > 0) - { - correction = (MALLOC_ALIGNMENT) - front_misalign; - brk += correction; - } - else - correction = 0; - - /* Guarantee the next brk will be at a page boundary */ - correction += pagesz - ((POINTER_UINT)(brk + sbrk_size) & (pagesz - 1)); - - /* Allocate correction */ - new_brk = (char*)(MORECORE (correction)); - if (new_brk == (char*)(MORECORE_FAILURE)) - { - correction = 0; - correction_failed = 1; - new_brk = brk; - } - - sbrked_mem += correction; - - top = (mchunkptr)brk; - top_size = new_brk - brk + correction; - set_head(top, top_size | PREV_INUSE); - - if (old_top != initial_top) - { - - /* There must have been an intervening foreign sbrk call. */ - /* A double fencepost is necessary to prevent consolidation */ - - /* If not enough space to do this, then user did something very wrong */ - if (old_top_size < MINSIZE) - { - set_head(top, PREV_INUSE); /* will force null return from malloc */ - return; - } - - /* Also keep size a multiple of MALLOC_ALIGNMENT */ - old_top_size = (old_top_size - 3*SIZE_SZ) & ~MALLOC_ALIGN_MASK; - chunk_at_offset(old_top, old_top_size )->size = - SIZE_SZ|PREV_INUSE; - chunk_at_offset(old_top, old_top_size + SIZE_SZ)->size = - SIZE_SZ|PREV_INUSE; - set_head_size(old_top, old_top_size); - /* If possible, release the rest. */ - if (old_top_size >= MINSIZE) - fREe(RCALL chunk2mem(old_top)); - } - } - - if ((unsigned long)sbrked_mem > (unsigned long)max_sbrked_mem) - max_sbrked_mem = sbrked_mem; -#if HAVE_MMAP - if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem) - max_total_mem = mmapped_mem + sbrked_mem; -#else - if ((unsigned long)(sbrked_mem) > (unsigned long)max_total_mem) - max_total_mem = sbrked_mem; -#endif - - /* We always land on a page boundary */ - assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0 - || correction_failed); -} - -#endif /* DEFINE_MALLOC */ - - -/* Main public routines */ - -#ifdef DEFINE_MALLOC - -/* - Malloc Algorthim: - - The requested size is first converted into a usable form, `nb'. - This currently means to add 4 bytes overhead plus possibly more to - obtain 8-byte alignment and/or to obtain a size of at least - MINSIZE (currently 16 bytes), the smallest allocatable size. - (All fits are considered `exact' if they are within MINSIZE bytes.) - - From there, the first successful of the following steps is taken: - - 1. The bin corresponding to the request size is scanned, and if - a chunk of exactly the right size is found, it is taken. - - 2. The most recently remaindered chunk is used if it is big - enough. This is a form of (roving) first fit, used only in - the absence of exact fits. Runs of consecutive requests use - the remainder of the chunk used for the previous such request - whenever possible. This limited use of a first-fit style - allocation strategy tends to give contiguous chunks - coextensive lifetimes, which improves locality and can reduce - fragmentation in the long run. - - 3. Other bins are scanned in increasing size order, using a - chunk big enough to fulfill the request, and splitting off - any remainder. This search is strictly by best-fit; i.e., - the smallest (with ties going to approximately the least - recently used) chunk that fits is selected. - - 4. If large enough, the chunk bordering the end of memory - (`top') is split off. (This use of `top' is in accord with - the best-fit search rule. In effect, `top' is treated as - larger (and thus less well fitting) than any other available - chunk since it can be extended to be as large as necessary - (up to system limitations). - - 5. If the request size meets the mmap threshold and the - system supports mmap, and there are few enough currently - allocated mmapped regions, and a call to mmap succeeds, - the request is allocated via direct memory mapping. - - 6. Otherwise, the top of memory is extended by - obtaining more space from the system (normally using sbrk, - but definable to anything else via the MORECORE macro). - Memory is gathered from the system (in system page-sized - units) in a way that allows chunks obtained across different - sbrk calls to be consolidated, but does not require - contiguous memory. Thus, it should be safe to intersperse - mallocs with other sbrk calls. - - - All allocations are made from the the `lowest' part of any found - chunk. (The implementation invariant is that prev_inuse is - always true of any allocated chunk; i.e., that each allocated - chunk borders either a previously allocated and still in-use chunk, - or the base of its memory arena.) - -*/ - -#if __STD_C -Void_t* mALLOc(RARG size_t bytes) -#else -Void_t* mALLOc(RARG bytes) RDECL size_t bytes; -#endif -{ -#ifdef MALLOC_PROVIDED - - malloc (bytes); - -#else - - mchunkptr victim; /* inspected/selected chunk */ - INTERNAL_SIZE_T victim_size; /* its size */ - int idx; /* index for bin traversal */ - mbinptr bin; /* associated bin */ - mchunkptr remainder; /* remainder from a split */ - long remainder_size; /* its size */ - int remainder_index; /* its bin index */ - unsigned long block; /* block traverser bit */ - int startidx; /* first bin of a traversed block */ - mchunkptr fwd; /* misc temp for linking */ - mchunkptr bck; /* misc temp for linking */ - mbinptr q; /* misc temp */ - - INTERNAL_SIZE_T nb = request2size(bytes); /* padded request size; */ - - /* Check for overflow and just fail, if so. */ - if (nb > INT_MAX || nb < bytes) - { - RERRNO = ENOMEM; - return 0; - } - - MALLOC_LOCK; - - /* Check for exact match in a bin */ - - if (is_small_request(nb)) /* Faster version for small requests */ - { - idx = smallbin_index(nb); - - /* No traversal or size check necessary for small bins. */ - - q = bin_at(idx); - victim = last(q); - -#if MALLOC_ALIGN != 16 - /* Also scan the next one, since it would have a remainder < MINSIZE */ - if (victim == q) - { - q = next_bin(q); - victim = last(q); - } -#endif - if (victim != q) - { - victim_size = chunksize(victim); - unlink(victim, bck, fwd); - set_inuse_bit_at_offset(victim, victim_size); - check_malloced_chunk(victim, nb); - MALLOC_UNLOCK; - return chunk2mem(victim); - } - - idx += 2; /* Set for bin scan below. We've already scanned 2 bins. */ - - } - else - { - idx = bin_index(nb); - bin = bin_at(idx); - - for (victim = last(bin); victim != bin; victim = victim->bk) - { - victim_size = chunksize(victim); - remainder_size = long_sub_size_t(victim_size, nb); - - if (remainder_size >= (long)MINSIZE) /* too big */ - { - --idx; /* adjust to rescan below after checking last remainder */ - break; - } - - else if (remainder_size >= 0) /* exact fit */ - { - unlink(victim, bck, fwd); - set_inuse_bit_at_offset(victim, victim_size); - check_malloced_chunk(victim, nb); - MALLOC_UNLOCK; - return chunk2mem(victim); - } - } - - ++idx; - - } - - /* Try to use the last split-off remainder */ - - if ( (victim = last_remainder->fd) != last_remainder) - { - victim_size = chunksize(victim); - remainder_size = long_sub_size_t(victim_size, nb); - - if (remainder_size >= (long)MINSIZE) /* re-split */ - { - remainder = chunk_at_offset(victim, nb); - set_head(victim, nb | PREV_INUSE); - link_last_remainder(remainder); - set_head(remainder, remainder_size | PREV_INUSE); - set_foot(remainder, remainder_size); - check_malloced_chunk(victim, nb); - MALLOC_UNLOCK; - return chunk2mem(victim); - } - - clear_last_remainder; - - if (remainder_size >= 0) /* exhaust */ - { - set_inuse_bit_at_offset(victim, victim_size); - check_malloced_chunk(victim, nb); - MALLOC_UNLOCK; - return chunk2mem(victim); - } - - /* Else place in bin */ - - frontlink(victim, victim_size, remainder_index, bck, fwd); - } - - /* - If there are any possibly nonempty big-enough blocks, - search for best fitting chunk by scanning bins in blockwidth units. - */ - - if ( (block = idx2binblock(idx)) <= binblocks) - { - - /* Get to the first marked block */ - - if ( (block & binblocks) == 0) - { - /* force to an even block boundary */ - idx = (idx & ~(BINBLOCKWIDTH - 1)) + BINBLOCKWIDTH; - block <<= 1; - while ((block & binblocks) == 0) - { - idx += BINBLOCKWIDTH; - block <<= 1; - } - } - - /* For each possibly nonempty block ... */ - for (;;) - { - startidx = idx; /* (track incomplete blocks) */ - q = bin = bin_at(idx); - - /* For each bin in this block ... */ - do - { - /* Find and use first big enough chunk ... */ - - for (victim = last(bin); victim != bin; victim = victim->bk) - { - victim_size = chunksize(victim); - remainder_size = long_sub_size_t(victim_size, nb); - - if (remainder_size >= (long)MINSIZE) /* split */ - { - remainder = chunk_at_offset(victim, nb); - set_head(victim, nb | PREV_INUSE); - unlink(victim, bck, fwd); - link_last_remainder(remainder); - set_head(remainder, remainder_size | PREV_INUSE); - set_foot(remainder, remainder_size); - check_malloced_chunk(victim, nb); - MALLOC_UNLOCK; - return chunk2mem(victim); - } - - else if (remainder_size >= 0) /* take */ - { - set_inuse_bit_at_offset(victim, victim_size); - unlink(victim, bck, fwd); - check_malloced_chunk(victim, nb); - MALLOC_UNLOCK; - return chunk2mem(victim); - } - - } - - bin = next_bin(bin); - -#if MALLOC_ALIGN == 16 - if (idx < MAX_SMALLBIN) - { - bin = next_bin(bin); - ++idx; - } -#endif - } while ((++idx & (BINBLOCKWIDTH - 1)) != 0); - - /* Clear out the block bit. */ - - do /* Possibly backtrack to try to clear a partial block */ - { - if ((startidx & (BINBLOCKWIDTH - 1)) == 0) - { - binblocks &= ~block; - break; - } - --startidx; - q = prev_bin(q); - } while (first(q) == q); - - /* Get to the next possibly nonempty block */ - - if ( (block <<= 1) <= binblocks && (block != 0) ) - { - while ((block & binblocks) == 0) - { - idx += BINBLOCKWIDTH; - block <<= 1; - } - } - else - break; - } - } - - - /* Try to use top chunk */ - - /* Require that there be a remainder, ensuring top always exists */ - remainder_size = long_sub_size_t(chunksize(top), nb); - if (chunksize(top) < nb || remainder_size < (long)MINSIZE) - { - -#if HAVE_MMAP - /* If big and would otherwise need to extend, try to use mmap instead */ - if ((unsigned long)nb >= (unsigned long)mmap_threshold && - (victim = mmap_chunk(nb)) != 0) - { - MALLOC_UNLOCK; - return chunk2mem(victim); - } -#endif - - /* Try to extend */ - malloc_extend_top(RCALL nb); - remainder_size = long_sub_size_t(chunksize(top), nb); - if (chunksize(top) < nb || remainder_size < (long)MINSIZE) - { - MALLOC_UNLOCK; - return 0; /* propagate failure */ - } - } - - victim = top; - set_head(victim, nb | PREV_INUSE); - top = chunk_at_offset(victim, nb); - set_head(top, remainder_size | PREV_INUSE); - check_malloced_chunk(victim, nb); - MALLOC_UNLOCK; - return chunk2mem(victim); - -#endif /* MALLOC_PROVIDED */ -} - -#endif /* DEFINE_MALLOC */ - -#ifdef DEFINE_FREE - -/* - - free() algorithm : - - cases: - - 1. free(0) has no effect. - - 2. If the chunk was allocated via mmap, it is release via munmap(). - - 3. If a returned chunk borders the current high end of memory, - it is consolidated into the top, and if the total unused - topmost memory exceeds the trim threshold, malloc_trim is - called. - - 4. Other chunks are consolidated as they arrive, and - placed in corresponding bins. (This includes the case of - consolidating with the current `last_remainder'). - -*/ - - -#if __STD_C -void fREe(RARG Void_t* mem) -#else -void fREe(RARG mem) RDECL Void_t* mem; -#endif -{ -#ifdef MALLOC_PROVIDED - - free (mem); - -#else - - mchunkptr p; /* chunk corresponding to mem */ - INTERNAL_SIZE_T hd; /* its head field */ - INTERNAL_SIZE_T sz; /* its size */ - int idx; /* its bin index */ - mchunkptr next; /* next contiguous chunk */ - INTERNAL_SIZE_T nextsz; /* its size */ - INTERNAL_SIZE_T prevsz; /* size of previous contiguous chunk */ - mchunkptr bck; /* misc temp for linking */ - mchunkptr fwd; /* misc temp for linking */ - int islr; /* track whether merging with last_remainder */ - - if (mem == 0) /* free(0) has no effect */ - return; - - MALLOC_LOCK; - - p = mem2chunk(mem); - hd = p->size; - -#if HAVE_MMAP - if (hd & IS_MMAPPED) /* release mmapped memory. */ - { - munmap_chunk(p); - MALLOC_UNLOCK; - return; - } -#endif - - check_inuse_chunk(p); - - sz = hd & ~PREV_INUSE; - next = chunk_at_offset(p, sz); - nextsz = chunksize(next); - - if (next == top) /* merge with top */ - { - sz += nextsz; - - if (!(hd & PREV_INUSE)) /* consolidate backward */ - { - prevsz = p->prev_size; - p = chunk_at_offset(p, -prevsz); - sz += prevsz; - unlink(p, bck, fwd); - } - - set_head(p, sz | PREV_INUSE); - top = p; - if ((unsigned long)(sz) >= (unsigned long)trim_threshold) - malloc_trim(RCALL top_pad); - MALLOC_UNLOCK; - return; - } - - set_head(next, nextsz); /* clear inuse bit */ - - islr = 0; - - if (!(hd & PREV_INUSE)) /* consolidate backward */ - { - prevsz = p->prev_size; - p = chunk_at_offset(p, -prevsz); - sz += prevsz; - - if (p->fd == last_remainder) /* keep as last_remainder */ - islr = 1; - else - unlink(p, bck, fwd); - } - - if (!(inuse_bit_at_offset(next, nextsz))) /* consolidate forward */ - { - sz += nextsz; - - if (!islr && next->fd == last_remainder) /* re-insert last_remainder */ - { - islr = 1; - link_last_remainder(p); - } - else - unlink(next, bck, fwd); - } - - - set_head(p, sz | PREV_INUSE); - set_foot(p, sz); - if (!islr) - frontlink(p, sz, idx, bck, fwd); - - MALLOC_UNLOCK; - -#endif /* MALLOC_PROVIDED */ -} - -#endif /* DEFINE_FREE */ - -#ifdef DEFINE_REALLOC - -/* - - Realloc algorithm: - - Chunks that were obtained via mmap cannot be extended or shrunk - unless HAVE_MREMAP is defined, in which case mremap is used. - Otherwise, if their reallocation is for additional space, they are - copied. If for less, they are just left alone. - - Otherwise, if the reallocation is for additional space, and the - chunk can be extended, it is, else a malloc-copy-free sequence is - taken. There are several different ways that a chunk could be - extended. All are tried: - - * Extending forward into following adjacent free chunk. - * Shifting backwards, joining preceding adjacent space - * Both shifting backwards and extending forward. - * Extending into newly sbrked space - - Unless the #define REALLOC_ZERO_BYTES_FREES is set, realloc with a - size argument of zero (re)allocates a minimum-sized chunk. - - If the reallocation is for less space, and the new request is for - a `small' (<512 bytes) size, then the newly unused space is lopped - off and freed. - - The old unix realloc convention of allowing the last-free'd chunk - to be used as an argument to realloc is no longer supported. - I don't know of any programs still relying on this feature, - and allowing it would also allow too many other incorrect - usages of realloc to be sensible. - - -*/ - - -#if __STD_C -Void_t* rEALLOc(RARG Void_t* oldmem, size_t bytes) -#else -Void_t* rEALLOc(RARG oldmem, bytes) RDECL Void_t* oldmem; size_t bytes; -#endif -{ -#ifdef MALLOC_PROVIDED - - realloc (oldmem, bytes); - -#else - - INTERNAL_SIZE_T nb; /* padded request size */ - - mchunkptr oldp; /* chunk corresponding to oldmem */ - INTERNAL_SIZE_T oldsize; /* its size */ - - mchunkptr newp; /* chunk to return */ - INTERNAL_SIZE_T newsize; /* its size */ - Void_t* newmem; /* corresponding user mem */ - - mchunkptr next; /* next contiguous chunk after oldp */ - INTERNAL_SIZE_T nextsize; /* its size */ - - mchunkptr prev; /* previous contiguous chunk before oldp */ - INTERNAL_SIZE_T prevsize; /* its size */ - - mchunkptr remainder; /* holds split off extra space from newp */ - INTERNAL_SIZE_T remainder_size; /* its size */ - - mchunkptr bck; /* misc temp for linking */ - mchunkptr fwd; /* misc temp for linking */ - -#ifdef REALLOC_ZERO_BYTES_FREES - if (bytes == 0) { fREe(RCALL oldmem); return 0; } -#endif - - - /* realloc of null is supposed to be same as malloc */ - if (oldmem == 0) return mALLOc(RCALL bytes); - - MALLOC_LOCK; - - newp = oldp = mem2chunk(oldmem); - newsize = oldsize = chunksize(oldp); - - - nb = request2size(bytes); - - /* Check for overflow and just fail, if so. */ - if (nb > INT_MAX || nb < bytes) - { - RERRNO = ENOMEM; - return 0; - } - -#if HAVE_MMAP - if (chunk_is_mmapped(oldp)) - { -#if HAVE_MREMAP - newp = mremap_chunk(oldp, nb); - if(newp) - { - MALLOC_UNLOCK; - return chunk2mem(newp); - } -#endif - /* Note the extra SIZE_SZ overhead. */ - if(oldsize - SIZE_SZ >= nb) - { - MALLOC_UNLOCK; - return oldmem; /* do nothing */ - } - /* Must alloc, copy, free. */ - newmem = mALLOc(RCALL bytes); - if (newmem == 0) - { - MALLOC_UNLOCK; - return 0; /* propagate failure */ - } - MALLOC_COPY(newmem, oldmem, oldsize - 2*SIZE_SZ); - munmap_chunk(oldp); - MALLOC_UNLOCK; - return newmem; - } -#endif - - check_inuse_chunk(oldp); - - if ((long)(oldsize) < (long)(nb)) - { - - /* Try expanding forward */ - - next = chunk_at_offset(oldp, oldsize); - if (next == top || !inuse(next)) - { - nextsize = chunksize(next); - - /* Forward into top only if a remainder */ - if (next == top) - { - if ((long)(nextsize + newsize) >= (long)(nb + MINSIZE)) - { - newsize += nextsize; - top = chunk_at_offset(oldp, nb); - set_head(top, (newsize - nb) | PREV_INUSE); - set_head_size(oldp, nb); - MALLOC_UNLOCK; - return chunk2mem(oldp); - } - } - - /* Forward into next chunk */ - else if (((long)(nextsize + newsize) >= (long)(nb))) - { - unlink(next, bck, fwd); - newsize += nextsize; - goto split; - } - } - else - { - next = 0; - nextsize = 0; - } - - /* Try shifting backwards. */ - - if (!prev_inuse(oldp)) - { - prev = prev_chunk(oldp); - prevsize = chunksize(prev); - - /* try forward + backward first to save a later consolidation */ - - if (next != 0) - { - /* into top */ - if (next == top) - { - if ((long)(nextsize + prevsize + newsize) >= (long)(nb + MINSIZE)) - { - unlink(prev, bck, fwd); - newp = prev; - newsize += prevsize + nextsize; - newmem = chunk2mem(newp); - MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ); - top = chunk_at_offset(newp, nb); - set_head(top, (newsize - nb) | PREV_INUSE); - set_head_size(newp, nb); - MALLOC_UNLOCK; - return newmem; - } - } - - /* into next chunk */ - else if (((long)(nextsize + prevsize + newsize) >= (long)(nb))) - { - unlink(next, bck, fwd); - unlink(prev, bck, fwd); - newp = prev; - newsize += nextsize + prevsize; - newmem = chunk2mem(newp); - MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ); - goto split; - } - } - - /* backward only */ - if (prev != 0 && (long)(prevsize + newsize) >= (long)nb) - { - unlink(prev, bck, fwd); - newp = prev; - newsize += prevsize; - newmem = chunk2mem(newp); - MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ); - goto split; - } - } - - /* Must allocate */ - - newmem = mALLOc (RCALL bytes); - - if (newmem == 0) /* propagate failure */ - { - MALLOC_UNLOCK; - return 0; - } - - /* Avoid copy if newp is next chunk after oldp. */ - /* (This can only happen when new chunk is sbrk'ed.) */ - - if ( (newp = mem2chunk(newmem)) == next_chunk(oldp)) - { - newsize += chunksize(newp); - newp = oldp; - goto split; - } - - /* Otherwise copy, free, and exit */ - MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ); - fREe(RCALL oldmem); - MALLOC_UNLOCK; - return newmem; - } - - - split: /* split off extra room in old or expanded chunk */ - - remainder_size = long_sub_size_t(newsize, nb); - - if (remainder_size >= (long)MINSIZE) /* split off remainder */ - { - remainder = chunk_at_offset(newp, nb); - set_head_size(newp, nb); - set_head(remainder, remainder_size | PREV_INUSE); - set_inuse_bit_at_offset(remainder, remainder_size); - fREe(RCALL chunk2mem(remainder)); /* let free() deal with it */ - } - else - { - set_head_size(newp, newsize); - set_inuse_bit_at_offset(newp, newsize); - } - - check_inuse_chunk(newp); - MALLOC_UNLOCK; - return chunk2mem(newp); - -#endif /* MALLOC_PROVIDED */ -} - -#endif /* DEFINE_REALLOC */ - -#ifdef DEFINE_MEMALIGN - -/* - - memalign algorithm: - - memalign requests more than enough space from malloc, finds a spot - within that chunk that meets the alignment request, and then - possibly frees the leading and trailing space. - - The alignment argument must be a power of two. This property is not - checked by memalign, so misuse may result in random runtime errors. - - 8-byte alignment is guaranteed by normal malloc calls, so don't - bother calling memalign with an argument of 8 or less. - - Overreliance on memalign is a sure way to fragment space. - -*/ - - -#if __STD_C -Void_t* mEMALIGn(RARG size_t alignment, size_t bytes) -#else -Void_t* mEMALIGn(RARG alignment, bytes) RDECL size_t alignment; size_t bytes; -#endif -{ - INTERNAL_SIZE_T nb; /* padded request size */ - char* m; /* memory returned by malloc call */ - mchunkptr p; /* corresponding chunk */ - char* brk; /* alignment point within p */ - mchunkptr newp; /* chunk to return */ - INTERNAL_SIZE_T newsize; /* its size */ - INTERNAL_SIZE_T leadsize; /* leading space befor alignment point */ - mchunkptr remainder; /* spare room at end to split off */ - long remainder_size; /* its size */ - - /* If need less alignment than we give anyway, just relay to malloc */ - - if (alignment <= MALLOC_ALIGNMENT) return mALLOc(RCALL bytes); - - /* Otherwise, ensure that it is at least a minimum chunk size */ - - if (alignment < MINSIZE) alignment = MINSIZE; - - /* Call malloc with worst case padding to hit alignment. */ - - nb = request2size(bytes); - - /* Check for overflow. */ - if (nb > INT_MAX || nb < bytes) - { - RERRNO = ENOMEM; - return 0; - } - - m = (char*)(mALLOc(RCALL nb + alignment + MINSIZE)); - - if (m == 0) return 0; /* propagate failure */ - - MALLOC_LOCK; - - p = mem2chunk(m); - - if ((((unsigned long)(m)) % alignment) == 0) /* aligned */ - { -#if HAVE_MMAP - if(chunk_is_mmapped(p)) - { - MALLOC_UNLOCK; - return chunk2mem(p); /* nothing more to do */ - } -#endif - } - else /* misaligned */ - { - /* - Find an aligned spot inside chunk. - Since we need to give back leading space in a chunk of at - least MINSIZE, if the first calculation places us at - a spot with less than MINSIZE leader, we can move to the - next aligned spot -- we've allocated enough total room so that - this is always possible. - */ - - brk = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) & -alignment); - if ((long)(brk - (char*)(p)) < (long)MINSIZE) brk = brk + alignment; - - newp = (mchunkptr)brk; - leadsize = brk - (char*)(p); - newsize = chunksize(p) - leadsize; - -#if HAVE_MMAP - if(chunk_is_mmapped(p)) - { - newp->prev_size = p->prev_size + leadsize; - set_head(newp, newsize|IS_MMAPPED); - MALLOC_UNLOCK; - return chunk2mem(newp); - } -#endif - - /* give back leader, use the rest */ - - set_head(newp, newsize | PREV_INUSE); - set_inuse_bit_at_offset(newp, newsize); - set_head_size(p, leadsize); - fREe(RCALL chunk2mem(p)); - p = newp; - - assert (newsize >= nb && (((unsigned long)(chunk2mem(p))) % alignment) == 0); - } - - /* Also give back spare room at the end */ - - remainder_size = long_sub_size_t(chunksize(p), nb); - - if (remainder_size >= (long)MINSIZE) - { - remainder = chunk_at_offset(p, nb); - set_head(remainder, remainder_size | PREV_INUSE); - set_head_size(p, nb); - fREe(RCALL chunk2mem(remainder)); - } - - check_inuse_chunk(p); - MALLOC_UNLOCK; - return chunk2mem(p); - -} - -#endif /* DEFINE_MEMALIGN */ - -#ifdef DEFINE_VALLOC - -/* - valloc just invokes memalign with alignment argument equal - to the page size of the system (or as near to this as can - be figured out from all the includes/defines above.) -*/ - -#if __STD_C -Void_t* vALLOc(RARG size_t bytes) -#else -Void_t* vALLOc(RARG bytes) RDECL size_t bytes; -#endif -{ - return mEMALIGn (RCALL malloc_getpagesize, bytes); -} - -#endif /* DEFINE_VALLOC */ - -#ifdef DEFINE_PVALLOC - -/* - pvalloc just invokes valloc for the nearest pagesize - that will accommodate request -*/ - - -#if __STD_C -Void_t* pvALLOc(RARG size_t bytes) -#else -Void_t* pvALLOc(RARG bytes) RDECL size_t bytes; -#endif -{ - size_t pagesize = malloc_getpagesize; - return mEMALIGn (RCALL pagesize, (bytes + pagesize - 1) & ~(pagesize - 1)); -} - -#endif /* DEFINE_PVALLOC */ - -#ifdef DEFINE_CALLOC - -/* - - calloc calls malloc, then zeroes out the allocated chunk. - -*/ - -#if __STD_C -Void_t* cALLOc(RARG size_t n, size_t elem_size) -#else -Void_t* cALLOc(RARG n, elem_size) RDECL size_t n; size_t elem_size; -#endif -{ - mchunkptr p; - INTERNAL_SIZE_T csz; - - INTERNAL_SIZE_T sz = n * elem_size; - -#if MORECORE_CLEARS - mchunkptr oldtop; - INTERNAL_SIZE_T oldtopsize; -#endif - Void_t* mem; - - /* check if expand_top called, in which case don't need to clear */ -#if MORECORE_CLEARS - MALLOC_LOCK; - oldtop = top; - oldtopsize = chunksize(top); -#endif - - mem = mALLOc (RCALL sz); - - if (mem == 0) - { -#if MORECORE_CLEARS - MALLOC_UNLOCK; -#endif - return 0; - } - else - { - p = mem2chunk(mem); - - /* Two optional cases in which clearing not necessary */ - - -#if HAVE_MMAP - if (chunk_is_mmapped(p)) - { -#if MORECORE_CLEARS - MALLOC_UNLOCK; -#endif - return mem; - } -#endif - - csz = chunksize(p); - -#if MORECORE_CLEARS - if (p == oldtop && csz > oldtopsize) - { - /* clear only the bytes from non-freshly-sbrked memory */ - csz = oldtopsize; - } - MALLOC_UNLOCK; -#endif - - MALLOC_ZERO(mem, csz - SIZE_SZ); - return mem; - } -} - -#endif /* DEFINE_CALLOC */ - -#if defined(DEFINE_CFREE) && !defined(__CYGWIN__) - -/* - - cfree just calls free. It is needed/defined on some systems - that pair it with calloc, presumably for odd historical reasons. - -*/ - -#if !defined(INTERNAL_LINUX_C_LIB) || !defined(__ELF__) -#if !defined(INTERNAL_NEWLIB) || !defined(_REENT_ONLY) -#if __STD_C -void cfree(Void_t *mem) -#else -void cfree(mem) Void_t *mem; -#endif -{ -#ifdef INTERNAL_NEWLIB - fREe(_REENT, mem); -#else - fREe(mem); -#endif -} -#endif -#endif - -#endif /* DEFINE_CFREE */ - -#ifdef DEFINE_FREE - -/* - - Malloc_trim gives memory back to the system (via negative - arguments to sbrk) if there is unused memory at the `high' end of - the malloc pool. You can call this after freeing large blocks of - memory to potentially reduce the system-level memory requirements - of a program. However, it cannot guarantee to reduce memory. Under - some allocation patterns, some large free blocks of memory will be - locked between two used chunks, so they cannot be given back to - the system. - - The `pad' argument to malloc_trim represents the amount of free - trailing space to leave untrimmed. If this argument is zero, - only the minimum amount of memory to maintain internal data - structures will be left (one page or less). Non-zero arguments - can be supplied to maintain enough trailing space to service - future expected allocations without having to re-obtain memory - from the system. - - Malloc_trim returns 1 if it actually released any memory, else 0. - -*/ - -#if __STD_C -int malloc_trim(RARG size_t pad) -#else -int malloc_trim(RARG pad) RDECL size_t pad; -#endif -{ - long top_size; /* Amount of top-most memory */ - long extra; /* Amount to release */ - char* current_brk; /* address returned by pre-check sbrk call */ - char* new_brk; /* address returned by negative sbrk call */ - - unsigned long pagesz = malloc_getpagesize; - - MALLOC_LOCK; - - top_size = chunksize(top); - extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz; - - if (extra < (long)pagesz) /* Not enough memory to release */ - { - MALLOC_UNLOCK; - return 0; - } - - else - { - /* Test to make sure no one else called sbrk */ - current_brk = (char*)(MORECORE (0)); - if (current_brk != (char*)(top) + top_size) - { - MALLOC_UNLOCK; - return 0; /* Apparently we don't own memory; must fail */ - } - - else - { - new_brk = (char*)(MORECORE (-extra)); - - if (new_brk == (char*)(MORECORE_FAILURE)) /* sbrk failed? */ - { - /* Try to figure out what we have */ - current_brk = (char*)(MORECORE (0)); - top_size = current_brk - (char*)top; - if (top_size >= (long)MINSIZE) /* if not, we are very very dead! */ - { - sbrked_mem = current_brk - sbrk_base; - set_head(top, top_size | PREV_INUSE); - } - check_chunk(top); - MALLOC_UNLOCK; - return 0; - } - - else - { - /* Success. Adjust top accordingly. */ - set_head(top, (top_size - extra) | PREV_INUSE); - sbrked_mem -= extra; - check_chunk(top); - MALLOC_UNLOCK; - return 1; - } - } - } -} - -#endif /* DEFINE_FREE */ - -#ifdef DEFINE_MALLOC_USABLE_SIZE - -/* - malloc_usable_size: - - This routine tells you how many bytes you can actually use in an - allocated chunk, which may be more than you requested (although - often not). You can use this many bytes without worrying about - overwriting other allocated objects. Not a particularly great - programming practice, but still sometimes useful. - -*/ - -#if __STD_C -size_t malloc_usable_size(RARG Void_t* mem) -#else -size_t malloc_usable_size(RARG mem) RDECL Void_t* mem; -#endif -{ - mchunkptr p; - if (mem == 0) - return 0; - else - { - p = mem2chunk(mem); - if(!chunk_is_mmapped(p)) - { - if (!inuse(p)) return 0; -#if DEBUG - MALLOC_LOCK; - check_inuse_chunk(p); - MALLOC_UNLOCK; -#endif - return chunksize(p) - SIZE_SZ; - } - return chunksize(p) - 2*SIZE_SZ; - } -} - -#endif /* DEFINE_MALLOC_USABLE_SIZE */ - -#ifdef DEFINE_MALLINFO - -/* Utility to update current_mallinfo for malloc_stats and mallinfo() */ - -STATIC void malloc_update_mallinfo() -{ - int i; - mbinptr b; - mchunkptr p; -#if DEBUG - mchunkptr q; -#endif - - INTERNAL_SIZE_T avail = chunksize(top); - int navail = ((long)(avail) >= (long)MINSIZE)? 1 : 0; - - for (i = 1; i < NAV; ++i) - { - b = bin_at(i); - for (p = last(b); p != b; p = p->bk) - { -#if DEBUG - check_free_chunk(p); - for (q = next_chunk(p); - q < top && inuse(q) && (long)(chunksize(q)) >= (long)MINSIZE; - q = next_chunk(q)) - check_inuse_chunk(q); -#endif - avail += chunksize(p); - navail++; - } - } - - current_mallinfo.ordblks = navail; - current_mallinfo.uordblks = sbrked_mem - avail; - current_mallinfo.fordblks = avail; -#if HAVE_MMAP - current_mallinfo.hblks = n_mmaps; - current_mallinfo.hblkhd = mmapped_mem; -#endif - current_mallinfo.keepcost = chunksize(top); - -} - -#else /* ! DEFINE_MALLINFO */ - -#if __STD_C -extern void malloc_update_mallinfo(void); -#else -extern void malloc_update_mallinfo(); -#endif - -#endif /* ! DEFINE_MALLINFO */ - -#ifdef DEFINE_MALLOC_STATS - -/* - - malloc_stats: - - Prints on stderr the amount of space obtain from the system (both - via sbrk and mmap), the maximum amount (which may be more than - current if malloc_trim and/or munmap got called), the maximum - number of simultaneous mmap regions used, and the current number - of bytes allocated via malloc (or realloc, etc) but not yet - freed. (Note that this is the number of bytes allocated, not the - number requested. It will be larger than the number requested - because of alignment and bookkeeping overhead.) - -*/ - -#if __STD_C -void malloc_stats(RONEARG) -#else -void malloc_stats(RONEARG) RDECL -#endif -{ - unsigned long local_max_total_mem; - int local_sbrked_mem; - struct mallinfo local_mallinfo; -#if HAVE_MMAP - unsigned long local_mmapped_mem, local_max_n_mmaps; -#endif - FILE *fp; - - MALLOC_LOCK; - malloc_update_mallinfo(); - local_max_total_mem = max_total_mem; - local_sbrked_mem = sbrked_mem; - local_mallinfo = current_mallinfo; -#if HAVE_MMAP - local_mmapped_mem = mmapped_mem; - local_max_n_mmaps = max_n_mmaps; -#endif - MALLOC_UNLOCK; - -#ifdef INTERNAL_NEWLIB - _REENT_SMALL_CHECK_INIT(reent_ptr); - fp = _stderr_r(reent_ptr); -#define fprintf fiprintf -#else - fp = stderr; -#endif - - fprintf(fp, "max system bytes = %10u\n", - (unsigned int)(local_max_total_mem)); -#if HAVE_MMAP - fprintf(fp, "system bytes = %10u\n", - (unsigned int)(local_sbrked_mem + local_mmapped_mem)); - fprintf(fp, "in use bytes = %10u\n", - (unsigned int)(local_mallinfo.uordblks + local_mmapped_mem)); -#else - fprintf(fp, "system bytes = %10u\n", - (unsigned int)local_sbrked_mem); - fprintf(fp, "in use bytes = %10u\n", - (unsigned int)local_mallinfo.uordblks); -#endif -#if HAVE_MMAP - fprintf(fp, "max mmap regions = %10u\n", - (unsigned int)local_max_n_mmaps); -#endif -} - -#endif /* DEFINE_MALLOC_STATS */ - -#ifdef DEFINE_MALLINFO - -/* - mallinfo returns a copy of updated current mallinfo. -*/ - -#if __STD_C -struct mallinfo mALLINFo(RONEARG) -#else -struct mallinfo mALLINFo(RONEARG) RDECL -#endif -{ - struct mallinfo ret; - - MALLOC_LOCK; - malloc_update_mallinfo(); - ret = current_mallinfo; - MALLOC_UNLOCK; - return ret; -} - -#endif /* DEFINE_MALLINFO */ - -#ifdef DEFINE_MALLOPT - -/* - mallopt: - - mallopt is the general SVID/XPG interface to tunable parameters. - The format is to provide a (parameter-number, parameter-value) pair. - mallopt then sets the corresponding parameter to the argument - value if it can (i.e., so long as the value is meaningful), - and returns 1 if successful else 0. - - See descriptions of tunable parameters above. - -*/ - -#if __STD_C -int mALLOPt(RARG int param_number, int value) -#else -int mALLOPt(RARG param_number, value) RDECL int param_number; int value; -#endif -{ - MALLOC_LOCK; - switch(param_number) - { - case M_TRIM_THRESHOLD: - trim_threshold = value; MALLOC_UNLOCK; return 1; - case M_TOP_PAD: - top_pad = value; MALLOC_UNLOCK; return 1; - case M_MMAP_THRESHOLD: -#if HAVE_MMAP - mmap_threshold = value; -#endif - MALLOC_UNLOCK; - return 1; - case M_MMAP_MAX: -#if HAVE_MMAP - n_mmaps_max = value; MALLOC_UNLOCK; return 1; -#else - MALLOC_UNLOCK; return value == 0; -#endif - - default: - MALLOC_UNLOCK; - return 0; - } -} - -#endif /* DEFINE_MALLOPT */ - -/* - -History: - - V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee) - * Added pvalloc, as recommended by H.J. Liu - * Added 64bit pointer support mainly from Wolfram Gloger - * Added anonymously donated WIN32 sbrk emulation - * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen - * malloc_extend_top: fix mask error that caused wastage after - foreign sbrks - * Add linux mremap support code from HJ Liu - - V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee) - * Integrated most documentation with the code. - * Add support for mmap, with help from - Wolfram Gloger (Gloger@lrz.uni-muenchen.de). - * Use last_remainder in more cases. - * Pack bins using idea from colin@nyx10.cs.du.edu - * Use ordered bins instead of best-fit threshhold - * Eliminate block-local decls to simplify tracing and debugging. - * Support another case of realloc via move into top - * Fix error occuring when initial sbrk_base not word-aligned. - * Rely on page size for units instead of SBRK_UNIT to - avoid surprises about sbrk alignment conventions. - * Add mallinfo, mallopt. Thanks to Raymond Nijssen - (raymond@es.ele.tue.nl) for the suggestion. - * Add `pad' argument to malloc_trim and top_pad mallopt parameter. - * More precautions for cases where other routines call sbrk, - courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de). - * Added macros etc., allowing use in linux libc from - H.J. Lu (hjl@gnu.ai.mit.edu) - * Inverted this history list - - V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee) - * Re-tuned and fixed to behave more nicely with V2.6.0 changes. - * Removed all preallocation code since under current scheme - the work required to undo bad preallocations exceeds - the work saved in good cases for most test programs. - * No longer use return list or unconsolidated bins since - no scheme using them consistently outperforms those that don't - given above changes. - * Use best fit for very large chunks to prevent some worst-cases. - * Added some support for debugging - - V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee) - * Removed footers when chunks are in use. Thanks to - Paul Wilson (wilson@cs.texas.edu) for the suggestion. - - V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee) - * Added malloc_trim, with help from Wolfram Gloger - (wmglo@Dent.MED.Uni-Muenchen.DE). - - V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g) - - V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g) - * realloc: try to expand in both directions - * malloc: swap order of clean-bin strategy; - * realloc: only conditionally expand backwards - * Try not to scavenge used bins - * Use bin counts as a guide to preallocation - * Occasionally bin return list chunks in first scan - * Add a few optimizations from colin@nyx10.cs.du.edu - - V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g) - * faster bin computation & slightly different binning - * merged all consolidations to one part of malloc proper - (eliminating old malloc_find_space & malloc_clean_bin) - * Scan 2 returns chunks (not just 1) - * Propagate failure in realloc if malloc returns 0 - * Add stuff to allow compilation on non-ANSI compilers - from kpv@research.att.com - - V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu) - * removed potential for odd address access in prev_chunk - * removed dependency on getpagesize.h - * misc cosmetics and a bit more internal documentation - * anticosmetics: mangled names in macros to evade debugger strangeness - * tested on sparc, hp-700, dec-mips, rs6000 - with gcc & native cc (hp, dec only) allowing - Detlefs & Zorn comparison study (in SIGPLAN Notices.) - - Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu) - * Based loosely on libg++-1.2X malloc. (It retains some of the overall - structure of old version, but most details differ.) - -*/ -#endif diff --git a/newlib/libc/stdlib/mbctype.h b/newlib/libc/stdlib/mbctype.h deleted file mode 100644 index 65cf24c34..000000000 --- a/newlib/libc/stdlib/mbctype.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _MBCTYPE_H_ - -#define _MBCTYPE_H_ - -/* escape character used for JIS encoding */ -#define ESC_CHAR 0x1b - -/* functions used to support SHIFT_JIS, EUC-JP, and JIS multibyte encodings */ - -int _EXFUN(_issjis1, (int c)); -int _EXFUN(_issjis2, (int c)); -int _EXFUN(_iseucjp, (int c)); -int _EXFUN(_isjis, (int c)); - -#define _issjis1(c) (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xef)) -#define _issjis2(c) (((c) >= 0x40 && (c) <= 0x7e) || ((c) >= 0x80 && (c) <= 0xfc)) -#define _iseucjp1(c) ((c) == 0x8e || (c) == 0x8f || ((c) >= 0xa1 && (c) <= 0xfe)) -#define _iseucjp2(c) ((c) >= 0xa1 && (c) <= 0xfe) -#define _isjis(c) ((c) >= 0x21 && (c) <= 0x7e) - -#endif /* _MBCTYPE_H_ */ diff --git a/newlib/libc/stdlib/mblen.c b/newlib/libc/stdlib/mblen.c deleted file mode 100644 index 6df27b93a..000000000 --- a/newlib/libc/stdlib/mblen.c +++ /dev/null @@ -1,79 +0,0 @@ -/* -FUNCTION -<<mblen>>---minimal multibyte length function - -INDEX - mblen - -ANSI_SYNOPSIS - #include <stdlib.h> - int mblen(const char *<[s]>, size_t <[n]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int mblen(<[s]>, <[n]>) - const char *<[s]>; - size_t <[n]>; - -DESCRIPTION -When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming -implementation of <<mblen>>. In this case, the -only ``multi-byte character sequences'' recognized are single bytes, -and thus <<1>> is returned unless <[s]> is the null pointer or -has a length of 0 or is the empty string. - -When _MB_CAPABLE is defined, this routine calls <<_mbtowc_r>> to perform -the conversion, passing a state variable to allow state dependent -decoding. The result is based on the locale setting which may -be restricted to a defined set of locales. - -RETURNS -This implementation of <<mblen>> returns <<0>> if -<[s]> is <<NULL>> or the empty string; it returns <<1>> if not _MB_CAPABLE or -the character is a single-byte character; it returns <<-1>> -if the multi-byte character is invalid; otherwise it returns -the number of bytes in the multibyte character. - -PORTABILITY -<<mblen>> is required in the ANSI C standard. However, the precise -effects vary with the locale. - -<<mblen>> requires no supporting OS subroutines. -*/ - -#ifndef _REENT_ONLY - -#include <newlib.h> -#include <stdlib.h> -#include <wchar.h> - -int -_DEFUN (mblen, (s, n), - const char *s _AND - size_t n) -{ -#ifdef _MB_CAPABLE - int retval = 0; - mbstate_t *state; - - _REENT_CHECK_MISC(_REENT); - state = &(_REENT_MBLEN_STATE(_REENT)); - retval = _mbtowc_r (_REENT, NULL, s, n, state); - if (retval < 0) - { - state->__count = 0; - return -1; - } - else - return retval; - -#else /* not _MB_CAPABLE */ - if (s == NULL || *s == '\0') - return 0; - if (n == 0) - return -1; - return 1; -#endif /* not _MB_CAPABLE */ -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/mblen_r.c b/newlib/libc/stdlib/mblen_r.c deleted file mode 100644 index 9361f6573..000000000 --- a/newlib/libc/stdlib/mblen_r.c +++ /dev/null @@ -1,76 +0,0 @@ -/* -FUNCTION -<<_mblen_r>>---reentrant minimal multibyte length function - -INDEX - _mblen_r - -ANSI_SYNOPSIS - #include <stdlib.h> - int _mblen_r(struct _reent *<[r]>, const char *<[s]>, size_t <[n]>, int *<[state]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int _mblen_r(<[r]>, <[s]>, <[n]>, <[state]>) - struct _reent *<[r]>; - const char *<[s]>; - size_t <[n]>; - int *<[state]>; - -DESCRIPTION -When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming -implementation of <<_mblen_r>>. In this case, the -only ``multi-byte character sequences'' recognized are single bytes, -and thus <<1>> is returned unless <[s]> is the null pointer or -has a length of 0 or is the empty string. - -When _MB_CAPABLE is defined, this routine calls <<_mbtowc_r>> to perform -the conversion, passing a state variable to allow state dependent -decoding. The result is based on the locale setting which may -be restricted to a defined set of locales. - -RETURNS -This implementation of <<_mblen_r>> returns <<0>> if -<[s]> is <<NULL>> or the empty string; it returns <<1>> if not _MB_CAPABLE or -the character is a single-byte character; it returns <<-1>> -if the multi-byte character is invalid; otherwise it returns -the number of bytes in the multibyte character. - -PORTABILITY -<<_mblen>> is required in the ANSI C standard. However, the precise -effects vary with the locale. - -<<_mblen_r>> requires no supporting OS subroutines. -*/ - -#include <newlib.h> -#include <stdlib.h> -#include <wchar.h> - -int -_DEFUN (_mblen_r, (r, s, n, state), - struct _reent *r _AND - const char *s _AND - size_t n _AND - mbstate_t *state) -{ -#ifdef _MB_CAPABLE - int retval; - retval = _mbtowc_r (r, NULL, s, n, state); - - if (retval < 0) - { - state->__count = 0; - return -1; - } - - return retval; -#else /* not _MB_CAPABLE */ - if (s == NULL || *s == '\0') - return 0; - if (n == 0) - return -1; - return 1; -#endif /* not _MB_CAPABLE */ -} - diff --git a/newlib/libc/stdlib/mbrlen.c b/newlib/libc/stdlib/mbrlen.c deleted file mode 100644 index ac9aa324f..000000000 --- a/newlib/libc/stdlib/mbrlen.c +++ /dev/null @@ -1,20 +0,0 @@ -#include <reent.h> -#include <newlib.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> - -size_t -mbrlen(const char *s, size_t n, mbstate_t *ps) -{ -#ifdef _MB_CAPABLE - if (ps == NULL) - { - _REENT_CHECK_MISC(_REENT); - ps = &(_REENT_MBRLEN_STATE(_REENT)); - } -#endif - - return mbrtowc(NULL, s, n, ps); -} diff --git a/newlib/libc/stdlib/mbrtowc.c b/newlib/libc/stdlib/mbrtowc.c deleted file mode 100644 index c5e700dc9..000000000 --- a/newlib/libc/stdlib/mbrtowc.c +++ /dev/null @@ -1,52 +0,0 @@ -#include <reent.h> -#include <newlib.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> -#include <string.h> - -size_t -_DEFUN (_mbrtowc_r, (ptr, pwc, s, n, ps), - struct _reent *ptr _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - mbstate_t *ps) -{ - int retval = 0; - -#ifdef _MB_CAPABLE - if (ps == NULL) - { - _REENT_CHECK_MISC(ptr); - ps = &(_REENT_MBRTOWC_STATE(ptr)); - } -#endif - - if (s == NULL) - retval = _mbtowc_r (ptr, NULL, "", 1, ps); - else - retval = _mbtowc_r (ptr, pwc, s, n, ps); - - if (retval == -1) - { - ps->__count = 0; - ptr->_errno = EILSEQ; - return (size_t)(-1); - } - else - return (size_t)retval; -} - -#ifndef _REENT_ONLY -size_t -_DEFUN (mbrtowc, (pwc, s, n, ps), - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - mbstate_t *ps) -{ - return _mbrtowc_r (_REENT, pwc, s, n, ps); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/mbsinit.c b/newlib/libc/stdlib/mbsinit.c deleted file mode 100644 index e32369ae1..000000000 --- a/newlib/libc/stdlib/mbsinit.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <reent.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> - -int -mbsinit(const mbstate_t *ps) -{ - if (ps == NULL || ps->__count == 0) - return 1; - else - return 0; -} diff --git a/newlib/libc/stdlib/mbsnrtowcs.c b/newlib/libc/stdlib/mbsnrtowcs.c deleted file mode 100644 index 6729df951..000000000 --- a/newlib/libc/stdlib/mbsnrtowcs.c +++ /dev/null @@ -1,179 +0,0 @@ -/* -FUNCTION -<<mbsrtowcs>>, <<mbsnrtowcs>>---convert a character string to a wide-character string - -INDEX - mbsrtowcs -INDEX - _mbsrtowcs_r -INDEX - mbsnrtowcs -INDEX - _mbsnrtowcs_r - -ANSI_SYNOPSIS - #include <wchar.h> - size_t mbsrtowcs(wchar_t *<[dst]>, const char **<[src]>, size_t <[len]>, - mbstate_t *<[ps]>); - - #include <wchar.h> - size_t _mbsrtowcs_r(struct _reent *<[ptr]>, wchar_t *<[dst]>, - const char **<[src]>, size_t <[len]>, - mbstate_t *<[ps]>); - - #include <wchar.h> - size_t mbsnrtowcs(wchar_t *<[dst]>, const char **<[src]>, - size_t <[nms]>, size_t <[len]>, mbstate_t *<[ps]>); - - #include <wchar.h> - size_t _mbsnrtowcs_r(struct _reent *<[ptr]>, wchar_t *<[dst]>, - const char **<[src]>, size_t <[nms]>, - size_t <[len]>, mbstate_t *<[ps]>); - -TRAD_SYNOPSIS - #include <wchar.h> - size_t mbsrtowcs(<[dst]>, <[src]>, <[len]>, <[ps]>) - wchar_t *<[dst]>; - const char **<[src]>; - size_t <[len]>; - mbstate_t *<[ps]>; - - #include <wchar.h> - size_t _mbsrtowcs_r(<[ptr]>, <[dst]>, <[src]>, <[len]>, <[ps]>) - struct _reent *<[ptr]>; - wchar_t *<[dst]>; - const char **<[src]>; - size_t <[len]>; - mbstate_t *<[ps]>; - - #include <wchar.h> - size_t mbsnrtowcs(<[dst]>, <[src]>, <[nms]>, <[len]>, <[ps]>) - wchar_t *<[dst]>; - const char **<[src]>; - size_t <[nms]>; - size_t <[len]>; - mbstate_t *<[ps]>; - - #include <wchar.h> - size_t _mbsnrtowcs_r(<[ptr]>, <[dst]>, <[src]>, <[nms]>, <[len]>, <[ps]>) - struct _reent *<[ptr]>; - wchar_t *<[dst]>; - const char **<[src]>; - size_t <[nms]>; - size_t <[len]>; - mbstate_t *<[ps]>; - -DESCRIPTION -The <<mbsrtowcs>> function converts a sequence of multibyte characters -pointed to indirectly by <[src]> into a sequence of corresponding wide -characters and stores at most <[len]> of them in the wchar_t array pointed -to by <[dst]>, until it encounters a terminating null character ('\0'). - -If <[dst]> is NULL, no characters are stored. - -If <[dst]> is not NULL, the pointer pointed to by <[src]> is updated to point -to the character after the one that conversion stopped at. If conversion -stops because a null character is encountered, *<[src]> is set to NULL. - -The mbstate_t argument, <[ps]>, is used to keep track of the shift state. If -it is NULL, <<mbsrtowcs>> uses an internal, static mbstate_t object, which -is initialized to the initial conversion state at program startup. - -The <<mbsnrtowcs>> function behaves identically to <<mbsrtowcs>>, except that -conversion stops after reading at most <[nms]> bytes from the buffer pointed -to by <[src]>. - -RETURNS -The <<mbsrtowcs>> and <<mbsnrtowcs>> functions return the number of wide -characters stored in the array pointed to by <[dst]> if successful, otherwise -it returns (size_t)-1. - -PORTABILITY -<<mbsrtowcs>> is defined by the C99 standard. -<<mbsnrtowcs>> is defined by the POSIX.1-2008 standard. -*/ - -#include <reent.h> -#include <newlib.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> - -size_t -_DEFUN (_mbsnrtowcs_r, (r, dst, src, nms, len, ps), - struct _reent *r _AND - wchar_t *dst _AND - const char **src _AND - size_t nms _AND - size_t len _AND - mbstate_t *ps) -{ - wchar_t *ptr = dst; - const char *tmp_src; - size_t max; - size_t count = 0; - int bytes; - -#ifdef _MB_CAPABLE - if (ps == NULL) - { - _REENT_CHECK_MISC(r); - ps = &(_REENT_MBSRTOWCS_STATE(r)); - } -#endif - - if (dst == NULL) - { - /* Ignore original len value and do not alter src pointer if the - dst pointer is NULL. */ - len = (size_t)-1; - tmp_src = *src; - src = &tmp_src; - } - - max = len; - while (len > 0) - { - bytes = _mbrtowc_r (r, ptr, *src, nms, ps); - if (bytes > 0) - { - *src += bytes; - nms -= bytes; - ++count; - ptr = (dst == NULL) ? NULL : ptr + 1; - --len; - } - else if (bytes == -2) - { - *src += nms; - return count; - } - else if (bytes == 0) - { - *src = NULL; - return count; - } - else - { - ps->__count = 0; - r->_errno = EILSEQ; - return (size_t)-1; - } - } - - return (size_t)max; -} - -#ifndef _REENT_ONLY -size_t -_DEFUN (mbsnrtowcs, (dst, src, nms, len, ps), - wchar_t *dst _AND - const char **src _AND - size_t nms _AND - size_t len _AND - mbstate_t *ps) -{ - return _mbsnrtowcs_r (_REENT, dst, src, nms, len, ps); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/mbsrtowcs.c b/newlib/libc/stdlib/mbsrtowcs.c deleted file mode 100644 index d5137d144..000000000 --- a/newlib/libc/stdlib/mbsrtowcs.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <reent.h> -#include <newlib.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> - -size_t -_DEFUN (_mbsrtowcs_r, (r, dst, src, len, ps), - struct _reent *r _AND - wchar_t *dst _AND - const char **src _AND - size_t len _AND - mbstate_t *ps) -{ - return _mbsnrtowcs_r (r, dst, src, (size_t) -1, len, ps); -} - -#ifndef _REENT_ONLY -size_t -_DEFUN (mbsrtowcs, (dst, src, len, ps), - wchar_t *dst _AND - const char **src _AND - size_t len _AND - mbstate_t *ps) -{ - return _mbsnrtowcs_r (_REENT, dst, src, (size_t) -1, len, ps); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/mbstowcs.c b/newlib/libc/stdlib/mbstowcs.c deleted file mode 100644 index 334b5f54d..000000000 --- a/newlib/libc/stdlib/mbstowcs.c +++ /dev/null @@ -1,83 +0,0 @@ -/* -FUNCTION -<<mbstowcs>>---minimal multibyte string to wide char converter - -INDEX - mbstowcs - -ANSI_SYNOPSIS - #include <stdlib.h> - int mbstowcs(wchar_t *<[pwc]>, const char *<[s]>, size_t <[n]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int mbstowcs(<[pwc]>, <[s]>, <[n]>) - wchar_t *<[pwc]>; - const char *<[s]>; - size_t <[n]>; - -DESCRIPTION -When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming -implementation of <<mbstowcs>>. In this case, the -only ``multi-byte character sequences'' recognized are single bytes, -and they are ``converted'' to wide-char versions simply by byte -extension. - -When _MB_CAPABLE is defined, this routine calls <<_mbstowcs_r>> to perform -the conversion, passing a state variable to allow state dependent -decoding. The result is based on the locale setting which may -be restricted to a defined set of locales. - -RETURNS -This implementation of <<mbstowcs>> returns <<0>> if -<[s]> is <<NULL>> or is the empty string; -it returns <<-1>> if _MB_CAPABLE and one of the -multi-byte characters is invalid or incomplete; -otherwise it returns the minimum of: <<n>> or the -number of multi-byte characters in <<s>> plus 1 (to -compensate for the nul character). -If the return value is -1, the state of the <<pwc>> string is -indeterminate. If the input has a length of 0, the output -string will be modified to contain a wchar_t nul terminator. - -PORTABILITY -<<mbstowcs>> is required in the ANSI C standard. However, the precise -effects vary with the locale. - -<<mbstowcs>> requires no supporting OS subroutines. -*/ - -#ifndef _REENT_ONLY - -#include <newlib.h> -#include <stdlib.h> -#include <wchar.h> - -size_t -_DEFUN (mbstowcs, (pwcs, s, n), - wchar_t *pwcs _AND - const char *s _AND - size_t n) -{ -#ifdef _MB_CAPABLE - mbstate_t state; - state.__count = 0; - - return _mbstowcs_r (_REENT, pwcs, s, n, &state); -#else /* not _MB_CAPABLE */ - - int count = 0; - - if (n != 0) { - do { - if ((*pwcs++ = (wchar_t) *s++) == 0) - break; - count++; - } while (--n != 0); - } - - return count; -#endif /* not _MB_CAPABLE */ -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/mbstowcs_r.c b/newlib/libc/stdlib/mbstowcs_r.c deleted file mode 100644 index 3dd73e42c..000000000 --- a/newlib/libc/stdlib/mbstowcs_r.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <stdlib.h> -#include <wchar.h> - -size_t -_DEFUN (_mbstowcs_r, (reent, pwcs, s, n, state), - struct _reent *r _AND - wchar_t *pwcs _AND - const char *s _AND - size_t n _AND - mbstate_t *state) -{ - size_t ret = 0; - char *t = (char *)s; - int bytes; - - if (!pwcs) - n = (size_t) 1; /* Value doesn't matter as long as it's not 0. */ - while (n > 0) - { - bytes = _mbtowc_r (r, pwcs, t, MB_CUR_MAX, state); - if (bytes < 0) - { - state->__count = 0; - return -1; - } - else if (bytes == 0) - break; - t += bytes; - ++ret; - if (pwcs) - { - ++pwcs; - --n; - } - } - return ret; -} diff --git a/newlib/libc/stdlib/mbtowc.c b/newlib/libc/stdlib/mbtowc.c deleted file mode 100644 index 3f34b8a28..000000000 --- a/newlib/libc/stdlib/mbtowc.c +++ /dev/null @@ -1,94 +0,0 @@ -/* -FUNCTION -<<mbtowc>>---minimal multibyte to wide char converter - -INDEX - mbtowc - -ANSI_SYNOPSIS - #include <stdlib.h> - int mbtowc(wchar_t *<[pwc]>, const char *<[s]>, size_t <[n]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int mbtowc(<[pwc]>, <[s]>, <[n]>) - wchar_t *<[pwc]>; - const char *<[s]>; - size_t <[n]>; - -DESCRIPTION -When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming -implementation of <<mbtowc>>. In this case, -only ``multi-byte character sequences'' recognized are single bytes, -and they are ``converted'' to themselves. -Each call to <<mbtowc>> copies one character from <<*<[s]>>> to -<<*<[pwc]>>>, unless <[s]> is a null pointer. The argument n -is ignored. - -When _MB_CAPABLE is defined, this routine calls <<_mbtowc_r>> to perform -the conversion, passing a state variable to allow state dependent -decoding. The result is based on the locale setting which may -be restricted to a defined set of locales. - -RETURNS -This implementation of <<mbtowc>> returns <<0>> if -<[s]> is <<NULL>> or is the empty string; -it returns <<1>> if not _MB_CAPABLE or -the character is a single-byte character; it returns <<-1>> -if n is <<0>> or the multi-byte character is invalid; -otherwise it returns the number of bytes in the multibyte character. -If the return value is -1, no changes are made to the <<pwc>> -output string. If the input is the empty string, a wchar_t nul -is placed in the output string and 0 is returned. If the input -has a length of 0, no changes are made to the <<pwc>> output string. - -PORTABILITY -<<mbtowc>> is required in the ANSI C standard. However, the precise -effects vary with the locale. - -<<mbtowc>> requires no supporting OS subroutines. -*/ - -#ifndef _REENT_ONLY - -#include <newlib.h> -#include <stdlib.h> -#include <wchar.h> - -int -_DEFUN (mbtowc, (pwc, s, n), - wchar_t *pwc _AND - const char *s _AND - size_t n) -{ -#ifdef _MB_CAPABLE - int retval = 0; - mbstate_t *ps; - - _REENT_CHECK_MISC(_REENT); - ps = &(_REENT_MBTOWC_STATE(_REENT)); - - retval = _mbtowc_r (_REENT, pwc, s, n, ps); - - if (retval < 0) - { - ps->__count = 0; - return -1; - } - return retval; -#else /* not _MB_CAPABLE */ - if (s == NULL) - return 0; - if (n == 0) - return -1; - if (pwc) - *pwc = (wchar_t) *s; - return (*s != '\0'); -#endif /* not _MB_CAPABLE */ -} - -#endif /* !_REENT_ONLY */ - - - - diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c deleted file mode 100644 index 4e80c51b1..000000000 --- a/newlib/libc/stdlib/mbtowc_r.c +++ /dev/null @@ -1,639 +0,0 @@ -#include <newlib.h> -#include <stdlib.h> -#include <locale.h> -#include "mbctype.h" -#include <wchar.h> -#include <string.h> -#include <errno.h> -#include "local.h" - -int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t, - const char *, mbstate_t *) - = __ascii_mbtowc; - -int -_DEFUN (_mbtowc_r, (r, pwc, s, n, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - mbstate_t *state) -{ - return __mbtowc (r, pwc, s, n, __locale_charset (), state); -} - -int -_DEFUN (__ascii_mbtowc, (r, pwc, s, n, charset, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - const char *charset _AND - mbstate_t *state) -{ - wchar_t dummy; - unsigned char *t = (unsigned char *)s; - - if (pwc == NULL) - pwc = &dummy; - - if (s == NULL) - return 0; - - if (n == 0) - return -2; - - *pwc = (wchar_t)*t; - - if (*t == '\0') - return 0; - - return 1; -} - -#ifdef _MB_CAPABLE -typedef enum { ESCAPE, DOLLAR, BRACKET, AT, B, J, - NUL, JIS_CHAR, OTHER, JIS_C_NUM } JIS_CHAR_TYPE; -typedef enum { ASCII, JIS, A_ESC, A_ESC_DL, JIS_1, J_ESC, J_ESC_BR, - INV, JIS_S_NUM } JIS_STATE; -typedef enum { COPY_A, COPY_J1, COPY_J2, MAKE_A, NOOP, EMPTY, ERROR } JIS_ACTION; - -/************************************************************************************** - * state/action tables for processing JIS encoding - * Where possible, switches to JIS are grouped with proceding JIS characters and switches - * to ASCII are grouped with preceding JIS characters. Thus, maximum returned length - * is 2 (switch to JIS) + 2 (JIS characters) + 2 (switch back to ASCII) = 6. - *************************************************************************************/ - -static JIS_STATE JIS_state_table[JIS_S_NUM][JIS_C_NUM] = { -/* ESCAPE DOLLAR BRACKET AT B J NUL JIS_CHAR OTHER */ -/* ASCII */ { A_ESC, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII }, -/* JIS */ { J_ESC, JIS_1, JIS_1, JIS_1, JIS_1, JIS_1, INV, JIS_1, INV }, -/* A_ESC */ { ASCII, A_ESC_DL, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII }, -/* A_ESC_DL */{ ASCII, ASCII, ASCII, JIS, JIS, ASCII, ASCII, ASCII, ASCII }, -/* JIS_1 */ { INV, JIS, JIS, JIS, JIS, JIS, INV, JIS, INV }, -/* J_ESC */ { INV, INV, J_ESC_BR, INV, INV, INV, INV, INV, INV }, -/* J_ESC_BR */{ INV, INV, INV, INV, ASCII, ASCII, INV, INV, INV }, -}; - -static JIS_ACTION JIS_action_table[JIS_S_NUM][JIS_C_NUM] = { -/* ESCAPE DOLLAR BRACKET AT B J NUL JIS_CHAR OTHER */ -/* ASCII */ { NOOP, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A, EMPTY, COPY_A, COPY_A}, -/* JIS */ { NOOP, COPY_J1, COPY_J1, COPY_J1, COPY_J1, COPY_J1, ERROR, COPY_J1, ERROR }, -/* A_ESC */ { COPY_A, NOOP, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A}, -/* A_ESC_DL */{ COPY_A, COPY_A, COPY_A, NOOP, NOOP, COPY_A, COPY_A, COPY_A, COPY_A}, -/* JIS_1 */ { ERROR, COPY_J2, COPY_J2, COPY_J2, COPY_J2, COPY_J2, ERROR, COPY_J2, ERROR }, -/* J_ESC */ { ERROR, ERROR, NOOP, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR }, -/* J_ESC_BR */{ ERROR, ERROR, ERROR, ERROR, MAKE_A, MAKE_A, ERROR, ERROR, ERROR }, -}; - -/* we override the mbstate_t __count field for more complex encodings and use it store a state value */ -#define __state __count - -#ifdef _MB_EXTENDED_CHARSETS_ISO -int -_DEFUN (__iso_mbtowc, (r, pwc, s, n, charset, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - const char *charset _AND - mbstate_t *state) -{ - wchar_t dummy; - unsigned char *t = (unsigned char *)s; - - if (pwc == NULL) - pwc = &dummy; - - if (s == NULL) - return 0; - - if (n == 0) - return -2; - - if (*t >= 0xa0) - { - int iso_idx = __iso_8859_index (charset + 9); - if (iso_idx >= 0) - { - *pwc = __iso_8859_conv[iso_idx][*t - 0xa0]; - if (*pwc == 0) /* Invalid character */ - { - r->_errno = EILSEQ; - return -1; - } - return 1; - } - } - - *pwc = (wchar_t) *t; - - if (*t == '\0') - return 0; - - return 1; -} -#endif /* _MB_EXTENDED_CHARSETS_ISO */ - -#ifdef _MB_EXTENDED_CHARSETS_WINDOWS -int -_DEFUN (__cp_mbtowc, (r, pwc, s, n, charset, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - const char *charset _AND - mbstate_t *state) -{ - wchar_t dummy; - unsigned char *t = (unsigned char *)s; - - if (pwc == NULL) - pwc = &dummy; - - if (s == NULL) - return 0; - - if (n == 0) - return -2; - - if (*t >= 0x80) - { - int cp_idx = __cp_index (charset + 2); - if (cp_idx >= 0) - { - *pwc = __cp_conv[cp_idx][*t - 0x80]; - if (*pwc == 0) /* Invalid character */ - { - r->_errno = EILSEQ; - return -1; - } - return 1; - } - } - - *pwc = (wchar_t)*t; - - if (*t == '\0') - return 0; - - return 1; -} -#endif /* _MB_EXTENDED_CHARSETS_WINDOWS */ - -int -_DEFUN (__utf8_mbtowc, (r, pwc, s, n, charset, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - const char *charset _AND - mbstate_t *state) -{ - wchar_t dummy; - unsigned char *t = (unsigned char *)s; - int ch; - int i = 0; - - if (pwc == NULL) - pwc = &dummy; - - if (s == NULL) - return 0; - - if (n == 0) - return -2; - - if (state->__count == 0) - ch = t[i++]; - else - ch = state->__value.__wchb[0]; - - if (ch == '\0') - { - *pwc = 0; - state->__count = 0; - return 0; /* s points to the null character */ - } - - if (ch >= 0x0 && ch <= 0x7f) - { - /* single-byte sequence */ - state->__count = 0; - *pwc = ch; - return 1; - } - if (ch >= 0xc0 && ch <= 0xdf) - { - /* two-byte sequence */ - state->__value.__wchb[0] = ch; - if (state->__count == 0) - state->__count = 1; - else if (n < (size_t)-1) - ++n; - if (n < 2) - return -2; - ch = t[i++]; - if (ch < 0x80 || ch > 0xbf) - { - r->_errno = EILSEQ; - return -1; - } - if (state->__value.__wchb[0] < 0xc2) - { - /* overlong UTF-8 sequence */ - r->_errno = EILSEQ; - return -1; - } - state->__count = 0; - *pwc = (wchar_t)((state->__value.__wchb[0] & 0x1f) << 6) - | (wchar_t)(ch & 0x3f); - return i; - } - if (ch >= 0xe0 && ch <= 0xef) - { - /* three-byte sequence */ - wchar_t tmp; - state->__value.__wchb[0] = ch; - if (state->__count == 0) - state->__count = 1; - else if (n < (size_t)-1) - ++n; - if (n < 2) - return -2; - ch = (state->__count == 1) ? t[i++] : state->__value.__wchb[1]; - if (state->__value.__wchb[0] == 0xe0 && ch < 0xa0) - { - /* overlong UTF-8 sequence */ - r->_errno = EILSEQ; - return -1; - } - if (ch < 0x80 || ch > 0xbf) - { - r->_errno = EILSEQ; - return -1; - } - state->__value.__wchb[1] = ch; - if (state->__count == 1) - state->__count = 2; - else if (n < (size_t)-1) - ++n; - if (n < 3) - return -2; - ch = t[i++]; - if (ch < 0x80 || ch > 0xbf) - { - r->_errno = EILSEQ; - return -1; - } - state->__count = 0; - tmp = (wchar_t)((state->__value.__wchb[0] & 0x0f) << 12) - | (wchar_t)((state->__value.__wchb[1] & 0x3f) << 6) - | (wchar_t)(ch & 0x3f); - /* Check for invalid CESU-8 encoding of UTF-16 surrogate values. */ - if (tmp >= 0xd800 && tmp <= 0xdfff) - { - r->_errno = EILSEQ; - return -1; - } - *pwc = tmp; - return i; - } - if (ch >= 0xf0 && ch <= 0xf4) - { - /* four-byte sequence */ - wint_t tmp; - state->__value.__wchb[0] = ch; - if (state->__count == 0) - state->__count = 1; - else if (n < (size_t)-1) - ++n; - if (n < 2) - return -2; - ch = (state->__count == 1) ? t[i++] : state->__value.__wchb[1]; - if ((state->__value.__wchb[0] == 0xf0 && ch < 0x90) - || (state->__value.__wchb[0] == 0xf4 && ch >= 0x90)) - { - /* overlong UTF-8 sequence or result is > 0x10ffff */ - r->_errno = EILSEQ; - return -1; - } - if (ch < 0x80 || ch > 0xbf) - { - r->_errno = EILSEQ; - return -1; - } - state->__value.__wchb[1] = ch; - if (state->__count == 1) - state->__count = 2; - else if (n < (size_t)-1) - ++n; - if (n < 3) - return -2; - ch = (state->__count == 2) ? t[i++] : state->__value.__wchb[2]; - if (ch < 0x80 || ch > 0xbf) - { - r->_errno = EILSEQ; - return -1; - } - state->__value.__wchb[2] = ch; - if (state->__count == 2) - state->__count = 3; - else if (n < (size_t)-1) - ++n; - if (state->__count == 3 && sizeof(wchar_t) == 2) - { - /* On systems which have wchar_t being UTF-16 values, the value - doesn't fit into a single wchar_t in this case. So what we - do here is to store the state with a special value of __count - and return the first half of a surrogate pair. The first - three bytes of a UTF-8 sequence are enough to generate the - first half of a UTF-16 surrogate pair. As return value we - choose to return the number of bytes actually read up to - here. - The second half of the surrogate pair is returned in case we - recognize the special __count value of four, and the next - byte is actually a valid value. See below. */ - tmp = (wint_t)((state->__value.__wchb[0] & 0x07) << 18) - | (wint_t)((state->__value.__wchb[1] & 0x3f) << 12) - | (wint_t)((state->__value.__wchb[2] & 0x3f) << 6); - state->__count = 4; - *pwc = 0xd800 | ((tmp - 0x10000) >> 10); - return i; - } - if (n < 4) - return -2; - ch = t[i++]; - if (ch < 0x80 || ch > 0xbf) - { - r->_errno = EILSEQ; - return -1; - } - tmp = (wint_t)((state->__value.__wchb[0] & 0x07) << 18) - | (wint_t)((state->__value.__wchb[1] & 0x3f) << 12) - | (wint_t)((state->__value.__wchb[2] & 0x3f) << 6) - | (wint_t)(ch & 0x3f); - if (state->__count == 4 && sizeof(wchar_t) == 2) - /* Create the second half of the surrogate pair for systems with - wchar_t == UTF-16 . */ - *pwc = 0xdc00 | (tmp & 0x3ff); - else - *pwc = tmp; - state->__count = 0; - return i; - } - - r->_errno = EILSEQ; - return -1; -} - -/* Cygwin defines its own doublebyte charset conversion functions - because the underlying OS requires wchar_t == UTF-16. */ -#ifndef __CYGWIN__ -int -_DEFUN (__sjis_mbtowc, (r, pwc, s, n, charset, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - const char *charset _AND - mbstate_t *state) -{ - wchar_t dummy; - unsigned char *t = (unsigned char *)s; - int ch; - int i = 0; - - if (pwc == NULL) - pwc = &dummy; - - if (s == NULL) - return 0; /* not state-dependent */ - - if (n == 0) - return -2; - - ch = t[i++]; - if (state->__count == 0) - { - if (_issjis1 (ch)) - { - state->__value.__wchb[0] = ch; - state->__count = 1; - if (n <= 1) - return -2; - ch = t[i++]; - } - } - if (state->__count == 1) - { - if (_issjis2 (ch)) - { - *pwc = (((wchar_t)state->__value.__wchb[0]) << 8) + (wchar_t)ch; - state->__count = 0; - return i; - } - else - { - r->_errno = EILSEQ; - return -1; - } - } - - *pwc = (wchar_t)*t; - - if (*t == '\0') - return 0; - - return 1; -} - -int -_DEFUN (__eucjp_mbtowc, (r, pwc, s, n, charset, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - const char *charset _AND - mbstate_t *state) -{ - wchar_t dummy; - unsigned char *t = (unsigned char *)s; - int ch; - int i = 0; - - if (pwc == NULL) - pwc = &dummy; - - if (s == NULL) - return 0; - - if (n == 0) - return -2; - - ch = t[i++]; - if (state->__count == 0) - { - if (_iseucjp1 (ch)) - { - state->__value.__wchb[0] = ch; - state->__count = 1; - if (n <= 1) - return -2; - ch = t[i++]; - } - } - if (state->__count == 1) - { - if (_iseucjp2 (ch)) - { - if (state->__value.__wchb[0] == 0x8f) - { - state->__value.__wchb[1] = ch; - state->__count = 2; - if (n <= i) - return -2; - ch = t[i++]; - } - else - { - *pwc = (((wchar_t)state->__value.__wchb[0]) << 8) + (wchar_t)ch; - state->__count = 0; - return i; - } - } - else - { - r->_errno = EILSEQ; - return -1; - } - } - if (state->__count == 2) - { - if (_iseucjp2 (ch)) - { - *pwc = (((wchar_t)state->__value.__wchb[1]) << 8) - + (wchar_t)(ch & 0x7f); - state->__count = 0; - return i; - } - else - { - r->_errno = EILSEQ; - return -1; - } - } - - *pwc = (wchar_t)*t; - - if (*t == '\0') - return 0; - - return 1; -} - -int -_DEFUN (__jis_mbtowc, (r, pwc, s, n, charset, state), - struct _reent *r _AND - wchar_t *pwc _AND - const char *s _AND - size_t n _AND - const char *charset _AND - mbstate_t *state) -{ - wchar_t dummy; - unsigned char *t = (unsigned char *)s; - JIS_STATE curr_state; - JIS_ACTION action; - JIS_CHAR_TYPE ch; - unsigned char *ptr; - unsigned int i; - int curr_ch; - - if (pwc == NULL) - pwc = &dummy; - - if (s == NULL) - { - state->__state = ASCII; - return 1; /* state-dependent */ - } - - if (n == 0) - return -2; - - curr_state = state->__state; - ptr = t; - - for (i = 0; i < n; ++i) - { - curr_ch = t[i]; - switch (curr_ch) - { - case ESC_CHAR: - ch = ESCAPE; - break; - case '$': - ch = DOLLAR; - break; - case '@': - ch = AT; - break; - case '(': - ch = BRACKET; - break; - case 'B': - ch = B; - break; - case 'J': - ch = J; - break; - case '\0': - ch = NUL; - break; - default: - if (_isjis (curr_ch)) - ch = JIS_CHAR; - else - ch = OTHER; - } - - action = JIS_action_table[curr_state][ch]; - curr_state = JIS_state_table[curr_state][ch]; - - switch (action) - { - case NOOP: - break; - case EMPTY: - state->__state = ASCII; - *pwc = (wchar_t)0; - return 0; - case COPY_A: - state->__state = ASCII; - *pwc = (wchar_t)*ptr; - return (i + 1); - case COPY_J1: - state->__value.__wchb[0] = t[i]; - break; - case COPY_J2: - state->__state = JIS; - *pwc = (((wchar_t)state->__value.__wchb[0]) << 8) + (wchar_t)(t[i]); - return (i + 1); - case MAKE_A: - ptr = (unsigned char *)(t + i + 1); - break; - case ERROR: - default: - r->_errno = EILSEQ; - return -1; - } - - } - - state->__state = curr_state; - return -2; /* n < bytes needed */ -} -#endif /* !__CYGWIN__*/ -#endif /* _MB_CAPABLE */ diff --git a/newlib/libc/stdlib/mlock.c b/newlib/libc/stdlib/mlock.c deleted file mode 100644 index 888c986a9..000000000 --- a/newlib/libc/stdlib/mlock.c +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef MALLOC_PROVIDED -/* -FUNCTION -<<__malloc_lock>>, <<__malloc_unlock>>---lock malloc pool - -INDEX - __malloc_lock -INDEX - __malloc_unlock - -ANSI_SYNOPSIS - #include <malloc.h> - void __malloc_lock (struct _reent *<[reent]>); - void __malloc_unlock (struct _reent *<[reent]>); - -TRAD_SYNOPSIS - void __malloc_lock(<[reent]>) - struct _reent *<[reent]>; - - void __malloc_unlock(<[reent]>) - struct _reent *<[reent]>; - -DESCRIPTION -The <<malloc>> family of routines call these functions when they need to lock -the memory pool. The version of these routines supplied in the library use -the lock API defined in sys/lock.h. If multiple threads of execution can -call <<malloc>>, or if <<malloc>> can be called reentrantly, then you need to -define your own versions of these functions in order to safely lock the -memory pool during a call. If you do not, the memory pool may become -corrupted. - -A call to <<malloc>> may call <<__malloc_lock>> recursively; that is, -the sequence of calls may go <<__malloc_lock>>, <<__malloc_lock>>, -<<__malloc_unlock>>, <<__malloc_unlock>>. Any implementation of these -routines must be careful to avoid causing a thread to wait for a lock -that it already holds. -*/ - -#include <malloc.h> -#include <sys/lock.h> - -#ifndef __SINGLE_THREAD__ -__LOCK_INIT_RECURSIVE(static, __malloc_lock_object); -#endif - -void -__malloc_lock (ptr) - struct _reent *ptr; -{ -#ifndef __SINGLE_THREAD__ - __lock_acquire_recursive (__malloc_lock_object); -#endif -} - -void -__malloc_unlock (ptr) - struct _reent *ptr; -{ -#ifndef __SINGLE_THREAD__ - __lock_release_recursive (__malloc_lock_object); -#endif -} - -#endif diff --git a/newlib/libc/stdlib/mprec.c b/newlib/libc/stdlib/mprec.c deleted file mode 100644 index 6e84ece5b..000000000 --- a/newlib/libc/stdlib/mprec.c +++ /dev/null @@ -1,1045 +0,0 @@ -/**************************************************************** - * - * The author of this software is David M. Gay. - * - * Copyright (c) 1991 by AT&T. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - ***************************************************************/ - -/* Please send bug reports to - David M. Gay - AT&T Bell Laboratories, Room 2C-463 - 600 Mountain Avenue - Murray Hill, NJ 07974-2070 - U.S.A. - dmg@research.att.com or research!dmg - */ - -/* strtod for IEEE-, VAX-, and IBM-arithmetic machines. - * - * This strtod returns a nearest machine number to the input decimal - * string (or sets errno to ERANGE). With IEEE arithmetic, ties are - * broken by the IEEE round-even rule. Otherwise ties are broken by - * biased rounding (add half and chop). - * - * Inspired loosely by William D. Clinger's paper "How to Read Floating - * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. - * - * Modifications: - * - * 1. We only require IEEE, IBM, or VAX double-precision - * arithmetic (not IEEE double-extended). - * 2. We get by with floating-point arithmetic in a case that - * Clinger missed -- when we're computing d * 10^n - * for a small integer d and the integer n is not too - * much larger than 22 (the maximum integer k for which - * we can represent 10^k exactly), we may be able to - * compute (d*10^k) * 10^(e-k) with just one roundoff. - * 3. Rather than a bit-at-a-time adjustment of the binary - * result in the hard case, we use floating-point - * arithmetic to determine the adjustment to within - * one bit; only in really hard cases do we need to - * compute a second residual. - * 4. Because of 3., we don't need a large table of powers of 10 - * for ten-to-e (just some small tables, e.g. of 10^k - * for 0 <= k <= 22). - */ - -/* - * #define IEEE_8087 for IEEE-arithmetic machines where the least - * significant byte has the lowest address. - * #define IEEE_MC68k for IEEE-arithmetic machines where the most - * significant byte has the lowest address. - * #define Sudden_Underflow for IEEE-format machines without gradual - * underflow (i.e., that flush to zero on underflow). - * #define IBM for IBM mainframe-style floating-point arithmetic. - * #define VAX for VAX-style floating-point arithmetic. - * #define Unsigned_Shifts if >> does treats its left operand as unsigned. - * #define No_leftright to omit left-right logic in fast floating-point - * computation of dtoa. - * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3. - * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines - * that use extended-precision instructions to compute rounded - * products and quotients) with IBM. - * #define ROUND_BIASED for IEEE-format with biased rounding. - * #define Inaccurate_Divide for IEEE-format with correctly rounded - * products but inaccurate quotients, e.g., for Intel i860. - * #define Just_16 to store 16 bits per 32-bit long when doing high-precision - * integer arithmetic. Whether this speeds things up or slows things - * down depends on the machine and the number being converted. - */ - -#include <_ansi.h> -#include <stdlib.h> -#include <string.h> -#include <reent.h> -#include "mprec.h" - -/* reent.c knows this value */ -#define _Kmax 15 - -_Bigint * -_DEFUN (Balloc, (ptr, k), struct _reent *ptr _AND int k) -{ - int x; - _Bigint *rv ; - - _REENT_CHECK_MP(ptr); - if (_REENT_MP_FREELIST(ptr) == NULL) - { - /* Allocate a list of pointers to the mprec objects */ - _REENT_MP_FREELIST(ptr) = (struct _Bigint **) _calloc_r (ptr, - sizeof (struct _Bigint *), - _Kmax + 1); - if (_REENT_MP_FREELIST(ptr) == NULL) - { - return NULL; - } - } - - if ((rv = _REENT_MP_FREELIST(ptr)[k]) != 0) - { - _REENT_MP_FREELIST(ptr)[k] = rv->_next; - } - else - { - x = 1 << k; - /* Allocate an mprec Bigint and stick in in the freelist */ - rv = (_Bigint *) _calloc_r (ptr, - 1, - sizeof (_Bigint) + - (x-1) * sizeof(rv->_x)); - if (rv == NULL) return NULL; - rv->_k = k; - rv->_maxwds = x; - } - rv->_sign = rv->_wds = 0; - return rv; -} - -void -_DEFUN (Bfree, (ptr, v), struct _reent *ptr _AND _Bigint * v) -{ - _REENT_CHECK_MP(ptr); - if (v) - { - v->_next = _REENT_MP_FREELIST(ptr)[v->_k]; - _REENT_MP_FREELIST(ptr)[v->_k] = v; - } -} - -_Bigint * -_DEFUN (multadd, (ptr, b, m, a), - struct _reent *ptr _AND - _Bigint * b _AND - int m _AND - int a) -{ - int i, wds; - __ULong *x, y; -#ifdef Pack_32 - __ULong xi, z; -#endif - _Bigint *b1; - - wds = b->_wds; - x = b->_x; - i = 0; - do - { -#ifdef Pack_32 - xi = *x; - y = (xi & 0xffff) * m + a; - z = (xi >> 16) * m + (y >> 16); - a = (int) (z >> 16); - *x++ = (z << 16) + (y & 0xffff); -#else - y = *x * m + a; - a = (int) (y >> 16); - *x++ = y & 0xffff; -#endif - } - while (++i < wds); - if (a) - { - if (wds >= b->_maxwds) - { - b1 = Balloc (ptr, b->_k + 1); - Bcopy (b1, b); - Bfree (ptr, b); - b = b1; - } - b->_x[wds++] = a; - b->_wds = wds; - } - return b; -} - -_Bigint * -_DEFUN (s2b, (ptr, s, nd0, nd, y9), - struct _reent * ptr _AND - _CONST char *s _AND - int nd0 _AND - int nd _AND - __ULong y9) -{ - _Bigint *b; - int i, k; - __Long x, y; - - x = (nd + 8) / 9; - for (k = 0, y = 1; x > y; y <<= 1, k++); -#ifdef Pack_32 - b = Balloc (ptr, k); - b->_x[0] = y9; - b->_wds = 1; -#else - b = Balloc (ptr, k + 1); - b->_x[0] = y9 & 0xffff; - b->_wds = (b->_x[1] = y9 >> 16) ? 2 : 1; -#endif - - i = 9; - if (9 < nd0) - { - s += 9; - do - b = multadd (ptr, b, 10, *s++ - '0'); - while (++i < nd0); - s++; - } - else - s += 10; - for (; i < nd; i++) - b = multadd (ptr, b, 10, *s++ - '0'); - return b; -} - -int -_DEFUN (hi0bits, - (x), register __ULong x) -{ - register int k = 0; - - if (!(x & 0xffff0000)) - { - k = 16; - x <<= 16; - } - if (!(x & 0xff000000)) - { - k += 8; - x <<= 8; - } - if (!(x & 0xf0000000)) - { - k += 4; - x <<= 4; - } - if (!(x & 0xc0000000)) - { - k += 2; - x <<= 2; - } - if (!(x & 0x80000000)) - { - k++; - if (!(x & 0x40000000)) - return 32; - } - return k; -} - -int -_DEFUN (lo0bits, (y), __ULong *y) -{ - register int k; - register __ULong x = *y; - - if (x & 7) - { - if (x & 1) - return 0; - if (x & 2) - { - *y = x >> 1; - return 1; - } - *y = x >> 2; - return 2; - } - k = 0; - if (!(x & 0xffff)) - { - k = 16; - x >>= 16; - } - if (!(x & 0xff)) - { - k += 8; - x >>= 8; - } - if (!(x & 0xf)) - { - k += 4; - x >>= 4; - } - if (!(x & 0x3)) - { - k += 2; - x >>= 2; - } - if (!(x & 1)) - { - k++; - x >>= 1; - if (!x & 1) - return 32; - } - *y = x; - return k; -} - -_Bigint * -_DEFUN (i2b, (ptr, i), struct _reent * ptr _AND int i) -{ - _Bigint *b; - - b = Balloc (ptr, 1); - b->_x[0] = i; - b->_wds = 1; - return b; -} - -_Bigint * -_DEFUN (mult, (ptr, a, b), struct _reent * ptr _AND _Bigint * a _AND _Bigint * b) -{ - _Bigint *c; - int k, wa, wb, wc; - __ULong carry, y, z; - __ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; -#ifdef Pack_32 - __ULong z2; -#endif - - if (a->_wds < b->_wds) - { - c = a; - a = b; - b = c; - } - k = a->_k; - wa = a->_wds; - wb = b->_wds; - wc = wa + wb; - if (wc > a->_maxwds) - k++; - c = Balloc (ptr, k); - for (x = c->_x, xa = x + wc; x < xa; x++) - *x = 0; - xa = a->_x; - xae = xa + wa; - xb = b->_x; - xbe = xb + wb; - xc0 = c->_x; -#ifdef Pack_32 - for (; xb < xbe; xb++, xc0++) - { - if ((y = *xb & 0xffff) != 0) - { - x = xa; - xc = xc0; - carry = 0; - do - { - z = (*x & 0xffff) * y + (*xc & 0xffff) + carry; - carry = z >> 16; - z2 = (*x++ >> 16) * y + (*xc >> 16) + carry; - carry = z2 >> 16; - Storeinc (xc, z2, z); - } - while (x < xae); - *xc = carry; - } - if ((y = *xb >> 16) != 0) - { - x = xa; - xc = xc0; - carry = 0; - z2 = *xc; - do - { - z = (*x & 0xffff) * y + (*xc >> 16) + carry; - carry = z >> 16; - Storeinc (xc, z, z2); - z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry; - carry = z2 >> 16; - } - while (x < xae); - *xc = z2; - } - } -#else - for (; xb < xbe; xc0++) - { - if (y = *xb++) - { - x = xa; - xc = xc0; - carry = 0; - do - { - z = *x++ * y + *xc + carry; - carry = z >> 16; - *xc++ = z & 0xffff; - } - while (x < xae); - *xc = carry; - } - } -#endif - for (xc0 = c->_x, xc = xc0 + wc; wc > 0 && !*--xc; --wc); - c->_wds = wc; - return c; -} - -_Bigint * -_DEFUN (pow5mult, - (ptr, b, k), struct _reent * ptr _AND _Bigint * b _AND int k) -{ - _Bigint *b1, *p5, *p51; - int i; - static _CONST int p05[3] = {5, 25, 125}; - - if ((i = k & 3) != 0) - b = multadd (ptr, b, p05[i - 1], 0); - - if (!(k >>= 2)) - return b; - _REENT_CHECK_MP(ptr); - if (!(p5 = _REENT_MP_P5S(ptr))) - { - /* first time */ - p5 = _REENT_MP_P5S(ptr) = i2b (ptr, 625); - p5->_next = 0; - } - for (;;) - { - if (k & 1) - { - b1 = mult (ptr, b, p5); - Bfree (ptr, b); - b = b1; - } - if (!(k >>= 1)) - break; - if (!(p51 = p5->_next)) - { - p51 = p5->_next = mult (ptr, p5, p5); - p51->_next = 0; - } - p5 = p51; - } - return b; -} - -_Bigint * -_DEFUN (lshift, (ptr, b, k), struct _reent * ptr _AND _Bigint * b _AND int k) -{ - int i, k1, n, n1; - _Bigint *b1; - __ULong *x, *x1, *xe, z; - -#ifdef Pack_32 - n = k >> 5; -#else - n = k >> 4; -#endif - k1 = b->_k; - n1 = n + b->_wds + 1; - for (i = b->_maxwds; n1 > i; i <<= 1) - k1++; - b1 = Balloc (ptr, k1); - x1 = b1->_x; - for (i = 0; i < n; i++) - *x1++ = 0; - x = b->_x; - xe = x + b->_wds; -#ifdef Pack_32 - if (k &= 0x1f) - { - k1 = 32 - k; - z = 0; - do - { - *x1++ = *x << k | z; - z = *x++ >> k1; - } - while (x < xe); - if ((*x1 = z) != 0) - ++n1; - } -#else - if (k &= 0xf) - { - k1 = 16 - k; - z = 0; - do - { - *x1++ = *x << k & 0xffff | z; - z = *x++ >> k1; - } - while (x < xe); - if (*x1 = z) - ++n1; - } -#endif - else - do - *x1++ = *x++; - while (x < xe); - b1->_wds = n1 - 1; - Bfree (ptr, b); - return b1; -} - -int -_DEFUN (cmp, (a, b), _Bigint * a _AND _Bigint * b) -{ - __ULong *xa, *xa0, *xb, *xb0; - int i, j; - - i = a->_wds; - j = b->_wds; -#ifdef DEBUG - if (i > 1 && !a->_x[i - 1]) - Bug ("cmp called with a->_x[a->_wds-1] == 0"); - if (j > 1 && !b->_x[j - 1]) - Bug ("cmp called with b->_x[b->_wds-1] == 0"); -#endif - if (i -= j) - return i; - xa0 = a->_x; - xa = xa0 + j; - xb0 = b->_x; - xb = xb0 + j; - for (;;) - { - if (*--xa != *--xb) - return *xa < *xb ? -1 : 1; - if (xa <= xa0) - break; - } - return 0; -} - -_Bigint * -_DEFUN (diff, (ptr, a, b), struct _reent * ptr _AND - _Bigint * a _AND _Bigint * b) -{ - _Bigint *c; - int i, wa, wb; - __Long borrow, y; /* We need signed shifts here. */ - __ULong *xa, *xae, *xb, *xbe, *xc; -#ifdef Pack_32 - __Long z; -#endif - - i = cmp (a, b); - if (!i) - { - c = Balloc (ptr, 0); - c->_wds = 1; - c->_x[0] = 0; - return c; - } - if (i < 0) - { - c = a; - a = b; - b = c; - i = 1; - } - else - i = 0; - c = Balloc (ptr, a->_k); - c->_sign = i; - wa = a->_wds; - xa = a->_x; - xae = xa + wa; - wb = b->_wds; - xb = b->_x; - xbe = xb + wb; - xc = c->_x; - borrow = 0; -#ifdef Pack_32 - do - { - y = (*xa & 0xffff) - (*xb & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - z = (*xa++ >> 16) - (*xb++ >> 16) + borrow; - borrow = z >> 16; - Sign_Extend (borrow, z); - Storeinc (xc, z, y); - } - while (xb < xbe); - while (xa < xae) - { - y = (*xa & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - z = (*xa++ >> 16) + borrow; - borrow = z >> 16; - Sign_Extend (borrow, z); - Storeinc (xc, z, y); - } -#else - do - { - y = *xa++ - *xb++ + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - *xc++ = y & 0xffff; - } - while (xb < xbe); - while (xa < xae) - { - y = *xa++ + borrow; - borrow = y >> 16; - Sign_Extend (borrow, y); - *xc++ = y & 0xffff; - } -#endif - while (!*--xc) - wa--; - c->_wds = wa; - return c; -} - -double -_DEFUN (ulp, (_x), double _x) -{ - union double_union x, a; - register __Long L; - - x.d = _x; - - L = (word0 (x) & Exp_mask) - (P - 1) * Exp_msk1; -#ifndef Sudden_Underflow - if (L > 0) - { -#endif -#ifdef IBM - L |= Exp_msk1 >> 4; -#endif - word0 (a) = L; -#ifndef _DOUBLE_IS_32BITS - word1 (a) = 0; -#endif - -#ifndef Sudden_Underflow - } - else - { - L = -L >> Exp_shift; - if (L < Exp_shift) - { - word0 (a) = 0x80000 >> L; -#ifndef _DOUBLE_IS_32BITS - word1 (a) = 0; -#endif - } - else - { - word0 (a) = 0; - L -= Exp_shift; -#ifndef _DOUBLE_IS_32BITS - word1 (a) = L >= 31 ? 1 : 1 << (31 - L); -#endif - } - } -#endif - return a.d; -} - -double -_DEFUN (b2d, (a, e), - _Bigint * a _AND int *e) -{ - __ULong *xa, *xa0, w, y, z; - int k; - union double_union d; -#ifdef VAX - __ULong d0, d1; -#else -#define d0 word0(d) -#define d1 word1(d) -#endif - - xa0 = a->_x; - xa = xa0 + a->_wds; - y = *--xa; -#ifdef DEBUG - if (!y) - Bug ("zero y in b2d"); -#endif - k = hi0bits (y); - *e = 32 - k; -#ifdef Pack_32 - if (k < Ebits) - { - d0 = Exp_1 | y >> (Ebits - k); - w = xa > xa0 ? *--xa : 0; -#ifndef _DOUBLE_IS_32BITS - d1 = y << ((32 - Ebits) + k) | w >> (Ebits - k); -#endif - goto ret_d; - } - z = xa > xa0 ? *--xa : 0; - if (k -= Ebits) - { - d0 = Exp_1 | y << k | z >> (32 - k); - y = xa > xa0 ? *--xa : 0; -#ifndef _DOUBLE_IS_32BITS - d1 = z << k | y >> (32 - k); -#endif - } - else - { - d0 = Exp_1 | y; -#ifndef _DOUBLE_IS_32BITS - d1 = z; -#endif - } -#else - if (k < Ebits + 16) - { - z = xa > xa0 ? *--xa : 0; - d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k; - w = xa > xa0 ? *--xa : 0; - y = xa > xa0 ? *--xa : 0; - d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k; - goto ret_d; - } - z = xa > xa0 ? *--xa : 0; - w = xa > xa0 ? *--xa : 0; - k -= Ebits + 16; - d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k; - y = xa > xa0 ? *--xa : 0; - d1 = w << k + 16 | y << k; -#endif -ret_d: -#ifdef VAX - word0 (d) = d0 >> 16 | d0 << 16; - word1 (d) = d1 >> 16 | d1 << 16; -#else -#undef d0 -#undef d1 -#endif - return d.d; -} - -_Bigint * -_DEFUN (d2b, - (ptr, _d, e, bits), - struct _reent * ptr _AND - double _d _AND - int *e _AND - int *bits) - -{ - union double_union d; - _Bigint *b; - int de, i, k; - __ULong *x, y, z; -#ifdef VAX - __ULong d0, d1; -#endif - d.d = _d; -#ifdef VAX - d0 = word0 (d) >> 16 | word0 (d) << 16; - d1 = word1 (d) >> 16 | word1 (d) << 16; -#else -#define d0 word0(d) -#define d1 word1(d) - d.d = _d; -#endif - -#ifdef Pack_32 - b = Balloc (ptr, 1); -#else - b = Balloc (ptr, 2); -#endif - x = b->_x; - - z = d0 & Frac_mask; - d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ -#ifdef Sudden_Underflow - de = (int) (d0 >> Exp_shift); -#ifndef IBM - z |= Exp_msk11; -#endif -#else - if ((de = (int) (d0 >> Exp_shift)) != 0) - z |= Exp_msk1; -#endif -#ifdef Pack_32 -#ifndef _DOUBLE_IS_32BITS - if (d1) - { - y = d1; - k = lo0bits (&y); - if (k) - { - x[0] = y | z << (32 - k); - z >>= k; - } - else - x[0] = y; - i = b->_wds = (x[1] = z) ? 2 : 1; - } - else -#endif - { -#ifdef DEBUG - if (!z) - Bug ("Zero passed to d2b"); -#endif - k = lo0bits (&z); - x[0] = z; - i = b->_wds = 1; -#ifndef _DOUBLE_IS_32BITS - k += 32; -#endif - } -#else - if (d1) - { - y = d1; - k = lo0bits (&y); - if (k) - if (k >= 16) - { - x[0] = y | z << 32 - k & 0xffff; - x[1] = z >> k - 16 & 0xffff; - x[2] = z >> k; - i = 2; - } - else - { - x[0] = y & 0xffff; - x[1] = y >> 16 | z << 16 - k & 0xffff; - x[2] = z >> k & 0xffff; - x[3] = z >> k + 16; - i = 3; - } - else - { - x[0] = y & 0xffff; - x[1] = y >> 16; - x[2] = z & 0xffff; - x[3] = z >> 16; - i = 3; - } - } - else - { -#ifdef DEBUG - if (!z) - Bug ("Zero passed to d2b"); -#endif - k = lo0bits (&z); - if (k >= 16) - { - x[0] = z; - i = 0; - } - else - { - x[0] = z & 0xffff; - x[1] = z >> 16; - i = 1; - } - k += 32; - } - while (!x[i]) - --i; - b->_wds = i + 1; -#endif -#ifndef Sudden_Underflow - if (de) - { -#endif -#ifdef IBM - *e = (de - Bias - (P - 1) << 2) + k; - *bits = 4 * P + 8 - k - hi0bits (word0 (d) & Frac_mask); -#else - *e = de - Bias - (P - 1) + k; - *bits = P - k; -#endif -#ifndef Sudden_Underflow - } - else - { - *e = de - Bias - (P - 1) + 1 + k; -#ifdef Pack_32 - *bits = 32 * i - hi0bits (x[i - 1]); -#else - *bits = (i + 2) * 16 - hi0bits (x[i]); -#endif - } -#endif - return b; -} -#undef d0 -#undef d1 - -double -_DEFUN (ratio, (a, b), _Bigint * a _AND _Bigint * b) - -{ - union double_union da, db; - int k, ka, kb; - - da.d = b2d (a, &ka); - db.d = b2d (b, &kb); -#ifdef Pack_32 - k = ka - kb + 32 * (a->_wds - b->_wds); -#else - k = ka - kb + 16 * (a->_wds - b->_wds); -#endif -#ifdef IBM - if (k > 0) - { - word0 (da) += (k >> 2) * Exp_msk1; - if (k &= 3) - da.d *= 1 << k; - } - else - { - k = -k; - word0 (db) += (k >> 2) * Exp_msk1; - if (k &= 3) - db.d *= 1 << k; - } -#else - if (k > 0) - word0 (da) += k * Exp_msk1; - else - { - k = -k; - word0 (db) += k * Exp_msk1; - } -#endif - return da.d / db.d; -} - - -_CONST double - tens[] = -{ - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - 1e20, 1e21, 1e22, 1e23, 1e24 - -}; - -#if !defined(_DOUBLE_IS_32BITS) && !defined(__v800) -_CONST double bigtens[] = -{1e16, 1e32, 1e64, 1e128, 1e256}; - -_CONST double tinytens[] = -{1e-16, 1e-32, 1e-64, 1e-128, 1e-256}; -#else -_CONST double bigtens[] = -{1e16, 1e32}; - -_CONST double tinytens[] = -{1e-16, 1e-32}; -#endif - - -double -_DEFUN (_mprec_log10, (dig), - int dig) -{ - double v = 1.0; - if (dig < 24) - return tens[dig]; - while (dig > 0) - { - v *= 10; - dig--; - } - return v; -} - -void -_DEFUN (copybits, (c, n, b), - __ULong *c _AND - int n _AND - _Bigint *b) -{ - __ULong *ce, *x, *xe; -#ifdef Pack_16 - int nw, nw1; -#endif - - ce = c + ((n-1) >> kshift) + 1; - x = b->_x; -#ifdef Pack_32 - xe = x + b->_wds; - while(x < xe) - *c++ = *x++; -#else - nw = b->_wds; - nw1 = nw & 1; - for(xe = x + (nw - nw1); x < xe; x += 2) - Storeinc(c, x[1], x[0]); - if (nw1) - *c++ = *x; -#endif - while(c < ce) - *c++ = 0; -} - -__ULong -_DEFUN (any_on, (b, k), - _Bigint *b _AND - int k) -{ - int n, nwds; - __ULong *x, *x0, x1, x2; - - x = b->_x; - nwds = b->_wds; - n = k >> kshift; - if (n > nwds) - n = nwds; - else if (n < nwds && (k &= kmask)) { - x1 = x2 = x[n]; - x1 >>= k; - x1 <<= k; - if (x1 != x2) - return 1; - } - x0 = x; - x += n; - while(x > x0) - if (*--x) - return 1; - return 0; -} - diff --git a/newlib/libc/stdlib/mprec.h b/newlib/libc/stdlib/mprec.h deleted file mode 100644 index dea89bf11..000000000 --- a/newlib/libc/stdlib/mprec.h +++ /dev/null @@ -1,415 +0,0 @@ -/**************************************************************** - * - * The author of this software is David M. Gay. - * - * Copyright (c) 1991 by AT&T. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - ***************************************************************/ - -/* Please send bug reports to - David M. Gay - AT&T Bell Laboratories, Room 2C-463 - 600 Mountain Avenue - Murray Hill, NJ 07974-2070 - U.S.A. - dmg@research.att.com or research!dmg - */ - -#include <ieeefp.h> -#include <math.h> -#include <float.h> -#include <errno.h> -#include <sys/config.h> -#include <sys/types.h> - -#ifdef __IEEE_LITTLE_ENDIAN -#define IEEE_8087 -#endif - -#ifdef __IEEE_BIG_ENDIAN -#define IEEE_MC68k -#endif - -#ifdef __Z8000__ -#define Just_16 -#endif - -#ifdef DEBUG -#include "stdio.h" -#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} -#endif - -#ifdef Unsigned_Shifts -#define Sign_Extend(a,b) if (b < 0) a |= (__uint32_t)0xffff0000; -#else -#define Sign_Extend(a,b) /*no-op*/ -#endif - -#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1 -Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined. -#endif - -/* If we are going to examine or modify specific bits in a double using - the word0 and/or word1 macros, then we must wrap the double inside - a union. This is necessary to avoid undefined behavior according to - the ANSI C spec. */ -union double_union -{ - double d; - __uint32_t i[2]; -}; - -#ifdef IEEE_8087 -#define word0(x) (x.i[1]) -#define word1(x) (x.i[0]) -#else -#define word0(x) (x.i[0]) -#define word1(x) (x.i[1]) -#endif - -/* The following is taken from gdtoaimp.h for use with new strtod, but - adjusted to avoid invalid type-punning. */ -typedef __int32_t Long; - -/* Unfortunately, because __ULong might be a different type than - __uint32_t, we can't re-use union double_union as-is without - further edits in strtod.c. */ -typedef union { double d; __ULong i[2]; } U; - -#define dword0(x) word0(x) -#define dword1(x) word1(x) -#define dval(x) (x.d) - -#undef SI -#ifdef Sudden_Underflow -#define SI 1 -#else -#define SI 0 -#endif - -#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | (c) & 0xffff) - -/* #define P DBL_MANT_DIG */ -/* Ten_pmax = floor(P*log(2)/log(5)) */ -/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */ -/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */ -/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */ - -#if defined(IEEE_8087) + defined(IEEE_MC68k) -#if defined (_DOUBLE_IS_32BITS) -#define Exp_shift 23 -#define Exp_shift1 23 -#define Exp_msk1 ((__uint32_t)0x00800000L) -#define Exp_msk11 ((__uint32_t)0x00800000L) -#define Exp_mask ((__uint32_t)0x7f800000L) -#define P 24 -#define Bias 127 -#define NO_HEX_FP /* not supported in this case */ -#define IEEE_Arith -#define Emin (-126) -#define Exp_1 ((__uint32_t)0x3f800000L) -#define Exp_11 ((__uint32_t)0x3f800000L) -#define Ebits 8 -#define Frac_mask ((__uint32_t)0x007fffffL) -#define Frac_mask1 ((__uint32_t)0x007fffffL) -#define Ten_pmax 10 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Ten_pmax 10 -#define Bletch 2 -#define Bndry_mask ((__uint32_t)0x007fffffL) -#define Bndry_mask1 ((__uint32_t)0x007fffffL) -#define LSB 1 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Log2P 1 -#define Tiny0 0 -#define Tiny1 1 -#define Quick_max 5 -#define Int_max 6 -#define Infinite(x) (word0(x) == ((__uint32_t)0x7f800000L)) -#undef word0 -#undef word1 -#undef dword0 -#undef dword1 - -#define word0(x) (x.i[0]) -#define word1(x) 0 -#define dword0(x) word0(x) -#define dword1(x) 0 -#else - -#define Exp_shift 20 -#define Exp_shift1 20 -#define Exp_msk1 ((__uint32_t)0x100000L) -#define Exp_msk11 ((__uint32_t)0x100000L) -#define Exp_mask ((__uint32_t)0x7ff00000L) -#define P 53 -#define Bias 1023 -#define IEEE_Arith -#define Emin (-1022) -#define Exp_1 ((__uint32_t)0x3ff00000L) -#define Exp_11 ((__uint32_t)0x3ff00000L) -#define Ebits 11 -#define Frac_mask ((__uint32_t)0xfffffL) -#define Frac_mask1 ((__uint32_t)0xfffffL) -#define Ten_pmax 22 -#define Bletch 0x10 -#define Bndry_mask ((__uint32_t)0xfffffL) -#define Bndry_mask1 ((__uint32_t)0xfffffL) -#define LSB 1 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Log2P 1 -#define Tiny0 0 -#define Tiny1 1 -#define Quick_max 14 -#define Int_max 14 -#define Infinite(x) (word0(x) == ((__uint32_t)0x7ff00000L)) /* sufficient test for here */ - -#endif /* !_DOUBLE_IS_32BITS */ - -#ifndef Flt_Rounds -#ifdef FLT_ROUNDS -#define Flt_Rounds FLT_ROUNDS -#else -#define Flt_Rounds 1 -#endif -#endif /*Flt_Rounds*/ - -#else /* !IEEE_8087 && !IEEE_MC68k */ -#undef Sudden_Underflow -#define Sudden_Underflow -#ifdef IBM -#define Flt_Rounds 0 -#define Exp_shift 24 -#define Exp_shift1 24 -#define Exp_msk1 ((__uint32_t)0x1000000L) -#define Exp_msk11 ((__uint32_t)0x1000000L) -#define Exp_mask ((__uint32_t)0x7f000000L) -#define P 14 -#define Bias 65 -#define Exp_1 ((__uint32_t)0x41000000L) -#define Exp_11 ((__uint32_t)0x41000000L) -#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */ -#define Frac_mask ((__uint32_t)0xffffffL) -#define Frac_mask1 ((__uint32_t)0xffffffL) -#define Bletch 4 -#define Ten_pmax 22 -#define Bndry_mask ((__uint32_t)0xefffffL) -#define Bndry_mask1 ((__uint32_t)0xffffffL) -#define LSB 1 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Log2P 4 -#define Tiny0 ((__uint32_t)0x100000L) -#define Tiny1 0 -#define Quick_max 14 -#define Int_max 15 -#else /* VAX */ -#define Flt_Rounds 1 -#define Exp_shift 23 -#define Exp_shift1 7 -#define Exp_msk1 0x80 -#define Exp_msk11 ((__uint32_t)0x800000L) -#define Exp_mask ((__uint32_t)0x7f80L) -#define P 56 -#define Bias 129 -#define Exp_1 ((__uint32_t)0x40800000L) -#define Exp_11 ((__uint32_t)0x4080L) -#define Ebits 8 -#define Frac_mask ((__uint32_t)0x7fffffL) -#define Frac_mask1 ((__uint32_t)0xffff007fL) -#define Ten_pmax 24 -#define Bletch 2 -#define Bndry_mask ((__uint32_t)0xffff007fL) -#define Bndry_mask1 ((__uint32_t)0xffff007fL) -#define LSB ((__uint32_t)0x10000L) -#define Sign_bit ((__uint32_t)0x8000L) -#define Log2P 1 -#define Tiny0 0x80 -#define Tiny1 0 -#define Quick_max 15 -#define Int_max 15 -#endif -#endif - -#ifndef IEEE_Arith -#define ROUND_BIASED -#else -#define Scale_Bit 0x10 -#if defined(_DOUBLE_IS_32BITS) && defined(__v800) -#define n_bigtens 2 -#else -#define n_bigtens 5 -#endif -#endif - -#ifdef IBM -#define n_bigtens 3 -#endif - -#ifdef VAX -#define n_bigtens 2 -#endif - -#ifndef __NO_INFNAN_CHECK -#define INFNAN_CHECK -#endif - -/* - * NAN_WORD0 and NAN_WORD1 are only referenced in strtod.c. Prior to - * 20050115, they used to be hard-wired here (to 0x7ff80000 and 0, - * respectively), but now are determined by compiling and running - * qnan.c to generate gd_qnan.h, which specifies d_QNAN0 and d_QNAN1. - * Formerly gdtoaimp.h recommended supplying suitable -DNAN_WORD0=... - * and -DNAN_WORD1=... values if necessary. This should still work. - * (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.) - */ -#ifdef IEEE_Arith -#ifdef IEEE_MC68k -#define _0 0 -#define _1 1 -#ifndef NAN_WORD0 -#define NAN_WORD0 d_QNAN0 -#endif -#ifndef NAN_WORD1 -#define NAN_WORD1 d_QNAN1 -#endif -#else -#define _0 1 -#define _1 0 -#ifndef NAN_WORD0 -#define NAN_WORD0 d_QNAN1 -#endif -#ifndef NAN_WORD1 -#define NAN_WORD1 d_QNAN0 -#endif -#endif -#else -#undef INFNAN_CHECK -#endif - -#ifdef RND_PRODQUOT -#define rounded_product(a,b) a = rnd_prod(a, b) -#define rounded_quotient(a,b) a = rnd_quot(a, b) -#ifdef KR_headers -extern double rnd_prod(), rnd_quot(); -#else -extern double rnd_prod(double, double), rnd_quot(double, double); -#endif -#else -#define rounded_product(a,b) a *= b -#define rounded_quotient(a,b) a /= b -#endif - -#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) -#define Big1 ((__uint32_t)0xffffffffL) - -#ifndef Just_16 -/* When Pack_32 is not defined, we store 16 bits per 32-bit long. - * This makes some inner loops simpler and sometimes saves work - * during multiplications, but it often seems to make things slightly - * slower. Hence the default is now to store 32 bits per long. - */ - - #ifndef Pack_32 - #define Pack_32 - #endif -#else /* Just_16 */ - #ifndef Pack_16 - #define Pack_16 - #endif -#endif /* Just_16 */ - -#ifdef Pack_32 -#define ULbits 32 -#define kshift 5 -#define kmask 31 -#define ALL_ON 0xffffffff -#else -#define ULbits 16 -#define kshift 4 -#define kmask 15 -#define ALL_ON 0xffff -#endif - -#ifdef __cplusplus -extern "C" double strtod(const char *s00, char **se); -extern "C" char *dtoa(double d, int mode, int ndigits, - int *decpt, int *sign, char **rve); -#endif - - -typedef struct _Bigint _Bigint; - -#define Balloc _Balloc -#define Bfree _Bfree -#define multadd __multadd -#define s2b __s2b -#define lo0bits __lo0bits -#define hi0bits __hi0bits -#define i2b __i2b -#define mult __multiply -#define pow5mult __pow5mult -#define lshift __lshift -#define cmp __mcmp -#define diff __mdiff -#define ulp __ulp -#define b2d __b2d -#define d2b __d2b -#define ratio __ratio -#define any_on __any_on -#define gethex __gethex -#define copybits __copybits -#define hexnan __hexnan -#define hexdig_init __hexdig_init - -#define hexdig __hexdig - -#define tens __mprec_tens -#define bigtens __mprec_bigtens -#define tinytens __mprec_tinytens - -struct _reent ; -struct FPI; -double _EXFUN(ulp,(double x)); -double _EXFUN(b2d,(_Bigint *a , int *e)); -_Bigint * _EXFUN(Balloc,(struct _reent *p, int k)); -void _EXFUN(Bfree,(struct _reent *p, _Bigint *v)); -_Bigint * _EXFUN(multadd,(struct _reent *p, _Bigint *, int, int)); -_Bigint * _EXFUN(s2b,(struct _reent *, const char*, int, int, __ULong)); -_Bigint * _EXFUN(i2b,(struct _reent *,int)); -_Bigint * _EXFUN(mult, (struct _reent *, _Bigint *, _Bigint *)); -_Bigint * _EXFUN(pow5mult, (struct _reent *, _Bigint *, int k)); -int _EXFUN(hi0bits,(__ULong)); -int _EXFUN(lo0bits,(__ULong *)); -_Bigint * _EXFUN(d2b,(struct _reent *p, double d, int *e, int *bits)); -_Bigint * _EXFUN(lshift,(struct _reent *p, _Bigint *b, int k)); -_Bigint * _EXFUN(diff,(struct _reent *p, _Bigint *a, _Bigint *b)); -int _EXFUN(cmp,(_Bigint *a, _Bigint *b)); -int _EXFUN(gethex,(struct _reent *p, _CONST char **sp, struct FPI *fpi, Long *exp, _Bigint **bp, int sign)); -double _EXFUN(ratio,(_Bigint *a, _Bigint *b)); -__ULong _EXFUN(any_on,(_Bigint *b, int k)); -void _EXFUN(copybits,(__ULong *c, int n, _Bigint *b)); -void _EXFUN(hexdig_init,(void)); -#ifdef INFNAN_CHECK -int _EXFUN(hexnan,(_CONST char **sp, struct FPI *fpi, __ULong *x0)); -#endif - -#define Bcopy(x,y) memcpy((char *)&x->_sign, (char *)&y->_sign, y->_wds*sizeof(__Long) + 2*sizeof(int)) - -extern _CONST double tinytens[]; -extern _CONST double bigtens[]; -extern _CONST double tens[]; -extern unsigned char hexdig[]; - - -double _EXFUN(_mprec_log10,(int)); diff --git a/newlib/libc/stdlib/mrand48.c b/newlib/libc/stdlib/mrand48.c deleted file mode 100644 index 28f4f7d2b..000000000 --- a/newlib/libc/stdlib/mrand48.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -long -_DEFUN (_mrand48_r, (r), - struct _reent *r) -{ - _REENT_CHECK_RAND48(r); - __dorand48(r, __rand48_seed); - return ((long) __rand48_seed[2] << 16) + (long) __rand48_seed[1]; -} - -#ifndef _REENT_ONLY -long -_DEFUN_VOID (mrand48) -{ - return _mrand48_r (_REENT); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/msize.c b/newlib/libc/stdlib/msize.c deleted file mode 100644 index e33e4aa37..000000000 --- a/newlib/libc/stdlib/msize.c +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef MALLOC_PROVIDED -/* msize.c -- a wrapper for malloc_usable_size. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdlib.h> -#include <malloc.h> - -#ifndef _REENT_ONLY - -size_t -_DEFUN (malloc_usable_size, (ptr), - _PTR ptr) -{ - return _malloc_usable_size_r (_REENT, ptr); -} - -#endif -#endif diff --git a/newlib/libc/stdlib/mstats.c b/newlib/libc/stdlib/mstats.c deleted file mode 100644 index ba89f494d..000000000 --- a/newlib/libc/stdlib/mstats.c +++ /dev/null @@ -1,160 +0,0 @@ -/* VxWorks provides its own version of malloc, and we can't use this - one because VxWorks does not provide sbrk. So we have a hook to - not compile this code. */ - -#ifdef MALLOC_PROVIDED - -int _dummy_mstats = 1; - -#else - -/* -FUNCTION -<<mallinfo>>, <<malloc_stats>>, <<mallopt>>---malloc support - -INDEX - mallinfo -INDEX - malloc_stats -INDEX - mallopt -INDEX - _mallinfo_r -INDEX - _malloc_stats_r -INDEX - _mallopt_r - -ANSI_SYNOPSIS - #include <malloc.h> - struct mallinfo mallinfo(void); - void malloc_stats(void); - int mallopt(int <[parameter]>, <[value]>); - - struct mallinfo _mallinfo_r(void *<[reent]>); - void _malloc_stats_r(void *<[reent]>); - int _mallopt_r(void *<[reent]>, int <[parameter]>, <[value]>); - -TRAD_SYNOPSIS - #include <malloc.h> - struct mallinfo mallinfo(); - - void malloc_stats(); - - int mallopt(<[parameter]>, <[value]>) - int <[parameter]>; - int <[value]>; - - struct mallinfo _mallinfo_r(<[reent]>); - char *<[reent]>; - - void _malloc_stats_r(<[reent]>); - char *<[reent]>; - - int _mallopt_r(<[reent]>, <[parameter]>, <[value]>) - char *<[reent]>; - int <[parameter]>; - int <[value]>; - -DESCRIPTION -<<mallinfo>> returns a structure describing the current state of -memory allocation. The structure is defined in malloc.h. The -following fields are defined: <<arena>> is the total amount of space -in the heap; <<ordblks>> is the number of chunks which are not in use; -<<uordblks>> is the total amount of space allocated by <<malloc>>; -<<fordblks>> is the total amount of space not in use; <<keepcost>> is -the size of the top most memory block. - -<<malloc_stats>> print some statistics about memory allocation on -standard error. - -<<mallopt>> takes a parameter and a value. The parameters are defined -in malloc.h, and may be one of the following: <<M_TRIM_THRESHOLD>> -sets the maximum amount of unused space in the top most block before -releasing it back to the system in <<free>> (the space is released by -calling <<_sbrk_r>> with a negative argument); <<M_TOP_PAD>> is the -amount of padding to allocate whenever <<_sbrk_r>> is called to -allocate more space. - -The alternate functions <<_mallinfo_r>>, <<_malloc_stats_r>>, and -<<_mallopt_r>> are reentrant versions. The extra argument <[reent]> -is a pointer to a reentrancy structure. - -RETURNS -<<mallinfo>> returns a mallinfo structure. The structure is defined -in malloc.h. - -<<malloc_stats>> does not return a result. - -<<mallopt>> returns zero if the parameter could not be set, or -non-zero if it could be set. - -PORTABILITY -<<mallinfo>> and <<mallopt>> are provided by SVR4, but <<mallopt>> -takes different parameters on different systems. <<malloc_stats>> is -not portable. - -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdlib.h> -#include <malloc.h> -#include <stdio.h> - -#ifndef _REENT_ONLY - -struct mallinfo -_DEFUN_VOID (mallinfo) -{ - return _mallinfo_r (_REENT); -} - -#if !defined (_ELIX_LEVEL) || _ELIX_LEVEL >= 2 -void -_DEFUN_VOID (malloc_stats) -{ - _malloc_stats_r (_REENT); -} - -int -_DEFUN (mallopt, (p, v), - int p _AND - int v) -{ - return _mallopt_r (_REENT, p, v); -} - -#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 2 */ - -#endif - -#if !defined (_ELIX_LEVEL) || _ELIX_LEVEL >= 2 - -/* mstats is now compatibility code. It used to be real, for a - previous version of the malloc routines. It now just calls - malloc_stats. */ - -void -_DEFUN (_mstats_r, (ptr, s), - struct _reent *ptr _AND - char *s) -{ - _REENT_SMALL_CHECK_INIT(ptr); - fiprintf (_stderr_r (ptr), "Memory allocation statistics %s\n", s); - _malloc_stats_r (ptr); -} - -#ifndef _REENT_ONLY -void -_DEFUN (mstats, (s), - char *s) -{ - _mstats_r (_REENT, s); -} - -#endif - -#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 2 */ - -#endif /* ! defined (MALLOC_PROVIDED) */ diff --git a/newlib/libc/stdlib/mtrim.c b/newlib/libc/stdlib/mtrim.c deleted file mode 100644 index 328eb715e..000000000 --- a/newlib/libc/stdlib/mtrim.c +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef MALLOC_PROVIDED -/* mtrim.c -- a wrapper for malloc_trim. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdlib.h> -#include <malloc.h> - -#ifndef _REENT_ONLY - -int -_DEFUN (malloc_trim, (pad), - size_t pad) -{ - return _malloc_trim_r (_REENT, pad); -} - -#endif -#endif diff --git a/newlib/libc/stdlib/nrand48.c b/newlib/libc/stdlib/nrand48.c deleted file mode 100644 index 39e9fb13c..000000000 --- a/newlib/libc/stdlib/nrand48.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -long -_DEFUN (_nrand48_r, (r, xseed), - struct _reent *r _AND - unsigned short xseed[3]) -{ - __dorand48 (r, xseed); - return (long)((unsigned long) xseed[2] << 15) + - ((unsigned long) xseed[1] >> 1); -} - -#ifndef _REENT_ONLY -long -_DEFUN (nrand48, (xseed), - unsigned short xseed[3]) -{ - return _nrand48_r (_REENT, xseed); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/on_exit.c b/newlib/libc/stdlib/on_exit.c deleted file mode 100644 index 3ac7f998b..000000000 --- a/newlib/libc/stdlib/on_exit.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * %sccs.include.redist.c% - * - * This function is a modified version of atexit.c - */ - -/* -FUNCTION -<<on_exit>>---request execution of function with argument at program exit - -INDEX - on_exit - -ANSI_SYNOPSIS - #include <stdlib.h> - int on_exit (void (*<[function]>)(int, void *), void *<[arg]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int on_exit ((<[function]>, <[arg]>) - void (*<[function]>)(int, void *); - void *<[arg]>; - -DESCRIPTION -You can use <<on_exit>> to enroll functions in a list of functions that -will be called when your program terminates normally. The argument is -a pointer to a user-defined function which takes two arguments. The -first is the status code passed to exit and the second argument is of type -pointer to void. The function must not return a result. The value -of <[arg]> is registered and passed as the argument to <[function]>. - -The functions are kept in a LIFO stack; that is, the last function -enrolled by <<atexit>> or <<on_exit>> will be the first to execute when -your program exits. You can intermix functions using <<atexit>> and -<<on_exit>>. - -There is no built-in limit to the number of functions you can enroll -in this list; however, after every group of 32 functions is enrolled, -<<atexit>>/<<on_exit>> will call <<malloc>> to get space for the next part -of the list. The initial list of 32 functions is statically allocated, so -you can always count on at least that many slots available. - -RETURNS -<<on_exit>> returns <<0>> if it succeeds in enrolling your function, -<<-1>> if it fails (possible only if no space was available for -<<malloc>> to extend the list of functions). - -PORTABILITY -<<on_exit>> is a non-standard glibc extension - -Supporting OS subroutines required: None -*/ - -#include <stddef.h> -#include <stdlib.h> -#include "atexit.h" - -/* - * Register a function to be performed at exit. - */ - -int -_DEFUN (on_exit, - (fn, arg), - _VOID _EXFUN ((*fn), (int, _PTR)) _AND - _PTR arg) -{ - return __register_exitproc (__et_onexit, (void (*)(void)) fn, arg, NULL); -} diff --git a/newlib/libc/stdlib/putenv.c b/newlib/libc/stdlib/putenv.c deleted file mode 100644 index 978f7c5d6..000000000 --- a/newlib/libc/stdlib/putenv.c +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * Copyright (c) 1988 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef _REENT_ONLY - -#include <stdlib.h> -#include <string.h> - -int -_DEFUN (putenv, (str), - char *str) -{ - return _putenv_r (_REENT, str); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/putenv_r.c b/newlib/libc/stdlib/putenv_r.c deleted file mode 100644 index 9ba626025..000000000 --- a/newlib/libc/stdlib/putenv_r.c +++ /dev/null @@ -1,57 +0,0 @@ -/* This file may have been modified by DJ Delorie (Jan 1991). If so, -** these modifications are Copyright (C) 1991 DJ Delorie. -*/ - -/*- - * Copyright (c) 1988 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <reent.h> -#include <stdlib.h> -#include <string.h> - -#include "envlock.h" - -/* _putenv_r - reentrant version of putenv that either adds - or replaces the environment variable "name" - with "value" which is specified by str as "name=value". */ -int -_DEFUN (_putenv_r, (reent_ptr, str), - struct _reent *reent_ptr _AND - char *str) -{ - register char *p, *equal; - int rval; - - p = _strdup_r (reent_ptr, str); - - if (!p) - return 1; - - if (!(equal = index (p, '='))) - { - (void) _free_r (reent_ptr, p); - return 1; - } - - *equal = '\0'; - rval = _setenv_r (reent_ptr, p, equal + 1, 1); - (void) _free_r (reent_ptr, p); - - return rval; -} diff --git a/newlib/libc/stdlib/rand.c b/newlib/libc/stdlib/rand.c deleted file mode 100644 index 131e5cf09..000000000 --- a/newlib/libc/stdlib/rand.c +++ /dev/null @@ -1,91 +0,0 @@ -/* -FUNCTION -<<rand>>, <<srand>>---pseudo-random numbers - -INDEX - rand -INDEX - srand -INDEX - rand_r - -ANSI_SYNOPSIS - #include <stdlib.h> - int rand(void); - void srand(unsigned int <[seed]>); - int rand_r(unsigned int *<[seed]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int rand(); - - void srand(<[seed]>) - unsigned int <[seed]>; - - void rand_r(<[seed]>) - unsigned int *<[seed]>; - - -DESCRIPTION -<<rand>> returns a different integer each time it is called; each -integer is chosen by an algorithm designed to be unpredictable, so -that you can use <<rand>> when you require a random number. -The algorithm depends on a static variable called the ``random seed''; -starting with a given value of the random seed always produces the -same sequence of numbers in successive calls to <<rand>>. - -You can set the random seed using <<srand>>; it does nothing beyond -storing its argument in the static variable used by <<rand>>. You can -exploit this to make the pseudo-random sequence less predictable, if -you wish, by using some other unpredictable value (often the least -significant parts of a time-varying value) as the random seed before -beginning a sequence of calls to <<rand>>; or, if you wish to ensure -(for example, while debugging) that successive runs of your program -use the same ``random'' numbers, you can use <<srand>> to set the same -random seed at the outset. - -RETURNS -<<rand>> returns the next pseudo-random integer in sequence; it is a -number between <<0>> and <<RAND_MAX>> (inclusive). - -<<srand>> does not return a result. - -NOTES -<<rand>> and <<srand>> are unsafe for multi-threaded applications. -<<rand_r>> is thread-safe and should be used instead. - - -PORTABILITY -<<rand>> is required by ANSI, but the algorithm for pseudo-random -number generation is not specified; therefore, even if you use -the same random seed, you cannot expect the same sequence of results -on two different systems. - -<<rand>> requires no supporting OS subroutines. -*/ - -#ifndef _REENT_ONLY - -#include <stdlib.h> -#include <reent.h> - -void -_DEFUN (srand, (seed), unsigned int seed) -{ - _REENT_CHECK_RAND48(_REENT); - _REENT_RAND_NEXT(_REENT) = seed; -} - -int -_DEFUN_VOID (rand) -{ - /* This multiplier was obtained from Knuth, D.E., "The Art of - Computer Programming," Vol 2, Seminumerical Algorithms, Third - Edition, Addison-Wesley, 1998, p. 106 (line 26) & p. 108 */ - _REENT_CHECK_RAND48(_REENT); - _REENT_RAND_NEXT(_REENT) = - _REENT_RAND_NEXT(_REENT) * __extension__ 6364136223846793005LL + 1; - return (int)((_REENT_RAND_NEXT(_REENT) >> 32) & RAND_MAX); -} - -#endif /* _REENT_ONLY */ diff --git a/newlib/libc/stdlib/rand48.c b/newlib/libc/stdlib/rand48.c deleted file mode 100644 index af2be3c07..000000000 --- a/newlib/libc/stdlib/rand48.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -/* -FUNCTION - <<rand48>>, <<drand48>>, <<erand48>>, <<lrand48>>, <<nrand48>>, <<mrand48>>, <<jrand48>>, <<srand48>>, <<seed48>>, <<lcong48>>---pseudo-random number generators and initialization routines - -INDEX - rand48 -INDEX - drand48 -INDEX - erand48 -INDEX - lrand48 -INDEX - nrand48 -INDEX - mrand48 -INDEX - jrand48 -INDEX - srand48 -INDEX - seed48 -INDEX - lcong48 - -ANSI_SYNOPSIS - #include <stdlib.h> - double drand48(void); - double erand48(unsigned short <[xseed]>[3]); - long lrand48(void); - long nrand48(unsigned short <[xseed]>[3]); - long mrand48(void); - long jrand48(unsigned short <[xseed]>[3]); - void srand48(long <[seed]>); - unsigned short *seed48(unsigned short <[xseed]>[3]); - void lcong48(unsigned short <[p]>[7]); - -TRAD_SYNOPSIS - #include <stdlib.h> - double drand48(); - - double erand48(<[xseed]>) - unsigned short <[xseed]>[3]; - - long lrand48(); - - long nrand48(<[xseed]>) - unsigned short <[xseed]>[3]; - - long mrand48(); - - long jrand48(<[xseed]>) - unsigned short <[xseed]>[3]; - - void srand48(<[seed]>) - long <[seed]>; - - unsigned short *seed48(<[xseed]>) - unsigned short <[xseed]>[3]; - - void lcong48(<[p]>) - unsigned short <[p]>[7]; - -DESCRIPTION -The <<rand48>> family of functions generates pseudo-random numbers -using a linear congruential algorithm working on integers 48 bits in size. -The particular formula employed is -r(n+1) = (a * r(n) + c) mod m -where the default values are -for the multiplicand a = 0xfdeece66d = 25214903917 and -the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48. -r(n) is called the seed of the random number generator. - -For all the six generator routines described next, the first -computational step is to perform a single iteration of the algorithm. - -<<drand48>> and <<erand48>> -return values of type double. The full 48 bits of r(n+1) are -loaded into the mantissa of the returned value, with the exponent set -such that the values produced lie in the interval [0.0, 1.0]. - -<<lrand48>> and <<nrand48>> -return values of type long in the range -[0, 2**31-1]. The high-order (31) bits of -r(n+1) are loaded into the lower bits of the returned value, with -the topmost (sign) bit set to zero. - -<<mrand48>> and <<jrand48>> -return values of type long in the range -[-2**31, 2**31-1]. The high-order (32) bits of -r(n+1) are loaded into the returned value. - -<<drand48>>, <<lrand48>>, and <<mrand48>> -use an internal buffer to store r(n). For these functions -the initial value of r(0) = 0x1234abcd330e = 20017429951246. - -On the other hand, <<erand48>>, <<nrand48>>, and <<jrand48>> -use a user-supplied buffer to store the seed r(n), -which consists of an array of 3 shorts, where the zeroth member -holds the least significant bits. - -All functions share the same multiplicand and addend. - -<<srand48>> is used to initialize the internal buffer r(n) of -<<drand48>>, <<lrand48>>, and <<mrand48>> -such that the 32 bits of the seed value are copied into the upper 32 bits -of r(n), with the lower 16 bits of r(n) arbitrarily being set to 0x330e. -Additionally, the constant multiplicand and addend of the algorithm are -reset to the default values given above. - -<<seed48>> also initializes the internal buffer r(n) of -<<drand48>>, <<lrand48>>, and <<mrand48>>, -but here all 48 bits of the seed can be specified in an array of 3 shorts, -where the zeroth member specifies the lowest bits. Again, -the constant multiplicand and addend of the algorithm are -reset to the default values given above. -<<seed48>> returns a pointer to an array of 3 shorts which contains -the old seed. -This array is statically allocated, thus its contents are lost after -each new call to <<seed48>>. - -Finally, <<lcong48>> allows full control over the multiplicand and -addend used in <<drand48>>, <<erand48>>, <<lrand48>>, <<nrand48>>, -<<mrand48>>, and <<jrand48>>, -and the seed used in <<drand48>>, <<lrand48>>, and <<mrand48>>. -An array of 7 shorts is passed as parameter; the first three shorts are -used to initialize the seed; the second three are used to initialize the -multiplicand; and the last short is used to initialize the addend. -It is thus not possible to use values greater than 0xffff as the addend. - -Note that all three methods of seeding the random number generator -always also set the multiplicand and addend for any of the six -generator calls. - -For a more powerful random number generator, see <<random>>. - -PORTABILITY -SUS requires these functions. - -No supporting OS subroutines are required. -*/ - -#include "rand48.h" - -void -_DEFUN (__dorand48, (r, xseed), - struct _reent *r _AND - unsigned short xseed[3]) -{ - unsigned long accu; - unsigned short temp[2]; - - _REENT_CHECK_RAND48(r); - accu = (unsigned long) __rand48_mult[0] * (unsigned long) xseed[0] + - (unsigned long) __rand48_add; - temp[0] = (unsigned short) accu; /* lower 16 bits */ - accu >>= sizeof(unsigned short) * 8; - accu += (unsigned long) __rand48_mult[0] * (unsigned long) xseed[1] + - (unsigned long) __rand48_mult[1] * (unsigned long) xseed[0]; - temp[1] = (unsigned short) accu; /* middle 16 bits */ - accu >>= sizeof(unsigned short) * 8; - accu += __rand48_mult[0] * xseed[2] + __rand48_mult[1] * xseed[1] + __rand48_mult[2] * xseed[0]; - xseed[0] = temp[0]; - xseed[1] = temp[1]; - xseed[2] = (unsigned short) accu; -} diff --git a/newlib/libc/stdlib/rand48.h b/newlib/libc/stdlib/rand48.h deleted file mode 100644 index a6cb479ef..000000000 --- a/newlib/libc/stdlib/rand48.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#ifndef _RAND48_H_ -#define _RAND48_H_ - -#include <math.h> -#include <stdlib.h> - -extern void _EXFUN(__dorand48,(struct _reent *r, unsigned short[3])); -#define __rand48_seed _REENT_RAND48_SEED(r) -#define __rand48_mult _REENT_RAND48_MULT(r) -#define __rand48_add _REENT_RAND48_ADD(r) - -#if 0 -/* following values are defined in <sys/reent.h> */ -#define RAND48_SEED_0 (0x330e) -#define RAND48_SEED_1 (0xabcd) -#define RAND48_SEED_2 (0x1234) -#define RAND48_MULT_0 (0xe66d) -#define RAND48_MULT_1 (0xdeec) -#define RAND48_MULT_2 (0x0005) -#define RAND48_ADD (0x000b) -#endif - -#endif /* _RAND48_H_ */ diff --git a/newlib/libc/stdlib/rand_r.c b/newlib/libc/stdlib/rand_r.c deleted file mode 100644 index 437739ef5..000000000 --- a/newlib/libc/stdlib/rand_r.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <stdlib.h> - -/* Pseudo-random generator based on Minimal Standard by - Lewis, Goodman, and Miller in 1969. - - I[j+1] = a*I[j] (mod m) - - where a = 16807 - m = 2147483647 - - Using Schrage's algorithm, a*I[j] (mod m) can be rewritten as: - - a*(I[j] mod q) - r*{I[j]/q} if >= 0 - a*(I[j] mod q) - r*{I[j]/q} + m otherwise - - where: {} denotes integer division - q = {m/a} = 127773 - r = m (mod a) = 2836 - - note that the seed value of 0 cannot be used in the calculation as - it results in 0 itself -*/ - -int -_DEFUN (rand_r, (seed), unsigned int *seed) -{ - long k; - long s = (long)(*seed); - if (s == 0) - s = 0x12345987; - k = s / 127773; - s = 16807 * (s - k * 127773) - 2836 * k; - if (s < 0) - s += 2147483647; - (*seed) = (unsigned int)s; - return (int)(s & RAND_MAX); -} diff --git a/newlib/libc/stdlib/realloc.c b/newlib/libc/stdlib/realloc.c deleted file mode 100644 index 2caa6e4d2..000000000 --- a/newlib/libc/stdlib/realloc.c +++ /dev/null @@ -1,22 +0,0 @@ -#ifdef MALLOC_PROVIDED -int _dummy_calloc = 1; -#else -/* realloc.c -- a wrapper for realloc_r. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdlib.h> -#include <malloc.h> - -#ifndef _REENT_ONLY - -_PTR -_DEFUN (realloc, (ap, nbytes), - _PTR ap _AND - size_t nbytes) -{ - return _realloc_r (_REENT, ap, nbytes); -} - -#endif -#endif /* MALLOC_PROVIDED */ diff --git a/newlib/libc/stdlib/reallocf.c b/newlib/libc/stdlib/reallocf.c deleted file mode 100644 index a9d329398..000000000 --- a/newlib/libc/stdlib/reallocf.c +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * Copyright (c) 1998, M. Warner Losh <imp@freebsd.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* Documented in malloc.c. */ - -#include <sys/cdefs.h> - -#include <stdlib.h> - -_PTR -_DEFUN (_reallocf_r, (reentptr, ptr, size), - struct _reent *reentptr _AND - _PTR ptr _AND - size_t size) -{ - void *nptr; - - nptr = _realloc_r(reentptr, ptr, size); - if (!nptr && ptr) - _free_r(reentptr, ptr); - return (nptr); -} - -#ifndef _REENT_ONLY -_PTR -_DEFUN (reallocf, (ptr, size), - _PTR ptr _AND - size_t size) -{ - return _reallocf_r(_REENT, ptr, size); -} -#endif diff --git a/newlib/libc/stdlib/sb_charsets.c b/newlib/libc/stdlib/sb_charsets.c deleted file mode 100644 index dce4855d7..000000000 --- a/newlib/libc/stdlib/sb_charsets.c +++ /dev/null @@ -1,737 +0,0 @@ -#include <newlib.h> -#include <wchar.h> - -#ifdef _MB_CAPABLE -extern char *__locale_charset (); - -#ifdef _MB_EXTENDED_CHARSETS_ISO -/* Tables for the ISO-8859-x to UTF conversion. The first index into the - table is a value computed from the value x (function __iso_8859_index), - the second index is the value of the incoming character - 0xa0. - Values < 0xa0 don't have to be converted anyway. */ -wchar_t __iso_8859_conv[14][0x60] = { - /* ISO-8859-2 */ - { 0xa0, 0x104, 0x2d8, 0x141, 0xa4, 0x13d, 0x15a, 0xa7, - 0xa8, 0x160, 0x15e, 0x164, 0x179, 0xad, 0x17d, 0x17b, - 0xb0, 0x105, 0x2db, 0x142, 0xb4, 0x13e, 0x15b, 0x2c7, - 0xb8, 0x161, 0x15f, 0x165, 0x17a, 0x2dd, 0x17e, 0x17c, - 0x154, 0xc1, 0xc2, 0x102, 0xc4, 0x139, 0x106, 0xc7, - 0x10c, 0xc9, 0x118, 0xcb, 0x11a, 0xcd, 0xce, 0x10e, - 0x110, 0x143, 0x147, 0xd3, 0xd4, 0x150, 0xd6, 0xd7, - 0x158, 0x16e, 0xda, 0x170, 0xdc, 0xdd, 0x162, 0xdf, - 0x155, 0xe1, 0xe2, 0x103, 0xe4, 0x13a, 0x107, 0xe7, - 0x10d, 0xe9, 0x119, 0xeb, 0x11b, 0xed, 0xee, 0x10f, - 0x111, 0x144, 0x148, 0xf3, 0xf4, 0x151, 0xf6, 0xf7, - 0x159, 0x16f, 0xfa, 0x171, 0xfc, 0xfd, 0x163, 0x2d9 }, - /* ISO-8859-3 */ - { 0xa0, 0x126, 0x2d8, 0xa3, 0xa4, 0x0, 0x124, 0xa7, - 0xa8, 0x130, 0x15e, 0x11e, 0x134, 0xad, 0x0, 0x17b, - 0xb0, 0x127, 0xb2, 0xb3, 0xb4, 0xb5, 0x125, 0xb7, - 0xb8, 0x131, 0x15f, 0x11f, 0x135, 0xbd, 0x0, 0x17c, - 0xc0, 0xc1, 0xc2, 0x0, 0xc4, 0x10a, 0x108, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0x0, 0xd1, 0xd2, 0xd3, 0xd4, 0x120, 0xd6, 0xd7, - 0x11c, 0xd9, 0xda, 0xdb, 0xdc, 0x16c, 0x15c, 0xdf, - 0xe0, 0xe1, 0xe2, 0x0, 0xe4, 0x10b, 0x109, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x0, 0xf1, 0xf2, 0xf3, 0xf4, 0x121, 0xf6, 0xf7, - 0x11d, 0xf9, 0xfa, 0xfb, 0xfc, 0x16d, 0x15d, 0x2d9 }, - /* ISO-8859-4 */ - { 0xa0, 0x104, 0x138, 0x156, 0xa4, 0x128, 0x13b, 0xa7, - 0xa8, 0x160, 0x112, 0x122, 0x166, 0xad, 0x17d, 0xaf, - 0xb0, 0x105, 0x2db, 0x157, 0xb4, 0x129, 0x13c, 0x2c7, - 0xb8, 0x161, 0x113, 0x123, 0x167, 0x14a, 0x17e, 0x14b, - 0x100, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x12e, - 0x10c, 0xc9, 0x118, 0xcb, 0x116, 0xcd, 0xce, 0x12a, - 0x110, 0x145, 0x14c, 0x136, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0x172, 0xda, 0xdb, 0xdc, 0x168, 0x16a, 0xdf, - 0x101, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x12f, - 0x10d, 0xe9, 0x119, 0xeb, 0x117, 0xed, 0xee, 0x12b, - 0x111, 0x146, 0x14d, 0x137, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0x173, 0xfa, 0xfb, 0xfc, 0x169, 0x16b, 0x2d9 }, - /* ISO-8859-5 */ - { 0xa0, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, - 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0xad, 0x40e, 0x40f, - 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, - 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x41f, - 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, - 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f, - 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, - 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f, - 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, - 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, 0x44e, 0x44f, - 0x2116, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, - 0x458, 0x459, 0x45a, 0x45b, 0x45c, 0xa7, 0x45e, 0x45f }, - /* ISO-8859-6 */ - { 0xa0, 0x0, 0x0, 0x0, 0xa4, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x60c, 0xad, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x61b, 0x0, 0x0, 0x0, 0x61f, - 0x0, 0x621, 0x622, 0x623, 0x624, 0x625, 0x626, 0x627, - 0x628, 0x629, 0x62a, 0x62b, 0x62c, 0x62d, 0x62e, 0x62f, - 0x630, 0x631, 0x632, 0x633, 0x634, 0x635, 0x636, 0x637, - 0x638, 0x639, 0x63a, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x640, 0x641, 0x642, 0x643, 0x644, 0x645, 0x646, 0x647, - 0x648, 0x649, 0x64a, 0x64b, 0x64c, 0x64d, 0x64e, 0x64f, - 0x650, 0x651, 0x652, 0x64b, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }, - /* ISO-8859-7 */ - { 0xa0, 0x2018, 0x2019, 0xa3, 0x20ac, 0x20af, 0xa6, 0xa7, - 0xa8, 0xa9, 0x37a, 0xab, 0xac, 0xad, 0x0, 0x2015, - 0xb0, 0xb1, 0xb2, 0xb3, 0x384, 0x385, 0x386, 0xb7, - 0x388, 0x389, 0x38a, 0xbb, 0x38c, 0xbd, 0x38e, 0x38f, - 0x390, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, - 0x398, 0x399, 0x39a, 0x39b, 0x39c, 0x39d, 0x39e, 0x39f, - 0x3a0, 0x3a1, 0x0, 0x3a3, 0x3a4, 0x3a5, 0x3a6, 0x3a7, - 0x3a8, 0x3a9, 0x3aa, 0x3ab, 0x3ac, 0x3ad, 0x3ae, 0x3af, - 0x3b0, 0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7, - 0x3b8, 0x3b9, 0x3ba, 0x3bb, 0x3bc, 0x3bd, 0x3be, 0x3bf, - 0x3c0, 0x3c1, 0x3c2, 0x3c3, 0x3c4, 0x3c5, 0x3c6, 0x3c7, - 0x3c8, 0x3c9, 0x3ca, 0x3cb, 0x3cc, 0x3cd, 0x3ce, 0xff }, - /* ISO-8859-8 */ - { 0xa0, 0x0, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xd7, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xf7, 0xbb, 0xbc, 0xbd, 0xbe, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2017, - 0x5d0, 0x5d1, 0x5d2, 0x5d3, 0x5d4, 0x5d5, 0x5d6, 0x5d7, - 0x5d8, 0x5d9, 0x5da, 0x5db, 0x5dc, 0x5dd, 0x5de, 0x5df, - 0x5e0, 0x5e1, 0x5e2, 0x5e3, 0x5e4, 0x5e5, 0x5e6, 0x5e7, - 0x5e8, 0x5e9, 0x5ea, 0x0, 0x0, 0x200e, 0x200f, 0x200e }, - /* ISO-8859-9 */ - { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0x11e, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x130, 0x15e, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x11f, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x131, 0x15f, 0xff }, - /* ISO-8859-10 */ - { 0xa0, 0x104, 0x112, 0x122, 0x12a, 0x128, 0x136, 0xa7, - 0x13b, 0x110, 0x160, 0x166, 0x17d, 0xad, 0x16a, 0x14a, - 0xb0, 0x105, 0x113, 0x123, 0x12b, 0x129, 0x137, 0xb7, - 0x13c, 0x111, 0x161, 0x167, 0x17e, 0x2015, 0x16b, 0x14b, - 0x100, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x12e, - 0x10c, 0xc9, 0x118, 0xcb, 0x116, 0xcd, 0xce, 0xcf, - 0xd0, 0x145, 0x14c, 0xd3, 0xd4, 0xd5, 0xd6, 0x168, - 0xd8, 0x172, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0x101, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x12f, - 0x10d, 0xe9, 0x119, 0xeb, 0x117, 0xed, 0xee, 0xef, - 0xf0, 0x146, 0x14d, 0xf3, 0xf4, 0xf5, 0xf6, 0x169, - 0xf8, 0x173, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x138 }, - /* ISO-8859-11 */ - { 0xa0, 0xe01, 0xe02, 0xe03, 0xe04, 0xe05, 0xe06, 0xe07, - 0xe08, 0xe09, 0xe0a, 0xe0b, 0xe0c, 0xe0d, 0xe0e, 0xe0f, - 0xe10, 0xe11, 0xe12, 0xe13, 0xe14, 0xe15, 0xe16, 0xe17, - 0xe18, 0xe19, 0xe1a, 0xe1b, 0xe1c, 0xe1d, 0xe1e, 0xe1f, - 0xe20, 0xe21, 0xe22, 0xe23, 0xe24, 0xe25, 0xe26, 0xe27, - 0xe28, 0xe29, 0xe2a, 0xe2b, 0xe2c, 0xe2d, 0xe2e, 0xe2f, - 0xe30, 0xe31, 0xe32, 0xe33, 0xe34, 0xe35, 0xe36, 0xe37, - 0xe38, 0xe39, 0xe3a, 0x0, 0x0, 0x0, 0x0, 0xe3f, - 0xe40, 0xe41, 0xe42, 0xe43, 0xe44, 0xe45, 0xe46, 0xe47, - 0xe48, 0xe49, 0xe4a, 0xe4b, 0xe4c, 0xe4d, 0xe4e, 0xe4f, - 0xe50, 0xe51, 0xe52, 0xe53, 0xe54, 0xe55, 0xe56, 0xe57, - 0xe58, 0xe59, 0xe5a, 0xe5b, 0xe31, 0xe34, 0xe47, 0xff }, - /* ISO-8859-12 doesn't exist. The below code decrements the index - into the table by one for ISO numbers > 12. */ - /* ISO-8859-13 */ - { 0xa0, 0x201d, 0xa2, 0xa3, 0xa4, 0x201e, 0xa6, 0xa7, - 0xd8, 0xa9, 0x156, 0xab, 0xac, 0xad, 0xae, 0xc6, - 0xb0, 0xb1, 0xb2, 0xb3, 0x201c, 0xb5, 0xb6, 0xb7, - 0xf8, 0xb9, 0x157, 0xbb, 0xbc, 0xbd, 0xbe, 0xe6, - 0x104, 0x12e, 0x100, 0x106, 0xc4, 0xc5, 0x118, 0x112, - 0x10c, 0xc9, 0x179, 0x116, 0x122, 0x136, 0x12a, 0x13b, - 0x160, 0x143, 0x145, 0xd3, 0x14c, 0xd5, 0xd6, 0xd7, - 0x172, 0x141, 0x15a, 0x16a, 0xdc, 0x17b, 0x17d, 0xdf, - 0x105, 0x12f, 0x101, 0x107, 0xe4, 0xe5, 0x119, 0x113, - 0x10d, 0xe9, 0x17a, 0x117, 0x123, 0x137, 0x12b, 0x13c, - 0x161, 0x144, 0x146, 0xf3, 0x14d, 0xf5, 0xf6, 0xf7, - 0x173, 0x142, 0x15b, 0x16b, 0xfc, 0x17c, 0x17e, 0x2019 }, - /* ISO-8859-14 */ - { 0xa0, 0x1e02, 0x1e03, 0xa3, 0x10a, 0x10b, 0x1e0a, 0xa7, - 0x1e80, 0xa9, 0x1e82, 0x1e0b, 0x1ef2, 0xad, 0xae, 0x178, - 0x1e1e, 0x1e1f, 0x120, 0x121, 0x1e40, 0x1e41, 0xb6, 0x1e56, - 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0x174, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x1e6a, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x176, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x175, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x1e6b, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0x177, 0xff }, - /* ISO-8859-15 */ - { 0xa0, 0xa1, 0xa2, 0xa3, 0x20ac, 0xa5, 0x160, 0xa7, - 0x161, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0x17d, 0xb5, 0xb6, 0xb7, - 0x17e, 0xb9, 0xba, 0xbb, 0x152, 0x153, 0x178, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }, - /* ISO-8859-16 */ - { 0xa0, 0x104, 0x105, 0x141, 0x20ac, 0x201e, 0x160, 0xa7, - 0x161, 0xa9, 0x218, 0xab, 0x179, 0xad, 0x17a, 0x17b, - 0xb0, 0xb1, 0x10c, 0x142, 0x17d, 0x201d, 0xb6, 0xb7, - 0x17e, 0x10d, 0x219, 0xbb, 0x152, 0x153, 0x178, 0x17c, - 0xc0, 0xc1, 0xc2, 0x102, 0xc4, 0x106, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0x110, 0x143, 0xd2, 0xd3, 0xd4, 0x150, 0xd6, 0x15a, - 0x170, 0xd9, 0xda, 0xdb, 0xdc, 0x118, 0x21a, 0xdf, - 0xe0, 0xe1, 0xe2, 0x103, 0xe4, 0x107, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x111, 0x144, 0xf2, 0xf3, 0xf4, 0x151, 0xf6, 0x15b, - 0x171, 0xf9, 0xfa, 0xfb, 0xfc, 0x119, 0x21b, 0xff } -}; -#endif /* _MB_EXTENDED_CHARSETS_ISO */ - -#ifdef _MB_EXTENDED_CHARSETS_WINDOWS -/* Tables for the Windows default singlebyte ANSI codepage conversion. - The first index into the table is a value computed from the codepage - value (function __cp_index), the second index is the value of the - incoming character - 0x80. - Values < 0x80 don't have to be converted anyway. */ -wchar_t __cp_conv[24][0x80] = { - /* CP437 */ - { 0xc7, 0xfc, 0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7, - 0xea, 0xeb, 0xe8, 0xef, 0xee, 0xec, 0xc4, 0xc5, - 0xc9, 0xe6, 0xc6, 0xf4, 0xf6, 0xf2, 0xfb, 0xf9, - 0xff, 0xd6, 0xdc, 0xa2, 0xa3, 0xa5, 0x20a7, 0x192, - 0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0xaa, 0xba, - 0xbf, 0x2310, 0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x3b1, 0xdf, 0x393, 0x3c0, 0x3a3, 0x3c3, 0xb5, 0x3c4, - 0x3a6, 0x398, 0x3a9, 0x3b4, 0x221e, 0x3c6, 0x3b5, 0x2229, - 0x2261, 0xb1, 0x2265, 0x2264, 0x2320, 0x2321, 0xf7, 0x2248, - 0xb0, 0x2219, 0xb7, 0x221a, 0x207f, 0xb2, 0x25a0, 0xa0 }, - /* CP720 */ - { 0x0, 0x0, 0xe9, 0xe2, 0x0, 0xe0, 0x0, 0xe7, - 0xea, 0xeb, 0xe8, 0xef, 0xee, 0x0, 0x0, 0x0, - 0x0, 0x651, 0x652, 0xf4, 0xa4, 0x640, 0xfb, 0xf9, - 0x621, 0x622, 0x623, 0x624, 0xa3, 0x625, 0x626, 0x627, - 0x628, 0x629, 0x62a, 0x62b, 0x62c, 0x62d, 0x62e, 0x62f, - 0x630, 0x631, 0x632, 0x633, 0x634, 0x635, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x636, 0x637, 0x638, 0x639, 0x63a, 0x641, 0xb5, 0x642, - 0x643, 0x644, 0x645, 0x646, 0x647, 0x648, 0x649, 0x64a, - 0x2261, 0x64b, 0x64c, 0x64d, 0x64e, 0x64f, 0x650, 0x2248, - 0xb0, 0x2219, 0xb7, 0x221a, 0x207f, 0xb2, 0x25a0, 0xa0 }, - /* CP737 */ - { 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398, - 0x399, 0x39a, 0x39b, 0x39c, 0x39d, 0x39e, 0x39f, 0x3a0, - 0x3a1, 0x3a3, 0x3a4, 0x3a5, 0x3a6, 0x3a7, 0x3a8, 0x3a9, - 0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7, 0x3b8, - 0x3b9, 0x3ba, 0x3bb, 0x3bc, 0x3bd, 0x3be, 0x3bf, 0x3c0, - 0x3c1, 0x3c3, 0x3c2, 0x3c4, 0x3c5, 0x3c6, 0x3c7, 0x3c8, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x3c9, 0x3ac, 0x3ad, 0x3ae, 0x3ca, 0x3af, 0x3cc, 0x3cd, - 0x3cb, 0x3ce, 0x386, 0x388, 0x389, 0x38a, 0x38c, 0x38e, - 0x38f, 0xb1, 0x2265, 0x2264, 0x3aa, 0x3ab, 0xf7, 0x2248, - 0xb0, 0x2219, 0xb7, 0x221a, 0x207f, 0xb2, 0x25a0, 0xa0 }, - /* CP775 */ - { 0x106, 0xfc, 0xe9, 0x101, 0xe4, 0x123, 0xe5, 0x107, - 0x142, 0x113, 0x156, 0x157, 0x12b, 0x179, 0xc4, 0xc5, - 0xc9, 0xe6, 0xc6, 0x14d, 0xf6, 0x122, 0xa2, 0x15a, - 0x15b, 0xd6, 0xdc, 0xf8, 0xa3, 0xd8, 0xd7, 0xa4, - 0x100, 0x12a, 0xf3, 0x17b, 0x17c, 0x17a, 0x201d, 0xa6, - 0xa9, 0xae, 0xac, 0xbd, 0xbc, 0x141, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x104, 0x10c, 0x118, - 0x116, 0x2563, 0x2551, 0x2557, 0x255d, 0x12e, 0x160, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x172, 0x16a, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x17d, - 0x105, 0x10d, 0x119, 0x117, 0x12f, 0x161, 0x173, 0x16b, - 0x17e, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0xd3, 0xdf, 0x14c, 0x143, 0xf5, 0xd5, 0xb5, 0x144, - 0x136, 0x137, 0x13b, 0x13c, 0x146, 0x112, 0x145, 0x2019, - 0xad, 0xb1, 0x201c, 0xbe, 0xb6, 0xa7, 0xf7, 0x201e, - 0xb0, 0x2219, 0xb7, 0xb9, 0xb3, 0xb2, 0x25a0, 0xa0 }, - /* CP850 */ - { 0xc7, 0xfc, 0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7, - 0xea, 0xeb, 0xe8, 0xef, 0xee, 0xec, 0xc4, 0xc5, - 0xc9, 0xe6, 0xc6, 0xf4, 0xf6, 0xf2, 0xfb, 0xf9, - 0xff, 0xd6, 0xdc, 0xf8, 0xa3, 0xd8, 0xd7, 0x192, - 0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0xaa, 0xba, - 0xbf, 0xae, 0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0xc1, 0xc2, 0xc0, - 0xa9, 0x2563, 0x2551, 0x2557, 0x255d, 0xa2, 0xa5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0xe3, 0xc3, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0xa4, - 0xf0, 0xd0, 0xca, 0xcb, 0xc8, 0x131, 0xcd, 0xce, - 0xcf, 0x2518, 0x250c, 0x2588, 0x2584, 0xa6, 0xcc, 0x2580, - 0xd3, 0xdf, 0xd4, 0xd2, 0xf5, 0xd5, 0xb5, 0xfe, - 0xde, 0xda, 0xdb, 0xd9, 0xfd, 0xdd, 0xaf, 0xb4, - 0xad, 0xb1, 0x2017, 0xbe, 0xb6, 0xa7, 0xf7, 0xb8, - 0xb0, 0xa8, 0xb7, 0xb9, 0xb3, 0xb2, 0x25a0, 0xa0 }, - /* CP852 */ - { 0xc7, 0xfc, 0xe9, 0xe2, 0xe4, 0x16f, 0x107, 0xe7, - 0x142, 0xeb, 0x150, 0x151, 0xee, 0x179, 0xc4, 0x106, - 0xc9, 0x139, 0x13a, 0xf4, 0xf6, 0x13d, 0x13e, 0x15a, - 0x15b, 0xd6, 0xdc, 0x164, 0x165, 0x141, 0xd7, 0x10d, - 0xe1, 0xed, 0xf3, 0xfa, 0x104, 0x105, 0x17d, 0x17e, - 0x118, 0x119, 0xac, 0x17a, 0x10c, 0x15f, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0xc1, 0xc2, 0x11a, - 0x15e, 0x2563, 0x2551, 0x2557, 0x255d, 0x17b, 0x17c, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x102, 0x103, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0xa4, - 0x111, 0x110, 0x10e, 0xcb, 0x10f, 0x147, 0xcd, 0xce, - 0x11b, 0x2518, 0x250c, 0x2588, 0x2584, 0x162, 0x16e, 0x2580, - 0xd3, 0xdf, 0xd4, 0x143, 0x144, 0x148, 0x160, 0x161, - 0x154, 0xda, 0x155, 0x170, 0xfd, 0xdd, 0x163, 0xb4, - 0xad, 0x2dd, 0x2db, 0x2c7, 0x2d8, 0xa7, 0xf7, 0xb8, - 0xb0, 0xa8, 0x2d9, 0x171, 0x158, 0x159, 0x25a0, 0xa0 }, - /* CP855 */ - { 0x452, 0x402, 0x453, 0x403, 0x451, 0x401, 0x454, 0x404, - 0x455, 0x405, 0x456, 0x406, 0x457, 0x407, 0x458, 0x408, - 0x459, 0x409, 0x45a, 0x40a, 0x45b, 0x40b, 0x45c, 0x40c, - 0x45e, 0x40e, 0x45f, 0x40f, 0x44e, 0x42e, 0x44a, 0x42a, - 0x430, 0x410, 0x431, 0x411, 0x446, 0x426, 0x434, 0x414, - 0x435, 0x415, 0x444, 0x424, 0x433, 0x413, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x445, 0x425, 0x438, - 0x418, 0x2563, 0x2551, 0x2557, 0x255d, 0x439, 0x419, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x43a, 0x41a, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0xa4, - 0x43b, 0x41b, 0x43c, 0x41c, 0x43d, 0x41d, 0x43e, 0x41e, - 0x43f, 0x2518, 0x250c, 0x2588, 0x2584, 0x41f, 0x44f, 0x2580, - 0x42f, 0x440, 0x420, 0x441, 0x421, 0x442, 0x422, 0x443, - 0x423, 0x436, 0x416, 0x432, 0x412, 0x44c, 0x42c, 0x2116, - 0xad, 0x44b, 0x42b, 0x437, 0x417, 0x448, 0x428, 0x44d, - 0x42d, 0x449, 0x429, 0x447, 0x427, 0xa7, 0x25a0, 0xa0 }, - /* CP857 */ - { 0xc7, 0xfc, 0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7, - 0xea, 0xeb, 0xe8, 0xef, 0xee, 0x131, 0xc4, 0xc5, - 0xc9, 0xe6, 0xc6, 0xf4, 0xf6, 0xf2, 0xfb, 0xf9, - 0x130, 0xd6, 0xdc, 0xf8, 0xa3, 0xd8, 0x15e, 0x15f, - 0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0x11e, 0x11f, - 0xbf, 0xae, 0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0xc1, 0xc2, 0xc0, - 0xa9, 0x2563, 0x2551, 0x2557, 0x255d, 0xa2, 0xa5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0xe3, 0xc3, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0xa4, - 0xba, 0xaa, 0xca, 0xcb, 0xc8, 0x0, 0xcd, 0xce, - 0xcf, 0x2518, 0x250c, 0x2588, 0x2584, 0xa6, 0xcc, 0x2580, - 0xd3, 0xdf, 0xd4, 0xd2, 0xf5, 0xd5, 0xb5, 0x0, - 0xd7, 0xda, 0xdb, 0xd9, 0xec, 0xff, 0xaf, 0xb4, - 0xad, 0xb1, 0x0, 0xbe, 0xb6, 0xa7, 0xf7, 0xb8, - 0xb0, 0xa8, 0xb7, 0xb9, 0xb3, 0xb2, 0x25a0, 0xa0 }, - /* CP858 */ - { 0xc7, 0xfc, 0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7, - 0xea, 0xeb, 0xe8, 0xef, 0xee, 0xec, 0xc4, 0xc5, - 0xc9, 0xe6, 0xc6, 0xf4, 0xf6, 0xf2, 0xfb, 0xf9, - 0xff, 0xd6, 0xdc, 0xf8, 0xa3, 0xd8, 0xd7, 0x192, - 0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0xaa, 0xba, - 0xbf, 0xae, 0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0xc1, 0xc2, 0xc0, - 0xa9, 0x2563, 0x2551, 0x2557, 0x255d, 0xa2, 0xa5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0xe3, 0xc3, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0xa4, - 0xf0, 0xd0, 0xca, 0xcb, 0xc8, 0x20ac, 0xcd, 0xce, - 0xcf, 0x2518, 0x250c, 0x2588, 0x2584, 0xa6, 0xcc, 0x2580, - 0xd3, 0xdf, 0xd4, 0xd2, 0xf5, 0xd5, 0xb5, 0xfe, - 0xde, 0xda, 0xdb, 0xd9, 0xfd, 0xdd, 0xaf, 0xb4, - 0xad, 0xb1, 0x2017, 0xbe, 0xb6, 0xa7, 0xf7, 0xb8, - 0xb0, 0xa8, 0xb7, 0xb9, 0xb3, 0xb2, 0x25a0, 0xa0 }, - /* CP862 */ - { 0x5d0, 0x5d1, 0x5d2, 0x5d3, 0x5d4, 0x5d5, 0x5d6, 0x5d7, - 0x5d8, 0x5d9, 0x5da, 0x5db, 0x5dc, 0x5dd, 0x5de, 0x5df, - 0x5e0, 0x5e1, 0x5e2, 0x5e3, 0x5e4, 0x5e5, 0x5e6, 0x5e7, - 0x5e8, 0x5e9, 0x5ea, 0xa2, 0xa3, 0xa5, 0x20a7, 0x192, - 0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0xaa, 0xba, - 0xbf, 0x2310, 0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x3b1, 0xdf, 0x393, 0x3c0, 0x3a3, 0x3c3, 0xb5, 0x3c4, - 0x3a6, 0x398, 0x3a9, 0x3b4, 0x221e, 0x3c6, 0x3b5, 0x2229, - 0x2261, 0xb1, 0x2265, 0x2264, 0x2320, 0x2321, 0xf7, 0x2248, - 0xb0, 0x2219, 0xb7, 0x221a, 0x207f, 0xb2, 0x25a0, 0xa0 }, - /* CP866 */ - { 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, - 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x41f, - 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, - 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f, - 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, - 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, - 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, 0x44e, 0x44f, - 0x401, 0x451, 0x404, 0x454, 0x407, 0x457, 0x40e, 0x45e, - 0xb0, 0x2219, 0xb7, 0x221a, 0x2116, 0xa4, 0x25a0, 0xa0 }, - /* CP874 */ - { 0x20ac, 0x0, 0x0, 0x0, 0x0, 0x2026, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xa0, 0xe01, 0xe02, 0xe03, 0xe04, 0xe05, 0xe06, 0xe07, - 0xe08, 0xe09, 0xe0a, 0xe0b, 0xe0c, 0xe0d, 0xe0e, 0xe0f, - 0xe10, 0xe11, 0xe12, 0xe13, 0xe14, 0xe15, 0xe16, 0xe17, - 0xe18, 0xe19, 0xe1a, 0xe1b, 0xe1c, 0xe1d, 0xe1e, 0xe1f, - 0xe20, 0xe21, 0xe22, 0xe23, 0xe24, 0xe25, 0xe26, 0xe27, - 0xe28, 0xe29, 0xe2a, 0xe2b, 0xe2c, 0xe2d, 0xe2e, 0xe2f, - 0xe30, 0xe31, 0xe32, 0xe33, 0xe34, 0xe35, 0xe36, 0xe37, - 0xe38, 0xe39, 0xe3a, 0x0, 0x0, 0x0, 0x0, 0xe3f, - 0xe40, 0xe41, 0xe42, 0xe43, 0xe44, 0xe45, 0xe46, 0xe47, - 0xe48, 0xe49, 0xe4a, 0xe4b, 0xe4c, 0xe4d, 0xe4e, 0xe4f, - 0xe50, 0xe51, 0xe52, 0xe53, 0xe54, 0xe55, 0xe56, 0xe57, - 0xe58, 0xe59, 0xe5a, 0xe5b, 0xfc, 0xfd, 0xfe, 0xff }, - /* CP1125 */ - { 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, - 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x41f, - 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, - 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f, - 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, - 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, - 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, 0x44e, 0x44f, - 0x401, 0x451, 0x490, 0x491, 0x404, 0x454, 0x406, 0x456, - 0x407, 0x457, 0xb7, 0x221a, 0x2116, 0xa4, 0x25a0, 0xa0 }, - /* CP1250 */ - { 0x20ac, 0x0, 0x201a, 0x0, 0x201e, 0x2026, 0x2020, 0x2021, - 0x0, 0x2030, 0x160, 0x2039, 0x15a, 0x164, 0x17d, 0x179, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0, 0x2122, 0x161, 0x203a, 0x15b, 0x165, 0x17e, 0x17a, - 0xa0, 0x2c7, 0x2d8, 0x141, 0xa4, 0x104, 0xa6, 0xa7, - 0xa8, 0xa9, 0x15e, 0xab, 0xac, 0xad, 0xae, 0x17b, - 0xb0, 0xb1, 0x2db, 0x142, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0x105, 0x15f, 0xbb, 0x13d, 0x2dd, 0x13e, 0x17c, - 0x154, 0xc1, 0xc2, 0x102, 0xc4, 0x139, 0x106, 0xc7, - 0x10c, 0xc9, 0x118, 0xcb, 0x11a, 0xcd, 0xce, 0x10e, - 0x110, 0x143, 0x147, 0xd3, 0xd4, 0x150, 0xd6, 0xd7, - 0x158, 0x16e, 0xda, 0x170, 0xdc, 0xdd, 0x162, 0xdf, - 0x155, 0xe1, 0xe2, 0x103, 0xe4, 0x13a, 0x107, 0xe7, - 0x10d, 0xe9, 0x119, 0xeb, 0x11b, 0xed, 0xee, 0x10f, - 0x111, 0x144, 0x148, 0xf3, 0xf4, 0x151, 0xf6, 0xf7, - 0x159, 0x16f, 0xfa, 0x171, 0xfc, 0xfd, 0x163, 0x2d9 }, - /* CP1251 */ - { 0x402, 0x403, 0x201a, 0x453, 0x201e, 0x2026, 0x2020, 0x2021, - 0x20ac, 0x2030, 0x409, 0x2039, 0x40a, 0x40c, 0x40b, 0x40f, - 0x452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0, 0x2122, 0x459, 0x203a, 0x45a, 0x45c, 0x45b, 0x45f, - 0xa0, 0x40e, 0x45e, 0x408, 0xa4, 0x490, 0xa6, 0xa7, - 0x401, 0xa9, 0x404, 0xab, 0xac, 0xad, 0xae, 0x407, - 0xb0, 0xb1, 0x406, 0x456, 0x491, 0xb5, 0xb6, 0xb7, - 0x451, 0x2116, 0x454, 0xbb, 0x458, 0x405, 0x455, 0x457, - 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, - 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x41f, - 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, - 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f, - 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, - 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f, - 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, - 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, 0x44e, 0x44f }, - /* CP1252 */ - { 0x20ac, 0x0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0x0, 0x17d, 0x0, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x2dc, 0x2122, 0x161, 0x203a, 0x153, 0x0, 0x17e, 0x178, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }, - /* CP1253 */ - { 0x20ac, 0x0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x0, 0x2030, 0x0, 0x2039, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0, 0x2122, 0x0, 0x203a, 0x0, 0x0, 0x0, 0x0, - 0xa0, 0x385, 0x386, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0x0, 0xab, 0xac, 0xad, 0xae, 0x2015, - 0xb0, 0xb1, 0xb2, 0xb3, 0x384, 0xb5, 0xb6, 0xb7, - 0x388, 0x389, 0x38a, 0xbb, 0x38c, 0xbd, 0x38e, 0x38f, - 0x390, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, - 0x398, 0x399, 0x39a, 0x39b, 0x39c, 0x39d, 0x39e, 0x39f, - 0x3a0, 0x3a1, 0x0, 0x3a3, 0x3a4, 0x3a5, 0x3a6, 0x3a7, - 0x3a8, 0x3a9, 0x3aa, 0x3ab, 0x3ac, 0x3ad, 0x3ae, 0x3af, - 0x3b0, 0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7, - 0x3b8, 0x3b9, 0x3ba, 0x3bb, 0x3bc, 0x3bd, 0x3be, 0x3bf, - 0x3c0, 0x3c1, 0x3c2, 0x3c3, 0x3c4, 0x3c5, 0x3c6, 0x3c7, - 0x3c8, 0x3c9, 0x3ca, 0x3cb, 0x3cc, 0x3cd, 0x3ce, 0xff }, - /* CP1254 */ - { 0x20ac, 0x0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0x0, 0x0, 0x0, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x2dc, 0x2122, 0x161, 0x203a, 0x153, 0x0, 0x0, 0x178, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0x11e, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x130, 0x15e, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x11f, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x131, 0x15f, 0xff }, - /* CP1255 */ - { 0x20ac, 0x0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x2c6, 0x2030, 0x0, 0x2039, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x2dc, 0x2122, 0x0, 0x203a, 0x0, 0x0, 0x0, 0x0, - 0xa0, 0xa1, 0xa2, 0xa3, 0x20aa, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xd7, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xf7, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0x5b0, 0x5b1, 0x5b2, 0x5b3, 0x5b4, 0x5b5, 0x5b6, 0x5b7, - 0x5b8, 0x5b9, 0x0, 0x5bb, 0x5bc, 0x5bd, 0x5be, 0x5bf, - 0x5c0, 0x5c1, 0x5c2, 0x5c3, 0x5f0, 0x5f1, 0x5f2, 0x5f3, - 0x5f4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x5d0, 0x5d1, 0x5d2, 0x5d3, 0x5d4, 0x5d5, 0x5d6, 0x5d7, - 0x5d8, 0x5d9, 0x5da, 0x5db, 0x5dc, 0x5dd, 0x5de, 0x5df, - 0x5e0, 0x5e1, 0x5e2, 0x5e3, 0x5e4, 0x5e5, 0x5e6, 0x5e7, - 0x5e8, 0x5e9, 0x5ea, 0x0, 0x0, 0x200e, 0x200f, 0xff }, - /* CP1256 */ - { 0x20ac, 0x67e, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x2c6, 0x2030, 0x679, 0x2039, 0x152, 0x686, 0x698, 0x688, - 0x6af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x6a9, 0x2122, 0x691, 0x203a, 0x153, 0x200c, 0x200d, 0x6ba, - 0xa0, 0x60c, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0x6be, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0x61b, 0xbb, 0xbc, 0xbd, 0xbe, 0x61f, - 0x6c1, 0x621, 0x622, 0x623, 0x624, 0x625, 0x626, 0x627, - 0x628, 0x629, 0x62a, 0x62b, 0x62c, 0x62d, 0x62e, 0x62f, - 0x630, 0x631, 0x632, 0x633, 0x634, 0x635, 0x636, 0xd7, - 0x637, 0x638, 0x639, 0x63a, 0x640, 0x641, 0x642, 0x643, - 0xe0, 0x644, 0xe2, 0x645, 0x646, 0x647, 0x648, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0x649, 0x64a, 0xee, 0xef, - 0x64b, 0x64c, 0x64d, 0x64e, 0xf4, 0x64f, 0x650, 0xf7, - 0x651, 0xf9, 0x652, 0xfb, 0xfc, 0x200e, 0x200f, 0x6d2 }, - /* CP1257 */ - { 0x20ac, 0x0, 0x201a, 0x0, 0x201e, 0x2026, 0x2020, 0x2021, - 0x0, 0x2030, 0x0, 0x2039, 0x0, 0xa8, 0x2c7, 0xb8, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0, 0x2122, 0x0, 0x203a, 0x0, 0xaf, 0x2db, 0x0, - 0xa0, 0x0, 0xa2, 0xa3, 0xa4, 0x0, 0xa6, 0xa7, - 0xd8, 0xa9, 0x156, 0xab, 0xac, 0xad, 0xae, 0xc6, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xf8, 0xb9, 0x157, 0xbb, 0xbc, 0xbd, 0xbe, 0xe6, - 0x104, 0x12e, 0x100, 0x106, 0xc4, 0xc5, 0x118, 0x112, - 0x10c, 0xc9, 0x179, 0x116, 0x122, 0x136, 0x12a, 0x13b, - 0x160, 0x143, 0x145, 0xd3, 0x14c, 0xd5, 0xd6, 0xd7, - 0x172, 0x141, 0x15a, 0x16a, 0xdc, 0x17b, 0x17d, 0xdf, - 0x105, 0x12f, 0x101, 0x107, 0xe4, 0xe5, 0x119, 0x113, - 0x10d, 0xe9, 0x17a, 0x117, 0x123, 0x137, 0x12b, 0x13c, - 0x161, 0x144, 0x146, 0xf3, 0x14d, 0xf5, 0xf6, 0xf7, - 0x173, 0x142, 0x15b, 0x16b, 0xfc, 0x17c, 0x17e, 0x2d9 }, - /* CP1258 */ - { 0x20ac, 0x0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x2c6, 0x2030, 0x0, 0x2039, 0x152, 0x0, 0x0, 0x0, - 0x0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x2dc, 0x2122, 0x0, 0x203a, 0x153, 0x0, 0x0, 0x178, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0x102, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0x300, 0xcd, 0xce, 0xcf, - 0x110, 0xd1, 0x309, 0xd3, 0xd4, 0x1a0, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x1af, 0x303, 0xdf, - 0xe0, 0xe1, 0xe2, 0x103, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0x301, 0xed, 0xee, 0xef, - 0x111, 0xf1, 0x323, 0xf3, 0xf4, 0x1a1, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1b0, 0x20ab, 0xff }, - /* CP20866 (KOI8-R) */ - { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, - 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, - 0x2264, 0x2265, 0xa0, 0x2321, 0xb0, 0xb2, 0xb7, 0xf7, - 0x2550, 0x2551, 0x2552, 0x451, 0x2553, 0x2554, 0x2555, 0x2556, - 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, - 0x255f, 0x2560, 0x2561, 0x401, 0x2562, 0x2563, 0x2564, 0x2565, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0xa9, - 0x44e, 0x430, 0x431, 0x446, 0x434, 0x435, 0x444, 0x433, - 0x445, 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, - 0x43f, 0x44f, 0x440, 0x441, 0x442, 0x443, 0x436, 0x432, - 0x44c, 0x44b, 0x437, 0x448, 0x44d, 0x449, 0x447, 0x44a, - 0x42e, 0x410, 0x411, 0x426, 0x414, 0x415, 0x424, 0x413, - 0x425, 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, - 0x41f, 0x42f, 0x420, 0x421, 0x422, 0x423, 0x416, 0x412, - 0x42c, 0x42b, 0x417, 0x428, 0x42d, 0x429, 0x427, 0x42a }, - /* CP21866 (KOI8-U) */ - { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, - 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, - 0x2264, 0x2265, 0xa0, 0x2321, 0xb0, 0xb2, 0xb7, 0xf7, - 0x2550, 0x2551, 0x2552, 0x451, 0x454, 0x2554, 0x456, 0x457, - 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x491, 0x255d, 0x255e, - 0x255f, 0x2560, 0x2561, 0x401, 0x404, 0x2563, 0x406, 0x407, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x490, 0x256c, 0xa9, - 0x44e, 0x430, 0x431, 0x446, 0x434, 0x435, 0x444, 0x433, - 0x445, 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, - 0x43f, 0x44f, 0x440, 0x441, 0x442, 0x443, 0x436, 0x432, - 0x44c, 0x44b, 0x437, 0x448, 0x44d, 0x449, 0x447, 0x44a, - 0x42e, 0x410, 0x411, 0x426, 0x414, 0x415, 0x424, 0x413, - 0x425, 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, - 0x41f, 0x42f, 0x420, 0x421, 0x422, 0x423, 0x416, 0x412, - 0x42c, 0x42b, 0x417, 0x428, 0x42d, 0x429, 0x427, 0x42a } -}; -#endif /* _MB_EXTENDED_CHARSETS_WINDOWS */ - -/* Handle one to five decimal digits. Return -1 in any other case. */ -static int -__micro_atoi (const char *s) -{ - int ret = 0; - - if (!*s) - return -1; - while (*s) - { - if (*s < '0' || *s > '9' || ret >= 100000) - return -1; - ret = 10 * ret + (*s++ - '0'); - } - return ret; -} - -#ifdef _MB_EXTENDED_CHARSETS_ISO -int -__iso_8859_index (const char *charset_ext) -{ - int iso_idx = __micro_atoi (charset_ext); - if (iso_idx >= 2 && iso_idx <= 16) - { - iso_idx -= 2; - if (iso_idx > 10) - --iso_idx; - return iso_idx; - } - return -1; -} -#endif /* _MB_EXTENDED_CHARSETS_ISO */ - -#ifdef _MB_EXTENDED_CHARSETS_WINDOWS -int -__cp_index (const char *charset_ext) -{ - int cp_idx = __micro_atoi (charset_ext); - switch (cp_idx) - { - case 437: - cp_idx = 0; - break; - case 720: - cp_idx = 1; - break; - case 737: - cp_idx = 2; - break; - case 775: - cp_idx = 3; - break; - case 850: - cp_idx = 4; - break; - case 852: - cp_idx = 5; - break; - case 855: - cp_idx = 6; - break; - case 857: - cp_idx = 7; - break; - case 858: - cp_idx = 8; - break; - case 862: - cp_idx = 9; - break; - case 866: - cp_idx = 10; - break; - case 874: - cp_idx = 11; - break; - case 1125: - cp_idx = 12; - break; - case 1250: - cp_idx = 13; - break; - case 1251: - cp_idx = 14; - break; - case 1252: - cp_idx = 15; - break; - case 1253: - cp_idx = 16; - break; - case 1254: - cp_idx = 17; - break; - case 1255: - cp_idx = 18; - break; - case 1256: - cp_idx = 19; - break; - case 1257: - cp_idx = 20; - break; - case 1258: - cp_idx = 21; - break; - case 20866: - cp_idx = 22; - break; - case 21866: - cp_idx = 23; - break; - default: - cp_idx = -1; - break; - } - return cp_idx; -} -#endif /* _MB_EXTENDED_CHARSETS_WINDOWS */ -#endif /* _MB_CAPABLE */ diff --git a/newlib/libc/stdlib/seed48.c b/newlib/libc/stdlib/seed48.c deleted file mode 100644 index 43629cc40..000000000 --- a/newlib/libc/stdlib/seed48.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -unsigned short * -_DEFUN (_seed48_r, (r, xseed), - struct _reent *r _AND - unsigned short xseed[3]) -{ - static unsigned short sseed[3]; - - _REENT_CHECK_RAND48(r); - sseed[0] = __rand48_seed[0]; - sseed[1] = __rand48_seed[1]; - sseed[2] = __rand48_seed[2]; - __rand48_seed[0] = xseed[0]; - __rand48_seed[1] = xseed[1]; - __rand48_seed[2] = xseed[2]; - __rand48_mult[0] = _RAND48_MULT_0; - __rand48_mult[1] = _RAND48_MULT_1; - __rand48_mult[2] = _RAND48_MULT_2; - __rand48_add = _RAND48_ADD; - return sseed; -} - -#ifndef _REENT_ONLY -unsigned short * -_DEFUN (seed48, (xseed), - unsigned short xseed[3]) -{ - return _seed48_r (_REENT, xseed); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/setenv.c b/newlib/libc/stdlib/setenv.c deleted file mode 100644 index d423678f3..000000000 --- a/newlib/libc/stdlib/setenv.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef _REENT_ONLY - -#include <stddef.h> -#include <stdlib.h> -#include <string.h> - -extern int _unsetenv_r _PARAMS ((struct _reent *, const char *)); - -/* - * setenv -- - * Set the value of the environmental variable "name" to be - * "value". If rewrite is set, replace any current value. - */ - -int -_DEFUN (setenv, (name, value, rewrite), - _CONST char *name _AND - _CONST char *value _AND - int rewrite) -{ - return _setenv_r (_REENT, name, value, rewrite); -} - -/* - * unsetenv(name) -- - * Delete environmental variable "name". - */ -int -_DEFUN (unsetenv, (name), - _CONST char *name) -{ - return _unsetenv_r (_REENT, name); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/setenv_r.c b/newlib/libc/stdlib/setenv_r.c deleted file mode 100644 index d73ba3949..000000000 --- a/newlib/libc/stdlib/setenv_r.c +++ /dev/null @@ -1,168 +0,0 @@ -/* This file may have been modified by DJ Delorie (Jan 1991). If so, -** these modifications are Copyright (C) 1991 DJ Delorie. -*/ - -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <reent.h> - -#include <stddef.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#include <errno.h> -#include "envlock.h" - -extern char **environ; - -/* Only deal with a pointer to environ, to work around subtle bugs with shared - libraries and/or small data systems where the user declares his own - 'environ'. */ -static char ***p_environ = &environ; - -/* _findenv_r is defined in getenv_r.c. */ -extern char *_findenv_r _PARAMS ((struct _reent *, const char *, int *)); - -/* - * _setenv_r -- - * Set the value of the environmental variable "name" to be - * "value". If rewrite is set, replace any current value. - * If "name" contains equal sign, -1 is returned, and errno is - * set to EINVAL; - */ - -int -_DEFUN (_setenv_r, (reent_ptr, name, value, rewrite), - struct _reent *reent_ptr _AND - _CONST char *name _AND - _CONST char *value _AND - int rewrite) -{ - static int alloced; /* if allocated space before */ - register char *C; - int l_value, offset; - - if (strchr(name, '=')) - { - errno = EINVAL; - return -1; - } - - ENV_LOCK; - - l_value = strlen (value); - if ((C = _findenv_r (reent_ptr, name, &offset))) - { /* find if already exists */ - if (!rewrite) - { - ENV_UNLOCK; - return 0; - } - if (strlen (C) >= l_value) - { /* old larger; copy over */ - while ((*C++ = *value++) != 0); - ENV_UNLOCK; - /* if we are changing the TZ environment variable, update timezone info */ - if (strcmp (name, "TZ") == 0) - tzset (); - return 0; - } - } - else - { /* create new slot */ - register int cnt; - register char **P; - - for (P = *p_environ, cnt = 0; *P; ++P, ++cnt); - if (alloced) - { /* just increase size */ - *p_environ = (char **) _realloc_r (reent_ptr, (char *) environ, - (size_t) (sizeof (char *) * (cnt + 2))); - if (!*p_environ) - { - ENV_UNLOCK; - return -1; - } - } - else - { /* get new space */ - alloced = 1; /* copy old entries into it */ - P = (char **) _malloc_r (reent_ptr, (size_t) (sizeof (char *) * (cnt + 2))); - if (!P) - { - ENV_UNLOCK; - return (-1); - } - bcopy ((char *) *p_environ, (char *) P, cnt * sizeof (char *)); - *p_environ = P; - } - (*p_environ)[cnt + 1] = NULL; - offset = cnt; - } - for (C = (char *) name; *C && *C != '='; ++C); /* no `=' in name */ - if (!((*p_environ)[offset] = /* name + `=' + value */ - _malloc_r (reent_ptr, (size_t) ((int) (C - name) + l_value + 2)))) - { - ENV_UNLOCK; - return -1; - } - for (C = (*p_environ)[offset]; (*C = *name++) && *C != '='; ++C); - for (*C++ = '='; (*C++ = *value++) != 0;); - - ENV_UNLOCK; - - /* if we are setting the TZ environment variable, update timezone info */ - if (strncmp ((*p_environ)[offset], "TZ=", 3) == 0) - tzset (); - - return 0; -} - -/* - * _unsetenv_r(name) -- - * Delete environmental variable "name". - */ -int -_DEFUN (_unsetenv_r, (reent_ptr, name), - struct _reent *reent_ptr _AND - _CONST char *name) -{ - register char **P; - int offset; - - /* Name cannot be NULL, empty, or contain an equal sign. */ - if (name == NULL || name[0] == '\0' || strchr(name, '=')) - { - errno = EINVAL; - return -1; - } - - ENV_LOCK; - - while (_findenv_r (reent_ptr, name, &offset)) /* if set multiple times */ - { - for (P = &(*p_environ)[offset];; ++P) - if (!(*P = *(P + 1))) - break; - } - - ENV_UNLOCK; - return 0; -} diff --git a/newlib/libc/stdlib/srand48.c b/newlib/libc/stdlib/srand48.c deleted file mode 100644 index 69bdbfc3b..000000000 --- a/newlib/libc/stdlib/srand48.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 1993 Martin Birgmeier - * All rights reserved. - * - * You may redistribute unmodified or modified versions of this source - * code provided that the above copyright notice and this and the - * following conditions are retained. - * - * This software is provided ``as is'', and comes with no warranties - * of any kind. I shall in no event be liable for anything that happens - * to anyone/anything when using this software. - */ - -#include "rand48.h" - -_VOID -_DEFUN (_srand48_r, (r, seed), - struct _reent *r _AND - long seed) -{ - _REENT_CHECK_RAND48(r); - __rand48_seed[0] = _RAND48_SEED_0; - __rand48_seed[1] = (unsigned short) seed; - __rand48_seed[2] = (unsigned short) ((unsigned long)seed >> 16); - __rand48_mult[0] = _RAND48_MULT_0; - __rand48_mult[1] = _RAND48_MULT_1; - __rand48_mult[2] = _RAND48_MULT_2; - __rand48_add = _RAND48_ADD; -} - -#ifndef _REENT_ONLY -_VOID -_DEFUN (srand48, (seed), - long seed) -{ - _srand48_r (_REENT, seed); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/std.h b/newlib/libc/stdlib/std.h deleted file mode 100644 index b20820be4..000000000 --- a/newlib/libc/stdlib/std.h +++ /dev/null @@ -1,33 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> -#include <limits.h> -#include <math.h> -#ifndef CYGNUS_NEC -#include <ctype.h> -#endif - -#define Ise(c) ((c == 'e') || (c == 'E') || (c == 'd') || (c == 'D')) -#define Isdigit(c) ((c <= '9') && (c >= '0')) -#define Isspace(c) ((c == ' ') || (c == '\t') || (c=='\n') || (c=='\v') \ - || (c == '\r') || (c == '\f')) -#define Issign(c) ((c == '-') || (c == '+')) -#define Val(c) ((c - '0')) - -#define MAXE 308 -#define MINE (-308) - -/* flags */ -#define SIGN 0x01 -#define ESIGN 0x02 -#define DECP 0x04 - -#ifdef _HAVE_STDC -int __ten_mul(double *acc, int digit); -double __adjust(struct _reent *ptr, double *acc, int dexp, int sign); -double __exp10(unsigned x); -#else -int __ten_mul(); -double __adjust(); -double __exp10(); -#endif diff --git a/newlib/libc/stdlib/stdlib.tex b/newlib/libc/stdlib/stdlib.tex deleted file mode 100644 index b227d13e9..000000000 --- a/newlib/libc/stdlib/stdlib.tex +++ /dev/null @@ -1,186 +0,0 @@ -@node Stdlib -@chapter Standard Utility Functions (@file{stdlib.h}) - -This chapter groups utility functions useful in a variety of programs. -The corresponding declarations are in the header file @file{stdlib.h}. - -@menu -* _Exit:: End program execution without cleaning up -* a64l:: String to long long -* abort:: Abnormal termination of a program -* abs:: Integer absolute value (magnitude) -* assert:: Macro for Debugging Diagnostics -* atexit:: Request execution of functions at program exit -* atof:: String to double or float -* atoi:: String to integer -* atoll:: String to long long -* calloc:: Allocate space for arrays -* div:: Divide two integers -* ecvtbuf:: Double or float to string of digits -* ecvt:: Double or float to string of digits (malloc result) -* __env_lock:: Lock environment list for getenv and setenv -* gvcvt:: Format double or float as string -* exit:: End program execution -* getenv:: Look up environment variable -* labs:: Long integer absolute value (magnitude) -* ldiv:: Divide two long integers -* llabs:: Long long integer absolute value (magnitude) -* lldiv:: Divide two long long integers -* malloc:: Allocate and manage memory (malloc, realloc, free) -* mallinfo:: Get information about allocated memory -* __malloc_lock:: Lock memory pool for malloc and free -* mbsrtowcs:: Convert a character string to a wide-character string -* mbstowcs:: Minimal multibyte string to wide string converter -* mblen:: Minimal multibyte length -* mbtowc:: Minimal multibyte to wide character converter -* on_exit:: Request execution of functions at program exit -* rand:: Pseudo-random numbers -* rand48:: Uniformly distributed pseudo-random numbers -* strtod:: String to double or float -* strtol:: String to long -* strtoll:: String to long long -* strtoul:: String to unsigned long -* strtoull:: String to unsigned long long -* wcsrtombs:: Convert a wide-character string to a character string -* wcstod:: Wide string to double or float -* wcstol:: Wide string to long -* wcstoll:: Wide string to long long -* wcstoul:: Wide string to unsigned long -* wcstoull:: Wide string to unsigned long long -* system:: Execute command string -* wcstombs:: Minimal wide string to multibyte string converter -* wctomb:: Minimal wide character to multibyte converter -@end menu - -@page -@include stdlib/_Exit.def - -@page -@include stdlib/a64l.def - -@page -@include stdlib/abort.def - -@page -@include stdlib/abs.def - -@page -@include stdlib/assert.def - -@page -@include stdlib/atexit.def - -@page -@include stdlib/atof.def - -@page -@include stdlib/atoi.def - -@page -@include stdlib/atoll.def - -@page -@include stdlib/calloc.def - -@page -@include stdlib/div.def - -@page -@include stdlib/efgcvt.def - -@page -@include stdlib/ecvtbuf.def - -@page -@include stdlib/envlock.def - -@page -@include stdlib/exit.def - -@page -@include stdlib/getenv.def - -@page -@include stdlib/labs.def - -@page -@include stdlib/ldiv.def - -@page -@include stdlib/llabs.def - -@page -@include stdlib/lldiv.def - -@page -@include stdlib/malloc.def - -@page -@include stdlib/mstats.def - -@page -@include stdlib/mlock.def - -@page -@include stdlib/mblen.def - -@page -@include stdlib/mbsnrtowcs.def - -@page -@include stdlib/mbstowcs.def - -@page -@include stdlib/mbtowc.def - -@page -@include stdlib/on_exit.def - -@page -@include stdlib/rand.def - -@page -@include stdlib/rand48.def - -@page -@include stdlib/strtod.def - -@page -@include stdlib/strtol.def - -@page -@include stdlib/strtoll.def - -@page -@include stdlib/strtoul.def - -@page -@include stdlib/strtoull.def - -@page -@include stdlib/wcsnrtombs.def - -@page -@include stdlib/wcstod.def - -@page -@include stdlib/wcstol.def - -@page -@include stdlib/wcstoll.def - -@page -@include stdlib/wcstoul.def - -@page -@include stdlib/wcstoull.def - -@page -@include stdlib/system.def - -@page -@include stdlib/wcstombs.def - -@page -@include stdlib/wctomb.def - diff --git a/newlib/libc/stdlib/strtod.c b/newlib/libc/stdlib/strtod.c deleted file mode 100644 index 755e6ec3c..000000000 --- a/newlib/libc/stdlib/strtod.c +++ /dev/null @@ -1,1187 +0,0 @@ -/* -FUNCTION - <<strtod>>, <<strtof>>---string to double or float - -INDEX - strtod -INDEX - _strtod_r -INDEX - strtof - -ANSI_SYNOPSIS - #include <stdlib.h> - double strtod(const char *<[str]>, char **<[tail]>); - float strtof(const char *<[str]>, char **<[tail]>); - - double _strtod_r(void *<[reent]>, - const char *<[str]>, char **<[tail]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - double strtod(<[str]>,<[tail]>) - char *<[str]>; - char **<[tail]>; - - float strtof(<[str]>,<[tail]>) - char *<[str]>; - char **<[tail]>; - - double _strtod_r(<[reent]>,<[str]>,<[tail]>) - char *<[reent]>; - char *<[str]>; - char **<[tail]>; - -DESCRIPTION - The function <<strtod>> parses the character string <[str]>, - producing a substring which can be converted to a double - value. The substring converted is the longest initial - subsequence of <[str]>, beginning with the first - non-whitespace character, that has one of these formats: - .[+|-]<[digits]>[.[<[digits]>]][(e|E)[+|-]<[digits]>] - .[+|-].<[digits]>[(e|E)[+|-]<[digits]>] - .[+|-](i|I)(n|N)(f|F)[(i|I)(n|N)(i|I)(t|T)(y|Y)] - .[+|-](n|N)(a|A)(n|N)[<(>[<[hexdigits]>]<)>] - .[+|-]0(x|X)<[hexdigits]>[.[<[hexdigits]>]][(p|P)[+|-]<[digits]>] - .[+|-]0(x|X).<[hexdigits]>[(p|P)[+|-]<[digits]>] - The substring contains no characters if <[str]> is empty, consists - entirely of whitespace, or if the first non-whitespace - character is something other than <<+>>, <<->>, <<.>>, or a - digit, and cannot be parsed as infinity or NaN. If the platform - does not support NaN, then NaN is treated as an empty substring. - If the substring is empty, no conversion is done, and - the value of <[str]> is stored in <<*<[tail]>>>. Otherwise, - the substring is converted, and a pointer to the final string - (which will contain at least the terminating null character of - <[str]>) is stored in <<*<[tail]>>>. If you want no - assignment to <<*<[tail]>>>, pass a null pointer as <[tail]>. - <<strtof>> is identical to <<strtod>> except for its return type. - - This implementation returns the nearest machine number to the - input decimal string. Ties are broken by using the IEEE - round-even rule. However, <<strtof>> is currently subject to - double rounding errors. - - The alternate function <<_strtod_r>> is a reentrant version. - The extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS - <<strtod>> returns the converted substring value, if any. If - no conversion could be performed, 0 is returned. If the - correct value is out of the range of representable values, - plus or minus <<HUGE_VAL>> is returned, and <<ERANGE>> is - stored in errno. If the correct value would cause underflow, 0 - is returned and <<ERANGE>> is stored in errno. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -/**************************************************************** - -The author of this software is David M. Gay. - -Copyright (C) 1998-2001 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -****************************************************************/ - -/* Please send bug reports to David M. Gay (dmg at acm dot org, - * with " at " changed at "@" and " dot " changed to "."). */ - -/* Original file gdtoa-strtod.c Modified 06-21-2006 by Jeff Johnston to work within newlib. */ - -#include <_ansi.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include "mprec.h" -#include "gdtoa.h" -#include "gd_qnan.h" - -/* #ifndef NO_FENV_H */ -/* #include <fenv.h> */ -/* #endif */ - -#include "locale.h" - -#ifdef IEEE_Arith -#ifndef NO_IEEE_Scale -#define Avoid_Underflow -#undef tinytens -/* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */ -/* flag unnecessarily. It leads to a song and dance at the end of strtod. */ -static _CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, - 9007199254740992.e-256 - }; -#endif -#endif - -#ifdef Honor_FLT_ROUNDS -#define Rounding rounding -#undef Check_FLT_ROUNDS -#define Check_FLT_ROUNDS -#else -#define Rounding Flt_Rounds -#endif - -#ifndef NO_HEX_FP - -static void -_DEFUN (ULtod, (L, bits, exp, k), - __ULong *L _AND - __ULong *bits _AND - Long exp _AND - int k) -{ - switch(k & STRTOG_Retmask) { - case STRTOG_NoNumber: - case STRTOG_Zero: - L[0] = L[1] = 0; - break; - - case STRTOG_Denormal: - L[_1] = bits[0]; - L[_0] = bits[1]; - break; - - case STRTOG_Normal: - case STRTOG_NaNbits: - L[_1] = bits[0]; - L[_0] = (bits[1] & ~0x100000) | ((exp + 0x3ff + 52) << 20); - break; - - case STRTOG_Infinite: - L[_0] = 0x7ff00000; - L[_1] = 0; - break; - - case STRTOG_NaN: - L[_0] = 0x7fffffff; - L[_1] = (__ULong)-1; - } - if (k & STRTOG_Neg) - L[_0] |= 0x80000000L; -} -#endif /* !NO_HEX_FP */ - -#ifdef INFNAN_CHECK -static int -_DEFUN (match, (sp, t), - _CONST char **sp _AND - char *t) -{ - int c, d; - _CONST char *s = *sp; - - while( (d = *t++) !=0) { - if ((c = *++s) >= 'A' && c <= 'Z') - c += 'a' - 'A'; - if (c != d) - return 0; - } - *sp = s + 1; - return 1; -} -#endif /* INFNAN_CHECK */ - - -double -_DEFUN (_strtod_r, (ptr, s00, se), - struct _reent *ptr _AND - _CONST char *s00 _AND - char **se) -{ -#ifdef Avoid_Underflow - int scale; -#endif - int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, dsign, - e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; - _CONST char *s, *s0, *s1; - double aadj, adj; - U aadj1, rv, rv0; - Long L; - __ULong y, z; - _Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; -#ifdef SET_INEXACT - int inexact, oldinexact; -#endif -#ifdef Honor_FLT_ROUNDS - int rounding; -#endif - - delta = bs = bd = NULL; - sign = nz0 = nz = decpt = 0; - dval(rv) = 0.; - for(s = s00;;s++) switch(*s) { - case '-': - sign = 1; - /* no break */ - case '+': - if (*++s) - goto break2; - /* no break */ - case 0: - goto ret0; - case '\t': - case '\n': - case '\v': - case '\f': - case '\r': - case ' ': - continue; - default: - goto break2; - } - break2: - if (*s == '0') { -#ifndef NO_HEX_FP - { - static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI }; - Long exp; - __ULong bits[2]; - switch(s[1]) { - case 'x': - case 'X': - /* If the number is not hex, then the parse of - 0 is still valid. */ - s00 = s + 1; - { -#if defined(FE_DOWNWARD) && defined(FE_TONEAREST) && defined(FE_TOWARDZERO) && defined(FE_UPWARD) - FPI fpi1 = fpi; - switch(fegetround()) { - case FE_TOWARDZERO: fpi1.rounding = 0; break; - case FE_UPWARD: fpi1.rounding = 2; break; - case FE_DOWNWARD: fpi1.rounding = 3; - } -#else -#define fpi1 fpi -#endif - switch((i = gethex(ptr, &s, &fpi1, &exp, &bb, sign)) & STRTOG_Retmask) { - case STRTOG_NoNumber: - s = s00; - case STRTOG_Zero: - break; - default: - if (bb) { - copybits(bits, fpi.nbits, bb); - Bfree(ptr,bb); - } - ULtod(rv.i, bits, exp, i); - }} - goto ret; - } - } -#endif - nz0 = 1; - while(*++s == '0') ; - if (!*s) - goto ret; - } - s0 = s; - y = z = 0; - for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) - if (nd < 9) - y = 10*y + c - '0'; - else if (nd < 16) - z = 10*z + c - '0'; - nd0 = nd; - if (strncmp (s, _localeconv_r (ptr)->decimal_point, - strlen (_localeconv_r (ptr)->decimal_point)) == 0) - { - decpt = 1; - c = *(s += strlen (_localeconv_r (ptr)->decimal_point)); - if (!nd) { - for(; c == '0'; c = *++s) - nz++; - if (c > '0' && c <= '9') { - s0 = s; - nf += nz; - nz = 0; - goto have_dig; - } - goto dig_done; - } - for(; c >= '0' && c <= '9'; c = *++s) { - have_dig: - nz++; - if (c -= '0') { - nf += nz; - for(i = 1; i < nz; i++) - if (nd++ < 9) - y *= 10; - else if (nd <= DBL_DIG + 1) - z *= 10; - if (nd++ < 9) - y = 10*y + c; - else if (nd <= DBL_DIG + 1) - z = 10*z + c; - nz = 0; - } - } - } - dig_done: - e = 0; - if (c == 'e' || c == 'E') { - if (!nd && !nz && !nz0) { - goto ret0; - } - s00 = s; - esign = 0; - switch(c = *++s) { - case '-': - esign = 1; - case '+': - c = *++s; - } - if (c >= '0' && c <= '9') { - while(c == '0') - c = *++s; - if (c > '0' && c <= '9') { - L = c - '0'; - s1 = s; - while((c = *++s) >= '0' && c <= '9') - L = 10*L + c - '0'; - if (s - s1 > 8 || L > 19999) - /* Avoid confusion from exponents - * so large that e might overflow. - */ - e = 19999; /* safe for 16 bit ints */ - else - e = (int)L; - if (esign) - e = -e; - } - else - e = 0; - } - else - s = s00; - } - if (!nd) { - if (!nz && !nz0) { -#ifdef INFNAN_CHECK - /* Check for Nan and Infinity */ - __ULong bits[2]; - static FPI fpinan = /* only 52 explicit bits */ - { 52, 1-1023-53+1, 2046-1023-53+1, 1, SI }; - if (!decpt) - switch(c) { - case 'i': - case 'I': - if (match(&s,"nf")) { - --s; - if (!match(&s,"inity")) - ++s; - dword0(rv) = 0x7ff00000; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = 0; -#endif /*!_DOUBLE_IS_32BITS*/ - goto ret; - } - break; - case 'n': - case 'N': - if (match(&s, "an")) { -#ifndef No_Hex_NaN - if (*s == '(' /*)*/ - && hexnan(&s, &fpinan, bits) - == STRTOG_NaNbits) { - dword0(rv) = 0x7ff00000 | bits[1]; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = bits[0]; -#endif /*!_DOUBLE_IS_32BITS*/ - } - else { -#endif - dword0(rv) = NAN_WORD0; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = NAN_WORD1; -#endif /*!_DOUBLE_IS_32BITS*/ -#ifndef No_Hex_NaN - } -#endif - goto ret; - } - } -#endif /* INFNAN_CHECK */ - ret0: - s = s00; - sign = 0; - } - goto ret; - } - e1 = e -= nf; - - /* Now we have nd0 digits, starting at s0, followed by a - * decimal point, followed by nd-nd0 digits. The number we're - * after is the integer represented by those digits times - * 10**e */ - - if (!nd0) - nd0 = nd; - k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; - dval(rv) = y; - if (k > 9) { -#ifdef SET_INEXACT - if (k > DBL_DIG) - oldinexact = get_inexact(); -#endif - dval(rv) = tens[k - 9] * dval(rv) + z; - } - bd0 = 0; - if (nd <= DBL_DIG -#ifndef RND_PRODQUOT -#ifndef Honor_FLT_ROUNDS - && Flt_Rounds == 1 -#endif -#endif - ) { - if (!e) - goto ret; - if (e > 0) { - if (e <= Ten_pmax) { -#ifdef VAX - goto vax_ovfl_check; -#else -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) { - dval(rv) = -dval(rv); - sign = 0; - } -#endif - /* rv = */ rounded_product(dval(rv), tens[e]); - goto ret; -#endif - } - i = DBL_DIG - nd; - if (e <= Ten_pmax + i) { - /* A fancier test would sometimes let us do - * this for larger i values. - */ -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) { - dval(rv) = -dval(rv); - sign = 0; - } -#endif - e -= i; - dval(rv) *= tens[i]; -#ifdef VAX - /* VAX exponent range is so narrow we must - * worry about overflow here... - */ - vax_ovfl_check: - dword0(rv) -= P*Exp_msk1; - /* rv = */ rounded_product(dval(rv), tens[e]); - if ((dword0(rv) & Exp_mask) - > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) - goto ovfl; - dword0(rv) += P*Exp_msk1; -#else - /* rv = */ rounded_product(dval(rv), tens[e]); -#endif - goto ret; - } - } -#ifndef Inaccurate_Divide - else if (e >= -Ten_pmax) { -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) { - dval(rv) = -dval(rv); - sign = 0; - } -#endif - /* rv = */ rounded_quotient(dval(rv), tens[-e]); - goto ret; - } -#endif - } - e1 += nd - k; - -#ifdef IEEE_Arith -#ifdef SET_INEXACT - inexact = 1; - if (k <= DBL_DIG) - oldinexact = get_inexact(); -#endif -#ifdef Avoid_Underflow - scale = 0; -#endif -#ifdef Honor_FLT_ROUNDS - if ((rounding = Flt_Rounds) >= 2) { - if (sign) - rounding = rounding == 2 ? 0 : 2; - else - if (rounding != 2) - rounding = 0; - } -#endif -#endif /*IEEE_Arith*/ - - /* Get starting approximation = rv * 10**e1 */ - - if (e1 > 0) { - if ( (i = e1 & 15) !=0) - dval(rv) *= tens[i]; - if (e1 &= ~15) { - if (e1 > DBL_MAX_10_EXP) { - ovfl: -#ifndef NO_ERRNO - ptr->_errno = ERANGE; -#endif - /* Can't trust HUGE_VAL */ -#ifdef IEEE_Arith -#ifdef Honor_FLT_ROUNDS - switch(rounding) { - case 0: /* toward 0 */ - case 3: /* toward -infinity */ - dword0(rv) = Big0; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = Big1; -#endif /*!_DOUBLE_IS_32BITS*/ - break; - default: - dword0(rv) = Exp_mask; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = 0; -#endif /*!_DOUBLE_IS_32BITS*/ - } -#else /*Honor_FLT_ROUNDS*/ - dword0(rv) = Exp_mask; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = 0; -#endif /*!_DOUBLE_IS_32BITS*/ -#endif /*Honor_FLT_ROUNDS*/ -#ifdef SET_INEXACT - /* set overflow bit */ - dval(rv0) = 1e300; - dval(rv0) *= dval(rv0); -#endif -#else /*IEEE_Arith*/ - dword0(rv) = Big0; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = Big1; -#endif /*!_DOUBLE_IS_32BITS*/ -#endif /*IEEE_Arith*/ - if (bd0) - goto retfree; - goto ret; - } - e1 >>= 4; - for(j = 0; e1 > 1; j++, e1 >>= 1) - if (e1 & 1) - dval(rv) *= bigtens[j]; - /* The last multiplication could overflow. */ - dword0(rv) -= P*Exp_msk1; - dval(rv) *= bigtens[j]; - if ((z = dword0(rv) & Exp_mask) - > Exp_msk1*(DBL_MAX_EXP+Bias-P)) - goto ovfl; - if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) { - /* set to largest number */ - /* (Can't trust DBL_MAX) */ - dword0(rv) = Big0; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = Big1; -#endif /*!_DOUBLE_IS_32BITS*/ - } - else - dword0(rv) += P*Exp_msk1; - } - } - else if (e1 < 0) { - e1 = -e1; - if ( (i = e1 & 15) !=0) - dval(rv) /= tens[i]; - if (e1 >>= 4) { - if (e1 >= 1 << n_bigtens) - goto undfl; -#ifdef Avoid_Underflow - if (e1 & Scale_Bit) - scale = 2*P; - for(j = 0; e1 > 0; j++, e1 >>= 1) - if (e1 & 1) - dval(rv) *= tinytens[j]; - if (scale && (j = 2*P + 1 - ((dword0(rv) & Exp_mask) - >> Exp_shift)) > 0) { - /* scaled rv is denormal; zap j low bits */ - if (j >= 32) { -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = 0; -#endif /*!_DOUBLE_IS_32BITS*/ - if (j >= 53) - dword0(rv) = (P+2)*Exp_msk1; - else - dword0(rv) &= 0xffffffff << (j-32); - } -#ifndef _DOUBLE_IS_32BITS - else - dword1(rv) &= 0xffffffff << j; -#endif /*!_DOUBLE_IS_32BITS*/ - } -#else - for(j = 0; e1 > 1; j++, e1 >>= 1) - if (e1 & 1) - dval(rv) *= tinytens[j]; - /* The last multiplication could underflow. */ - dval(rv0) = dval(rv); - dval(rv) *= tinytens[j]; - if (!dval(rv)) { - dval(rv) = 2.*dval(rv0); - dval(rv) *= tinytens[j]; -#endif - if (!dval(rv)) { - undfl: - dval(rv) = 0.; -#ifndef NO_ERRNO - ptr->_errno = ERANGE; -#endif - if (bd0) - goto retfree; - goto ret; - } -#ifndef Avoid_Underflow -#ifndef _DOUBLE_IS_32BITS - dword0(rv) = Tiny0; - dword1(rv) = Tiny1; -#else - dword0(rv) = Tiny1; -#endif /*_DOUBLE_IS_32BITS*/ - /* The refinement below will clean - * this approximation up. - */ - } -#endif - } - } - - /* Now the hard part -- adjusting rv to the correct value.*/ - - /* Put digits into bd: true value = bd * 10^e */ - - bd0 = s2b(ptr, s0, nd0, nd, y); - - for(;;) { - bd = Balloc(ptr,bd0->_k); - Bcopy(bd, bd0); - bb = d2b(ptr,dval(rv), &bbe, &bbbits); /* rv = bb * 2^bbe */ - bs = i2b(ptr,1); - - if (e >= 0) { - bb2 = bb5 = 0; - bd2 = bd5 = e; - } - else { - bb2 = bb5 = -e; - bd2 = bd5 = 0; - } - if (bbe >= 0) - bb2 += bbe; - else - bd2 -= bbe; - bs2 = bb2; -#ifdef Honor_FLT_ROUNDS - if (rounding != 1) - bs2++; -#endif -#ifdef Avoid_Underflow - j = bbe - scale; - i = j + bbbits - 1; /* logb(rv) */ - if (i < Emin) /* denormal */ - j += P - Emin; - else - j = P + 1 - bbbits; -#else /*Avoid_Underflow*/ -#ifdef Sudden_Underflow -#ifdef IBM - j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3); -#else - j = P + 1 - bbbits; -#endif -#else /*Sudden_Underflow*/ - j = bbe; - i = j + bbbits - 1; /* logb(rv) */ - if (i < Emin) /* denormal */ - j += P - Emin; - else - j = P + 1 - bbbits; -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - bb2 += j; - bd2 += j; -#ifdef Avoid_Underflow - bd2 += scale; -#endif - i = bb2 < bd2 ? bb2 : bd2; - if (i > bs2) - i = bs2; - if (i > 0) { - bb2 -= i; - bd2 -= i; - bs2 -= i; - } - if (bb5 > 0) { - bs = pow5mult(ptr, bs, bb5); - bb1 = mult(ptr, bs, bb); - Bfree(ptr, bb); - bb = bb1; - } - if (bb2 > 0) - bb = lshift(ptr, bb, bb2); - if (bd5 > 0) - bd = pow5mult(ptr, bd, bd5); - if (bd2 > 0) - bd = lshift(ptr, bd, bd2); - if (bs2 > 0) - bs = lshift(ptr, bs, bs2); - delta = diff(ptr, bb, bd); - dsign = delta->_sign; - delta->_sign = 0; - i = cmp(delta, bs); -#ifdef Honor_FLT_ROUNDS - if (rounding != 1) { - if (i < 0) { - /* Error is less than an ulp */ - if (!delta->_x[0] && delta->_wds <= 1) { - /* exact */ -#ifdef SET_INEXACT - inexact = 0; -#endif - break; - } - if (rounding) { - if (dsign) { - adj = 1.; - goto apply_adj; - } - } - else if (!dsign) { - adj = -1.; - if (!dword1(rv) - && !(dword0(rv) & Frac_mask)) { - y = dword0(rv) & Exp_mask; -#ifdef Avoid_Underflow - if (!scale || y > 2*P*Exp_msk1) -#else - if (y) -#endif - { - delta = lshift(ptr, delta,Log2P); - if (cmp(delta, bs) <= 0) - adj = -0.5; - } - } - apply_adj: -#ifdef Avoid_Underflow - if (scale && (y = dword0(rv) & Exp_mask) - <= 2*P*Exp_msk1) - dword0(adj) += (2*P+1)*Exp_msk1 - y; -#else -#ifdef Sudden_Underflow - if ((dword0(rv) & Exp_mask) <= - P*Exp_msk1) { - dword0(rv) += P*Exp_msk1; - dval(rv) += adj*ulp(dval(rv)); - dword0(rv) -= P*Exp_msk1; - } - else -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - dval(rv) += adj*ulp(dval(rv)); - } - break; - } - adj = ratio(delta, bs); - if (adj < 1.) - adj = 1.; - if (adj <= 0x7ffffffe) { - /* adj = rounding ? ceil(adj) : floor(adj); */ - y = adj; - if (y != adj) { - if (!((rounding>>1) ^ dsign)) - y++; - adj = y; - } - } -#ifdef Avoid_Underflow - if (scale && (y = dword0(rv) & Exp_mask) <= 2*P*Exp_msk1) - dword0(adj) += (2*P+1)*Exp_msk1 - y; -#else -#ifdef Sudden_Underflow - if ((dword0(rv) & Exp_mask) <= P*Exp_msk1) { - dword0(rv) += P*Exp_msk1; - adj *= ulp(dval(rv)); - if (dsign) - dval(rv) += adj; - else - dval(rv) -= adj; - dword0(rv) -= P*Exp_msk1; - goto cont; - } -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - adj *= ulp(dval(rv)); - if (dsign) - dval(rv) += adj; - else - dval(rv) -= adj; - goto cont; - } -#endif /*Honor_FLT_ROUNDS*/ - - if (i < 0) { - /* Error is less than half an ulp -- check for - * special case of mantissa a power of two. - */ - if (dsign || dword1(rv) || dword0(rv) & Bndry_mask -#ifdef IEEE_Arith -#ifdef Avoid_Underflow - || (dword0(rv) & Exp_mask) <= (2*P+1)*Exp_msk1 -#else - || (dword0(rv) & Exp_mask) <= Exp_msk1 -#endif -#endif - ) { -#ifdef SET_INEXACT - if (!delta->x[0] && delta->wds <= 1) - inexact = 0; -#endif - break; - } - if (!delta->_x[0] && delta->_wds <= 1) { - /* exact result */ -#ifdef SET_INEXACT - inexact = 0; -#endif - break; - } - delta = lshift(ptr,delta,Log2P); - if (cmp(delta, bs) > 0) - goto drop_down; - break; - } - if (i == 0) { - /* exactly half-way between */ - if (dsign) { - if ((dword0(rv) & Bndry_mask1) == Bndry_mask1 - && dword1(rv) == ( -#ifdef Avoid_Underflow - (scale && (y = dword0(rv) & Exp_mask) <= 2*P*Exp_msk1) - ? (0xffffffff & (0xffffffff << (2*P+1-(y>>Exp_shift)))) : -#endif - 0xffffffff)) { - /*boundary case -- increment exponent*/ - dword0(rv) = (dword0(rv) & Exp_mask) - + Exp_msk1 -#ifdef IBM - | Exp_msk1 >> 4 -#endif - ; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = 0; -#endif /*!_DOUBLE_IS_32BITS*/ -#ifdef Avoid_Underflow - dsign = 0; -#endif - break; - } - } - else if (!(dword0(rv) & Bndry_mask) && !dword1(rv)) { - drop_down: - /* boundary case -- decrement exponent */ -#ifdef Sudden_Underflow /*{{*/ - L = dword0(rv) & Exp_mask; -#ifdef IBM - if (L < Exp_msk1) -#else -#ifdef Avoid_Underflow - if (L <= (scale ? (2*P+1)*Exp_msk1 : Exp_msk1)) -#else - if (L <= Exp_msk1) -#endif /*Avoid_Underflow*/ -#endif /*IBM*/ - goto undfl; - L -= Exp_msk1; -#else /*Sudden_Underflow}{*/ -#ifdef Avoid_Underflow - if (scale) { - L = dword0(rv) & Exp_mask; - if (L <= (2*P+1)*Exp_msk1) { - if (L > (P+2)*Exp_msk1) - /* round even ==> */ - /* accept rv */ - break; - /* rv = smallest denormal */ - goto undfl; - } - } -#endif /*Avoid_Underflow*/ - L = (dword0(rv) & Exp_mask) - Exp_msk1; -#endif /*Sudden_Underflow}*/ - dword0(rv) = L | Bndry_mask1; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = 0xffffffff; -#endif /*!_DOUBLE_IS_32BITS*/ -#ifdef IBM - goto cont; -#else - break; -#endif - } -#ifndef ROUND_BIASED - if (!(dword1(rv) & LSB)) - break; -#endif - if (dsign) - dval(rv) += ulp(dval(rv)); -#ifndef ROUND_BIASED - else { - dval(rv) -= ulp(dval(rv)); -#ifndef Sudden_Underflow - if (!dval(rv)) - goto undfl; -#endif - } -#ifdef Avoid_Underflow - dsign = 1 - dsign; -#endif -#endif - break; - } - if ((aadj = ratio(delta, bs)) <= 2.) { - if (dsign) - aadj = dval(aadj1) = 1.; - else if (dword1(rv) || dword0(rv) & Bndry_mask) { -#ifndef Sudden_Underflow - if (dword1(rv) == Tiny1 && !dword0(rv)) - goto undfl; -#endif - aadj = 1.; - dval(aadj1) = -1.; - } - else { - /* special case -- power of FLT_RADIX to be */ - /* rounded down... */ - - if (aadj < 2./FLT_RADIX) - aadj = 1./FLT_RADIX; - else - aadj *= 0.5; - dval(aadj1) = -aadj; - } - } - else { - aadj *= 0.5; - dval(aadj1) = dsign ? aadj : -aadj; -#ifdef Check_FLT_ROUNDS - switch(Rounding) { - case 2: /* towards +infinity */ - dval(aadj1) -= 0.5; - break; - case 0: /* towards 0 */ - case 3: /* towards -infinity */ - dval(aadj1) += 0.5; - } -#else - if (Flt_Rounds == 0) - dval(aadj1) += 0.5; -#endif /*Check_FLT_ROUNDS*/ - } - y = dword0(rv) & Exp_mask; - - /* Check for overflow */ - - if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) { - dval(rv0) = dval(rv); - dword0(rv) -= P*Exp_msk1; - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; - if ((dword0(rv) & Exp_mask) >= - Exp_msk1*(DBL_MAX_EXP+Bias-P)) { - if (dword0(rv0) == Big0 && dword1(rv0) == Big1) - goto ovfl; - dword0(rv) = Big0; -#ifndef _DOUBLE_IS_32BITS - dword1(rv) = Big1; -#endif /*!_DOUBLE_IS_32BITS*/ - goto cont; - } - else - dword0(rv) += P*Exp_msk1; - } - else { -#ifdef Avoid_Underflow - if (scale && y <= 2*P*Exp_msk1) { - if (aadj <= 0x7fffffff) { - if ((z = aadj) <= 0) - z = 1; - aadj = z; - dval(aadj1) = dsign ? aadj : -aadj; - } - dword0(aadj1) += (2*P+1)*Exp_msk1 - y; - } - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; -#else -#ifdef Sudden_Underflow - if ((dword0(rv) & Exp_mask) <= P*Exp_msk1) { - dval(rv0) = dval(rv); - dword0(rv) += P*Exp_msk1; - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; -#ifdef IBM - if ((dword0(rv) & Exp_mask) < P*Exp_msk1) -#else - if ((dword0(rv) & Exp_mask) <= P*Exp_msk1) -#endif - { - if (dword0(rv0) == Tiny0 - && dword1(rv0) == Tiny1) - goto undfl; -#ifndef _DOUBLE_IS_32BITS - dword0(rv) = Tiny0; - dword1(rv) = Tiny1; -#else - dword0(rv) = Tiny1; -#endif /*_DOUBLE_IS_32BITS*/ - goto cont; - } - else - dword0(rv) -= P*Exp_msk1; - } - else { - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; - } -#else /*Sudden_Underflow*/ - /* Compute adj so that the IEEE rounding rules will - * correctly round rv + adj in some half-way cases. - * If rv * ulp(rv) is denormalized (i.e., - * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid - * trouble from bits lost to denormalization; - * example: 1.2e-307 . - */ - if (y <= (P-1)*Exp_msk1 && aadj > 1.) { - dval(aadj1) = (double)(int)(aadj + 0.5); - if (!dsign) - dval(aadj1) = -dval(aadj1); - } - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - } - z = dword0(rv) & Exp_mask; -#ifndef SET_INEXACT -#ifdef Avoid_Underflow - if (!scale) -#endif - if (y == z) { - /* Can we stop now? */ - L = (Long)aadj; - aadj -= L; - /* The tolerances below are conservative. */ - if (dsign || dword1(rv) || dword0(rv) & Bndry_mask) { - if (aadj < .4999999 || aadj > .5000001) - break; - } - else if (aadj < .4999999/FLT_RADIX) - break; - } -#endif - cont: - Bfree(ptr,bb); - Bfree(ptr,bd); - Bfree(ptr,bs); - Bfree(ptr,delta); - } -#ifdef SET_INEXACT - if (inexact) { - if (!oldinexact) { - dword0(rv0) = Exp_1 + (70 << Exp_shift); -#ifndef _DOUBLE_IS_32BITS - dword1(rv0) = 0; -#endif /*!_DOUBLE_IS_32BITS*/ - dval(rv0) += 1.; - } - } - else if (!oldinexact) - clear_inexact(); -#endif -#ifdef Avoid_Underflow - if (scale) { - dword0(rv0) = Exp_1 - 2*P*Exp_msk1; -#ifndef _DOUBLE_IS_32BITS - dword1(rv0) = 0; -#endif /*!_DOUBLE_IS_32BITS*/ - dval(rv) *= dval(rv0); -#ifndef NO_ERRNO - /* try to avoid the bug of testing an 8087 register value */ - if (dword0(rv) == 0 && dword1(rv) == 0) - ptr->_errno = ERANGE; -#endif - } -#endif /* Avoid_Underflow */ -#ifdef SET_INEXACT - if (inexact && !(dword0(rv) & Exp_mask)) { - /* set underflow bit */ - dval(rv0) = 1e-300; - dval(rv0) *= dval(rv0); - } -#endif - retfree: - Bfree(ptr,bb); - Bfree(ptr,bd); - Bfree(ptr,bs); - Bfree(ptr,bd0); - Bfree(ptr,delta); - ret: - if (se) - *se = (char *)s; - return sign ? -dval(rv) : dval(rv); -} - -#ifndef NO_REENT - -double -_DEFUN (strtod, (s00, se), - _CONST char *s00 _AND char **se) -{ - return _strtod_r (_REENT, s00, se); -} - -float -_DEFUN (strtof, (s00, se), - _CONST char *s00 _AND - char **se) -{ - double retval = _strtod_r (_REENT, s00, se); - if (isnan (retval)) - return nanf (NULL); - return (float)retval; -} - -#endif diff --git a/newlib/libc/stdlib/strtol.c b/newlib/libc/stdlib/strtol.c deleted file mode 100644 index 4c07e6171..000000000 --- a/newlib/libc/stdlib/strtol.c +++ /dev/null @@ -1,226 +0,0 @@ -/* -FUNCTION - <<strtol>>---string to long - -INDEX - strtol -INDEX - _strtol_r - -ANSI_SYNOPSIS - #include <stdlib.h> - long strtol(const char *<[s]>, char **<[ptr]>,int <[base]>); - - long _strtol_r(void *<[reent]>, - const char *<[s]>, char **<[ptr]>,int <[base]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - long strtol (<[s]>, <[ptr]>, <[base]>) - char *<[s]>; - char **<[ptr]>; - int <[base]>; - - long _strtol_r (<[reent]>, <[s]>, <[ptr]>, <[base]>) - char *<[reent]>; - char *<[s]>; - char **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<strtol>> converts the string <<*<[s]>>> to -a <<long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of characters resembling an integer in the radix specified by <[base]>; -and a trailing portion consisting of zero or more unparseable characters, -and always including the terminating null character. Then, it attempts -to convert the subject string into a <<long>> and returns the -result. - -If the value of <[base]> is 0, the subject string is expected to look -like a normal C integer constant: an optional sign, a possible `<<0x>>' -indicating a hexadecimal base, and a number. If <[base]> is between -2 and 36, the expected form of the subject is a sequence of letters -and digits representing an integer in the radix specified by <[base]>, -with an optional plus or minus sign. The letters <<a>>--<<z>> (or, -equivalently, <<A>>--<<Z>>) are used to signify values from 10 to 35; -only letters whose ascribed values are less than <[base]> are -permitted. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible letter or digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<strtol>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading 0 and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. If the subject string begins with -a minus sign, the value is negated. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (or not in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_strtol_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<strtol>> returns the converted value, if any. If no conversion was -made, 0 is returned. - -<<strtol>> returns <<LONG_MAX>> or <<LONG_MIN>> if the magnitude of -the converted value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<strtol>> is ANSI. - -No supporting OS subroutines are required. -*/ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -#include <_ansi.h> -#include <limits.h> -#include <ctype.h> -#include <errno.h> -#include <stdlib.h> -#include <reent.h> - -/* - * Convert a string to a long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -long -_DEFUN (_strtol_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST char *nptr _AND - char **endptr _AND - int base) -{ - register const char *s = nptr; - register unsigned long acc; - register int c; - register unsigned long cutoff; - register int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') { - neg = 1; - c = *s++; - } else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; - cutlim = cutoff % (unsigned long)base; - cutoff /= (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = neg ? LONG_MIN : LONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (char *) (any ? s - 1 : nptr); - return (acc); -} - -#ifndef _REENT_ONLY - -long -_DEFUN (strtol, (s, ptr, base), - _CONST char *s _AND - char **ptr _AND - int base) -{ - return _strtol_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/strtold.c b/newlib/libc/stdlib/strtold.c deleted file mode 100644 index 94f9613d2..000000000 --- a/newlib/libc/stdlib/strtold.c +++ /dev/null @@ -1,42 +0,0 @@ -/* -(C) Copyright IBM Corp. 2009 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -* Neither the name of IBM nor the names of its contributors may be -used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <stdlib.h> -#include "local.h" - -/* On platforms where long double is as wide as double. */ -#ifdef _LDBL_EQ_DBL -long double -strtold (const char *s00, char **se) -{ - return strtod(s00, se); -} -#endif /* _LDBL_EQ_DBL */ - diff --git a/newlib/libc/stdlib/strtoll.c b/newlib/libc/stdlib/strtoll.c deleted file mode 100644 index 47558a8fd..000000000 --- a/newlib/libc/stdlib/strtoll.c +++ /dev/null @@ -1,138 +0,0 @@ -/* -FUNCTION - <<strtoll>>---string to long long - -INDEX - strtoll -INDEX - _strtoll_r - -ANSI_SYNOPSIS - #include <stdlib.h> - long long strtoll(const char *<[s]>, char **<[ptr]>,int <[base]>); - - long long _strtoll_r(void *<[reent]>, - const char *<[s]>, char **<[ptr]>,int <[base]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - long long strtoll (<[s]>, <[ptr]>, <[base]>) - const char *<[s]>; - char **<[ptr]>; - int <[base]>; - - long long _strtoll_r (<[reent]>, <[s]>, <[ptr]>, <[base]>) - char *<[reent]>; - const char *<[s]>; - char **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<strtoll>> converts the string <<*<[s]>>> to -a <<long long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of characters resembling an integer in the radix specified by <[base]>; -and a trailing portion consisting of zero or more unparseable characters, -and always including the terminating null character. Then, it attempts -to convert the subject string into a <<long long>> and returns the -result. - -If the value of <[base]> is 0, the subject string is expected to look -like a normal C integer constant: an optional sign, a possible `<<0x>>' -indicating a hexadecimal base, and a number. If <[base]> is between -2 and 36, the expected form of the subject is a sequence of letters -and digits representing an integer in the radix specified by <[base]>, -with an optional plus or minus sign. The letters <<a>>--<<z>> (or, -equivalently, <<A>>--<<Z>>) are used to signify values from 10 to 35; -only letters whose ascribed values are less than <[base]> are -permitted. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible letter or digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<strtoll>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading 0 and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. If the subject string begins with -a minus sign, the value is negated. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (or not in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_strtoll_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<strtoll>> returns the converted value, if any. If no conversion was -made, 0 is returned. - -<<strtoll>> returns <<LONG_LONG_MAX>> or <<LONG_LONG_MIN>> if the magnitude of -the converted value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<strtoll>> is ANSI. - -No supporting OS subroutines are required. -*/ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -#include <_ansi.h> -#include <limits.h> -#include <ctype.h> -#include <errno.h> -#include <stdlib.h> -#include <reent.h> - -#ifndef _REENT_ONLY - -long long -_DEFUN (strtoll, (s, ptr, base), - _CONST char *s _AND - char **ptr _AND - int base) -{ - return _strtoll_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/strtoll_r.c b/newlib/libc/stdlib/strtoll_r.c deleted file mode 100644 index b814f68be..000000000 --- a/newlib/libc/stdlib/strtoll_r.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - This code is based on strtoul.c which has the following copyright. - It is used to convert a string into a signed long long. - - long long _strtoll_r (struct _reent *rptr, const char *s, - char **ptr, int base); -*/ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef __GNUC__ - -#define _GNU_SOURCE -#include <_ansi.h> -#include <limits.h> -#include <ctype.h> -#include <errno.h> -#include <stdlib.h> -#include <reent.h> - -/* - * Convert a string to a long long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -long long -_DEFUN (_strtoll_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST char *nptr _AND - char **endptr _AND - int base) -{ - register const char *s = nptr; - register unsigned long long acc; - register int c; - register unsigned long long cutoff; - register int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') { - neg = 1; - c = *s++; - } else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long long)LONG_LONG_MIN : LONG_LONG_MAX; - cutlim = cutoff % (unsigned long long)base; - cutoff /= (unsigned long long)base; - for (acc = 0, any = 0;; c = *s++) { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = neg ? LONG_LONG_MIN : LONG_LONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (char *) (any ? s - 1 : nptr); - return (acc); -} - -#endif /* __GNUC__ */ diff --git a/newlib/libc/stdlib/strtoul.c b/newlib/libc/stdlib/strtoul.c deleted file mode 100644 index a3ac09d8e..000000000 --- a/newlib/libc/stdlib/strtoul.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -FUNCTION - <<strtoul>>---string to unsigned long - -INDEX - strtoul -INDEX - _strtoul_r - -ANSI_SYNOPSIS - #include <stdlib.h> - unsigned long strtoul(const char *<[s]>, char **<[ptr]>, - int <[base]>); - - unsigned long _strtoul_r(void *<[reent]>, const char *<[s]>, - char **<[ptr]>, int <[base]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - unsigned long strtoul(<[s]>, <[ptr]>, <[base]>) - char *<[s]>; - char **<[ptr]>; - int <[base]>; - - unsigned long _strtoul_r(<[reent]>, <[s]>, <[ptr]>, <[base]>) - char *<[reent]>; - char *<[s]>; - char **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<strtoul>> converts the string <<*<[s]>>> to -an <<unsigned long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of the digits meaningful in the radix specified by <[base]> -(for example, <<0>> through <<7>> if the value of <[base]> is 8); -and a trailing portion consisting of one or more unparseable characters, -which always includes the terminating null character. Then, it attempts -to convert the subject string into an unsigned long integer, and returns the -result. - -If the value of <[base]> is zero, the subject string is expected to look -like a normal C integer constant (save that no optional sign is permitted): -a possible <<0x>> indicating hexadecimal radix, and a number. -If <[base]> is between 2 and 36, the expected form of the subject is a -sequence of digits (which may include letters, depending on the -base) representing an integer in the radix specified by <[base]>. -The letters <<a>>--<<z>> (or <<A>>--<<Z>>) are used as digits valued from -10 to 35. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<strtoul>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading <<0>> and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (that is, if <<*>><[s]> does not start -with a substring in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_strtoul_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - - -RETURNS -<<strtoul>> returns the converted value, if any. If no conversion was -made, <<0>> is returned. - -<<strtoul>> returns <<ULONG_MAX>> if the magnitude of the converted -value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<strtoul>> is ANSI. - -<<strtoul>> requires no supporting OS subroutines. -*/ - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <limits.h> -#include <ctype.h> -#include <errno.h> -#include <stdlib.h> -#include <reent.h> - -/* - * Convert a string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -unsigned long -_DEFUN (_strtoul_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST char *nptr _AND - char **endptr _AND - int base) -{ - register const char *s = nptr; - register unsigned long acc; - register int c; - register unsigned long cutoff; - register int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') { - neg = 1; - c = *s++; - } else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; - cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = ULONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (char *) (any ? s - 1 : nptr); - return (acc); -} - -#ifndef _REENT_ONLY - -unsigned long -_DEFUN (strtoul, (s, ptr, base), - _CONST char *s _AND - char **ptr _AND - int base) -{ - return _strtoul_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/strtoull.c b/newlib/libc/stdlib/strtoull.c deleted file mode 100644 index ec168b7f9..000000000 --- a/newlib/libc/stdlib/strtoull.c +++ /dev/null @@ -1,139 +0,0 @@ -/* -FUNCTION - <<strtoull>>---string to unsigned long long - -INDEX - strtoull -INDEX - _strtoull_r - -ANSI_SYNOPSIS - #include <stdlib.h> - unsigned long long strtoull(const char *<[s]>, char **<[ptr]>, - int <[base]>); - - unsigned long long _strtoull_r(void *<[reent]>, const char *<[s]>, - char **<[ptr]>, int <[base]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - unsigned long long strtoull(<[s]>, <[ptr]>, <[base]>) - char *<[s]>; - char **<[ptr]>; - int <[base]>; - - unsigned long long _strtoull_r(<[reent]>, <[s]>, <[ptr]>, <[base]>) - char *<[reent]>; - char *<[s]>; - char **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<strtoull>> converts the string <<*<[s]>>> to -an <<unsigned long long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of the digits meaningful in the radix specified by <[base]> -(for example, <<0>> through <<7>> if the value of <[base]> is 8); -and a trailing portion consisting of one or more unparseable characters, -which always includes the terminating null character. Then, it attempts -to convert the subject string into an unsigned long long integer, and returns the -result. - -If the value of <[base]> is zero, the subject string is expected to look -like a normal C integer constant (save that no optional sign is permitted): -a possible <<0x>> indicating hexadecimal radix, and a number. -If <[base]> is between 2 and 36, the expected form of the subject is a -sequence of digits (which may include letters, depending on the -base) representing an integer in the radix specified by <[base]>. -The letters <<a>>--<<z>> (or <<A>>--<<Z>>) are used as digits valued from -10 to 35. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<strtoull>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading <<0>> and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (that is, if <<*>><[s]> does not start -with a substring in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_strtoull_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - - -RETURNS -<<strtoull>> returns the converted value, if any. If no conversion was -made, <<0>> is returned. - -<<strtoull>> returns <<ULONG_LONG_MAX>> if the magnitude of the converted -value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<strtoull>> is ANSI. - -<<strtoull>> requires no supporting OS subroutines. -*/ - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <limits.h> -#include <ctype.h> -#include <errno.h> -#include <stdlib.h> -#include <reent.h> - -#ifndef _REENT_ONLY - -unsigned long long -_DEFUN (strtoull, (s, ptr, base), - _CONST char *s _AND - char **ptr _AND - int base) -{ - return _strtoull_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/strtoull_r.c b/newlib/libc/stdlib/strtoull_r.c deleted file mode 100644 index d8a86b3f4..000000000 --- a/newlib/libc/stdlib/strtoull_r.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - This code is based on strtoul.c which has the following copyright. - It is used to convert a string into an unsigned long long. - - long long _strtoull_r (struct _reent *rptr, const char *s, - char **ptr, int base); - -*/ - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef __GNUC__ - -#define _GNU_SOURCE -#include <_ansi.h> -#include <limits.h> -#include <ctype.h> -#include <errno.h> -#include <stdlib.h> -#include <reent.h> - -/* - * Convert a string to an unsigned long long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -unsigned long long -_DEFUN (_strtoull_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST char *nptr _AND - char **endptr _AND - int base) -{ - register const char *s = nptr; - register unsigned long long acc; - register int c; - register unsigned long long cutoff; - register int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') { - neg = 1; - c = *s++; - } else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - cutoff = (unsigned long long)ULONG_LONG_MAX / (unsigned long long)base; - cutlim = (unsigned long long)ULONG_LONG_MAX % (unsigned long long)base; - for (acc = 0, any = 0;; c = *s++) { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = ULONG_LONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (char *) (any ? s - 1 : nptr); - return (acc); -} - -#endif /* __GNUC__ */ diff --git a/newlib/libc/stdlib/system.c b/newlib/libc/stdlib/system.c deleted file mode 100644 index 135a9d05b..000000000 --- a/newlib/libc/stdlib/system.c +++ /dev/null @@ -1,191 +0,0 @@ -/* -FUNCTION -<<system>>---execute command string - -INDEX - system -INDEX - _system_r - -ANSI_SYNOPSIS - #include <stdlib.h> - int system(char *<[s]>); - - int _system_r(void *<[reent]>, char *<[s]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int system(<[s]>) - char *<[s]>; - - int _system_r(<[reent]>, <[s]>) - char *<[reent]>; - char *<[s]>; - -DESCRIPTION - -Use <<system>> to pass a command string <<*<[s]>>> to <</bin/sh>> on -your system, and wait for it to finish executing. - -Use ``<<system(NULL)>>'' to test whether your system has <</bin/sh>> -available. - -The alternate function <<_system_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<system(NULL)>> returns a non-zero value if <</bin/sh>> is available, and -<<0>> if it is not. - -With a command argument, the result of <<system>> is the exit status -returned by <</bin/sh>>. - -PORTABILITY -ANSI C requires <<system>>, but leaves the nature and effects of a -command processor undefined. ANSI C does, however, specify that -<<system(NULL)>> return zero or nonzero to report on the existence of -a command processor. - -POSIX.2 requires <<system>>, and requires that it invoke a <<sh>>. -Where <<sh>> is found is left unspecified. - -Supporting OS subroutines required: <<_exit>>, <<_execve>>, <<_fork_r>>, -<<_wait_r>>. -*/ - -#include <_ansi.h> -#include <errno.h> -#include <stddef.h> -#include <stdlib.h> -#include <unistd.h> -#include <_syslist.h> -#include <reent.h> - -#if defined (unix) || defined (__CYGWIN__) -static int _EXFUN(do_system, (struct _reent *ptr _AND _CONST char *s)); -#endif - -int -_DEFUN(_system_r, (ptr, s), - struct _reent *ptr _AND - _CONST char *s) -{ -#if defined(HAVE_SYSTEM) - return _system (s); - ptr = ptr; -#elif defined(NO_EXEC) - if (s == NULL) - return 0; - errno = ENOSYS; - return -1; -#else - - /* ??? How to handle (s == NULL) here is not exactly clear. - If _fork_r fails, that's not really a justification for returning 0. - For now we always return 0 and leave it to each target to explicitly - handle otherwise (this can always be relaxed in the future). */ - -#if defined (unix) || defined (__CYGWIN__) - if (s == NULL) - return 1; - return do_system (ptr, s); -#else - if (s == NULL) - return 0; - errno = ENOSYS; - return -1; -#endif - -#endif -} - -#ifndef _REENT_ONLY - -int -_DEFUN(system, (s), - _CONST char *s) -{ - return _system_r (_REENT, s); -} - -#endif - -#if defined (unix) && !defined (__CYGWIN__) && !defined(__rtems__) -extern char **environ; - -/* Only deal with a pointer to environ, to work around subtle bugs with shared - libraries and/or small data systems where the user declares his own - 'environ'. */ -static char ***p_environ = &environ; - -static int -_DEFUN(do_system, (ptr, s), - struct _reent *ptr _AND - _CONST char *s) -{ - char *argv[4]; - int pid, status; - - argv[0] = "sh"; - argv[1] = "-c"; - argv[2] = (char *) s; - argv[3] = NULL; - - if ((pid = _fork_r (ptr)) == 0) - { - _execve ("/bin/sh", argv, *p_environ); - exit (100); - } - else if (pid == -1) - return -1; - else - { - int rc = _wait_r (ptr, &status); - if (rc == -1) - return -1; - status = (status >> 8) & 0xff; - return status; - } -} -#endif - -#if defined (__CYGWIN__) -static int -_DEFUN(do_system, (ptr, s), - struct _reent *ptr _AND - _CONST char *s) -{ - char *argv[4]; - int pid, status; - - argv[0] = "sh"; - argv[1] = "-c"; - argv[2] = (char *) s; - argv[3] = NULL; - - if ((pid = vfork ()) == 0) - { - /* ??? It's not clear what's the right path to take (pun intended :-). - There won't be an "sh" in any fixed location so we need each user - to be able to say where to find "sh". That suggests using an - environment variable, but after a few more such situations we may - have too many of them. */ - char *sh = getenv ("SH_PATH"); - if (sh == NULL) - sh = "/bin/sh"; - _execve (sh, argv, environ); - exit (100); - } - else if (pid == -1) - return -1; - else - { - extern int _wait (int *); - int rc = _wait (&status); - if (rc == -1) - return -1; - status = (status >> 8) & 0xff; - return status; - } -} -#endif diff --git a/newlib/libc/stdlib/valloc.c b/newlib/libc/stdlib/valloc.c deleted file mode 100644 index 26a44df44..000000000 --- a/newlib/libc/stdlib/valloc.c +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MALLOC_PROVIDED -/* valloc.c -- a wrapper for valloc_r and pvalloc_r. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdlib.h> -#include <malloc.h> - -#ifndef _REENT_ONLY - -_PTR -_DEFUN (valloc, (nbytes), - size_t nbytes) -{ - return _valloc_r (_REENT, nbytes); -} - -_PTR -_DEFUN (pvalloc, (nbytes), - size_t nbytes) -{ - return _pvalloc_r (_REENT, nbytes); -} - -#endif -#endif diff --git a/newlib/libc/stdlib/wcrtomb.c b/newlib/libc/stdlib/wcrtomb.c deleted file mode 100644 index 06e487471..000000000 --- a/newlib/libc/stdlib/wcrtomb.c +++ /dev/null @@ -1,50 +0,0 @@ -#include <reent.h> -#include <newlib.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> - -size_t -_DEFUN (_wcrtomb_r, (ptr, s, wc, ps), - struct _reent *ptr _AND - char *s _AND - wchar_t wc _AND - mbstate_t *ps) -{ - int retval = 0; - char buf[10]; - -#ifdef _MB_CAPABLE - if (ps == NULL) - { - _REENT_CHECK_MISC(ptr); - ps = &(_REENT_WCRTOMB_STATE(ptr)); - } -#endif - - if (s == NULL) - retval = _wctomb_r (ptr, buf, L'\0', ps); - else - retval = _wctomb_r (ptr, s, wc, ps); - - if (retval == -1) - { - ps->__count = 0; - ptr->_errno = EILSEQ; - return (size_t)(-1); - } - else - return (size_t)retval; -} - -#ifndef _REENT_ONLY -size_t -_DEFUN (wcrtomb, (s, wc, ps), - char *s _AND - wchar_t wc _AND - mbstate_t *ps) -{ - return _wcrtomb_r (_REENT, s, wc, ps); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/wcsnrtombs.c b/newlib/libc/stdlib/wcsnrtombs.c deleted file mode 100644 index a8e6901a3..000000000 --- a/newlib/libc/stdlib/wcsnrtombs.c +++ /dev/null @@ -1,184 +0,0 @@ -/* -FUNCTION -<<wcsrtombs>>, <<wcsnrtombs>>---convert a wide-character string to a character string - -INDEX - wcsrtombs -INDEX - _wcsrtombs_r -INDEX - wcsnrtombs -INDEX - _wcsnrtombs_r - -ANSI_SYNOPSIS - #include <wchar.h> - size_t wcsrtombs(char *<[dst]>, const wchar_t **<[src]>, size_t <[len]>, - mbstate_t *<[ps]>); - - #include <wchar.h> - size_t _wcsrtombs_r(struct _reent *<[ptr]>, char *<[dst]>, - const wchar_t **<[src]>, size_t <[len]>, - mbstate_t *<[ps]>); - - #include <wchar.h> - size_t wcsnrtombs(char *<[dst]>, const wchar_t **<[src]>, - size_t <[nwc]>, size_t <[len]>, mbstate_t *<[ps]>); - - #include <wchar.h> - size_t _wcsnrtombs_r(struct _reent *<[ptr]>, char *<[dst]>, - const wchar_t **<[src]>, size_t <[nwc]>, - size_t <[len]>, mbstate_t *<[ps]>); - -TRAD_SYNOPSIS - #include <wchar.h> - size_t wcsrtombs(<[dst]>, <[src]>, <[len]>, <[ps]>) - char *<[dst]>; - const wchar_t **<[src]>; - size_t <[len]>; - mbstate_t *<[ps]>; - - #include <wchar.h> - size_t _wcsrtombs_r(<[ptr]>, <[dst]>, <[src]>, <[len]>, <[ps]>) - struct _rent *<[ptr]>; - char *<[dst]>; - const wchar_t **<[src]>; - size_t <[len]>; - mbstate_t *<[ps]>; - - #include <wchar.h> - size_t wcsnrtombs(<[dst]>, <[src]>, <[nwc]>, <[len]>, <[ps]>) - char *<[dst]>; - const wchar_t **<[src]>; - size_t <[nwc]>; - size_t <[len]>; - mbstate_t *<[ps]>; - - #include <wchar.h> - size_t _wcsnrtombs_r(<[ptr]>, <[dst]>, <[src]>, <[nwc]>, <[len]>, <[ps]>) - struct _rent *<[ptr]>; - char *<[dst]>; - const wchar_t **<[src]>; - size_t <[nwc]>; - size_t <[len]>; - mbstate_t *<[ps]>; - -DESCRIPTION -The <<wcsrtombs>> function converts a string of wide characters indirectly -pointed to by <[src]> to a corresponding multibyte character string stored in -the array pointed to by <[dst}>. No more than <[len]> bytes are written to -<[dst}>. - -If <[dst}> is NULL, no characters are stored. - -If <[dst}> is not NULL, the pointer pointed to by <[src]> is updated to point -to the character after the one that conversion stopped at. If conversion -stops because a null character is encountered, *<[src]> is set to NULL. - -The mbstate_t argument, <[ps]>, is used to keep track of the shift state. If -it is NULL, <<wcsrtombs>> uses an internal, static mbstate_t object, which -is initialized to the initial conversion state at program startup. - -The <<wcsnrtombs>> function behaves identically to <<wcsrtombs>>, except that -conversion stops after reading at most <[nwc]> characters from the buffer -pointed to by <[src]>. - -RETURNS -The <<wcsrtombs>> and <<wcsnrtombs>> functions return the number of bytes -stored in the array pointed to by <[dst]> (not including any terminating -null), if successful, otherwise it returns (size_t)-1. - -PORTABILITY -<<wcsrtombs>> is defined by C99 standard. -<<wcsnrtombs>> is defined by the POSIX.1-2008 standard. -*/ - -#include <reent.h> -#include <newlib.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> - -size_t -_DEFUN (_wcsnrtombs_r, (r, dst, src, nwc, len, ps), - struct _reent *r _AND - char *dst _AND - const wchar_t **src _AND - size_t nwc _AND - size_t len _AND - mbstate_t *ps) -{ - char *ptr = dst; - char buff[10]; - wchar_t *pwcs; - size_t n; - int i; - -#ifdef _MB_CAPABLE - if (ps == NULL) - { - _REENT_CHECK_MISC(r); - ps = &(_REENT_WCSRTOMBS_STATE(r)); - } -#endif - - /* If no dst pointer, treat len as maximum possible value. */ - if (dst == NULL) - len = (size_t)-1; - - n = 0; - pwcs = (wchar_t *)(*src); - - while (n < len && nwc-- > 0) - { - int count = ps->__count; - wint_t wch = ps->__value.__wch; - int bytes = _wcrtomb_r (r, buff, *pwcs, ps); - if (bytes == -1) - { - r->_errno = EILSEQ; - ps->__count = 0; - return (size_t)-1; - } - if (n + bytes <= len) - { - n += bytes; - if (dst) - { - for (i = 0; i < bytes; ++i) - *ptr++ = buff[i]; - ++(*src); - } - if (*pwcs++ == 0x00) - { - if (dst) - *src = NULL; - ps->__count = 0; - return n - 1; - } - } - else - { - /* not enough room, we must back up state to before _wctomb_r call */ - ps->__count = count; - ps->__value.__wch = wch; - len = 0; - } - } - - return n; -} - -#ifndef _REENT_ONLY -size_t -_DEFUN (wcsnrtombs, (dst, src, nwc, len, ps), - char *dst _AND - const wchar_t **src _AND - size_t nwc _AND - size_t len _AND - mbstate_t *ps) -{ - return _wcsnrtombs_r (_REENT, dst, src, nwc, len, ps); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/wcsrtombs.c b/newlib/libc/stdlib/wcsrtombs.c deleted file mode 100644 index ea6bd9d43..000000000 --- a/newlib/libc/stdlib/wcsrtombs.c +++ /dev/null @@ -1,26 +0,0 @@ -#include <reent.h> -#include <newlib.h> -#include <wchar.h> - -size_t -_DEFUN (_wcsrtombs_r, (r, dst, src, len, ps), - struct _reent *r _AND - char *dst _AND - const wchar_t **src _AND - size_t len _AND - mbstate_t *ps) -{ - return _wcsnrtombs_r (r, dst, src, (size_t) -1, len, ps); -} - -#ifndef _REENT_ONLY -size_t -_DEFUN (wcsrtombs, (dst, src, len, ps), - char *dst _AND - const wchar_t **src _AND - size_t len _AND - mbstate_t *ps) -{ - return _wcsnrtombs_r (_REENT, dst, src, (size_t) -1, len, ps); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/wcstod.c b/newlib/libc/stdlib/wcstod.c deleted file mode 100644 index 6b8be5e73..000000000 --- a/newlib/libc/stdlib/wcstod.c +++ /dev/null @@ -1,230 +0,0 @@ -/* -FUNCTION - <<wcstod>>, <<wcstof>>---wide char string to double or float - -INDEX - wcstod -INDEX - _wcstod_r -INDEX - wcstof -INDEX - _wcstof_r - -ANSI_SYNOPSIS - #include <stdlib.h> - double wcstod(const wchar_t *<[str]>, wchar_t **<[tail]>); - float wcstof(const wchar_t *<[str]>, wchar_t **<[tail]>); - - double _wcstod_r(void *<[reent]>, - const wchar_t *<[str]>, wchar_t **<[tail]>); - float _wcstof_r(void *<[reent]>, - const wchar_t *<[str]>, wchar_t **<[tail]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - double wcstod(<[str]>,<[tail]>) - wchar_t *<[str]>; - wchar_t **<[tail]>; - - float wcstof(<[str]>,<[tail]>) - wchar_t *<[str]>; - wchar_t **<[tail]>; - - double _wcstod_r(<[reent]>,<[str]>,<[tail]>) - wchar_t *<[reent]>; - wchar_t *<[str]>; - wchar_t **<[tail]>; - - float _wcstof_r(<[reent]>,<[str]>,<[tail]>) - wchar_t *<[reent]>; - wchar_t *<[str]>; - wchar_t **<[tail]>; - -DESCRIPTION - The function <<wcstod>> parses the wide character string <[str]>, - producing a substring which can be converted to a double - value. The substring converted is the longest initial - subsequence of <[str]>, beginning with the first - non-whitespace character, that has one of these formats: - .[+|-]<[digits]>[.[<[digits]>]][(e|E)[+|-]<[digits]>] - .[+|-].<[digits]>[(e|E)[+|-]<[digits]>] - .[+|-](i|I)(n|N)(f|F)[(i|I)(n|N)(i|I)(t|T)(y|Y)] - .[+|-](n|N)(a|A)(n|N)[<(>[<[hexdigits]>]<)>] - .[+|-]0(x|X)<[hexdigits]>[.[<[hexdigits]>]][(p|P)[+|-]<[digits]>] - .[+|-]0(x|X).<[hexdigits]>[(p|P)[+|-]<[digits]>] - The substring contains no characters if <[str]> is empty, consists - entirely of whitespace, or if the first non-whitespace - character is something other than <<+>>, <<->>, <<.>>, or a - digit, and cannot be parsed as infinity or NaN. If the platform - does not support NaN, then NaN is treated as an empty substring. - If the substring is empty, no conversion is done, and - the value of <[str]> is stored in <<*<[tail]>>>. Otherwise, - the substring is converted, and a pointer to the final string - (which will contain at least the terminating null character of - <[str]>) is stored in <<*<[tail]>>>. If you want no - assignment to <<*<[tail]>>>, pass a null pointer as <[tail]>. - <<wcstof>> is identical to <<wcstod>> except for its return type. - - This implementation returns the nearest machine number to the - input decimal string. Ties are broken by using the IEEE - round-even rule. However, <<wcstof>> is currently subject to - double rounding errors. - - The alternate functions <<_wcstod_r>> and <<_wcstof_r>> are - reentrant versions of <<wcstod>> and <<wcstof>>, respectively. - The extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS - Return the converted substring value, if any. If - no conversion could be performed, 0 is returned. If the - correct value is out of the range of representable values, - plus or minus <<HUGE_VAL>> is returned, and <<ERANGE>> is - stored in errno. If the correct value would cause underflow, 0 - is returned and <<ERANGE>> is stored in errno. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -/*- - * Copyright (c) 2002 Tim J. Robbins - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include <wchar.h> -#include <wctype.h> -#include <locale.h> -#include <math.h> - -double -_DEFUN (_wcstod_r, (ptr, nptr, endptr), - struct _reent *ptr _AND - _CONST wchar_t *nptr _AND - wchar_t **endptr) -{ - static const mbstate_t initial; - mbstate_t mbs; - double val; - char *buf, *end; - const wchar_t *wcp; - size_t len; - - while (iswspace(*nptr)) - nptr++; - - /* - * Convert the supplied numeric wide char. string to multibyte. - * - * We could attempt to find the end of the numeric portion of the - * wide char. string to avoid converting unneeded characters but - * choose not to bother; optimising the uncommon case where - * the input string contains a lot of text after the number - * duplicates a lot of strtod()'s functionality and slows down the - * most common cases. - */ - wcp = nptr; - mbs = initial; - if ((len = _wcsrtombs_r(ptr, NULL, &wcp, 0, &mbs)) == (size_t)-1) { - if (endptr != NULL) - *endptr = (wchar_t *)nptr; - return (0.0); - } - if ((buf = _malloc_r(ptr, len + 1)) == NULL) - return (0.0); - mbs = initial; - _wcsrtombs_r(ptr, buf, &wcp, len + 1, &mbs); - - /* Let strtod() do most of the work for us. */ - val = _strtod_r(ptr, buf, &end); - - /* - * We only know where the number ended in the _multibyte_ - * representation of the string. If the caller wants to know - * where it ended, count multibyte characters to find the - * corresponding position in the wide char string. - */ - if (endptr != NULL) { - /* The only valid multibyte char in a float converted by - strtod/wcstod is the radix char. What we do here is, - figure out if the radix char was in the valid leading - float sequence in the incoming string. If so, the - multibyte float string is strlen(radix char) - 1 bytes - longer than the incoming wide char string has characters. - To fix endptr, reposition end as if the radix char was - just one byte long. The resulting difference (end - buf) - is then equivalent to the number of valid wide characters - in the input string. */ - len = strlen (_localeconv_r (ptr)->decimal_point); - if (len > 1) { - char *d = strstr (buf, - _localeconv_r (ptr)->decimal_point); - if (d && d < end) - end -= len - 1; - } - *endptr = (wchar_t *)nptr + (end - buf); - } - - _free_r(ptr, buf); - - return (val); -} - -float -_DEFUN (_wcstof_r, (ptr, nptr, endptr), - struct _reent *ptr _AND - _CONST wchar_t *nptr _AND - wchar_t **endptr) -{ - double retval = _wcstod_r (ptr, nptr, endptr); - if (isnan (retval)) - return nanf (NULL); - return (float)retval; -} - -#ifndef NO_REENT - -double -_DEFUN (wcstod, (nptr, endptr), - _CONST wchar_t *nptr _AND wchar_t **endptr) -{ - return _wcstod_r (_REENT, nptr, endptr); -} - -float -_DEFUN (wcstof, (nptr, endptr), - _CONST wchar_t *nptr _AND - wchar_t **endptr) -{ - double retval = _wcstod_r (_REENT, nptr, endptr); - if (isnan (retval)) - return nanf (NULL); - return (float)retval; -} - -#endif diff --git a/newlib/libc/stdlib/wcstol.c b/newlib/libc/stdlib/wcstol.c deleted file mode 100644 index e23254dc2..000000000 --- a/newlib/libc/stdlib/wcstol.c +++ /dev/null @@ -1,226 +0,0 @@ -/* -FUNCTION - <<wcstol>>---wide string to long - -INDEX - wcstol -INDEX - _wcstol_r - -ANSI_SYNOPSIS - #include <wchar.h> - long wcstol(const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>); - - long _wcstol_r(void *<[reent]>, - const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - long wcstol (<[s]>, <[ptr]>, <[base]>) - wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - - long _wcstol_r (<[reent]>, <[s]>, <[ptr]>, <[base]>) - struct _reent *<[reent]>; - wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<wcstol>> converts the wide string <<*<[s]>>> to -a <<long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of characters resembling an integer in the radix specified by <[base]>; -and a trailing portion consisting of zero or more unparseable characters, -and always including the terminating null character. Then, it attempts -to convert the subject string into a <<long>> and returns the -result. - -If the value of <[base]> is 0, the subject string is expected to look -like a normal C integer constant: an optional sign, a possible `<<0x>>' -indicating a hexadecimal base, and a number. If <[base]> is between -2 and 36, the expected form of the subject is a sequence of letters -and digits representing an integer in the radix specified by <[base]>, -with an optional plus or minus sign. The letters <<a>>--<<z>> (or, -equivalently, <<A>>--<<Z>>) are used to signify values from 10 to 35; -only letters whose ascribed values are less than <[base]> are -permitted. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible letter or digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<wcstol>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading 0 and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. If the subject string begins with -a minus sign, the value is negated. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (or not in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_wcstol_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<wcstol>> returns the converted value, if any. If no conversion was -made, 0 is returned. - -<<wcstol>> returns <<LONG_MAX>> or <<LONG_MIN>> if the magnitude of -the converted value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<wcstol>> is ANSI. - -No supporting OS subroutines are required. -*/ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -#include <_ansi.h> -#include <limits.h> -#include <wctype.h> -#include <errno.h> -#include <wchar.h> -#include <reent.h> - -/* - * Convert a wide string to a long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -long -_DEFUN (_wcstol_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST wchar_t *nptr _AND - wchar_t **endptr _AND - int base) -{ - register const wchar_t *s = nptr; - register unsigned long acc; - register int c; - register unsigned long cutoff; - register int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (iswspace(c)); - if (c == L'-') { - neg = 1; - c = *s++; - } else if (c == L'+') - c = *s++; - if ((base == 0 || base == 16) && - c == L'0' && (*s == L'x' || *s == L'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == L'0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; - cutlim = cutoff % (unsigned long)base; - cutoff /= (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) { - if (iswdigit(c)) - c -= L'0'; - else if (iswalpha(c)) - c -= iswupper(c) ? L'A' - 10 : L'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = neg ? LONG_MIN : LONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (wchar_t *) (any ? s - 1 : nptr); - return (acc); -} - -#ifndef _REENT_ONLY - -long -_DEFUN (wcstol, (s, ptr, base), - _CONST wchar_t *s _AND - wchar_t **ptr _AND - int base) -{ - return _wcstol_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/wcstold.c b/newlib/libc/stdlib/wcstold.c deleted file mode 100644 index 8b0ba2440..000000000 --- a/newlib/libc/stdlib/wcstold.c +++ /dev/null @@ -1,42 +0,0 @@ -/* -(C) Copyright IBM Corp. 2009 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -* Neither the name of IBM nor the names of its contributors may be -used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <stdlib.h> -#include "local.h" - -/* On platforms where long double is as wide as double. */ -#ifdef _LDBL_EQ_DBL -long double -wcstold (const wchar_t *nptr, wchar_t **endptr) -{ - return wcstod(nptr, endptr); -} -#endif /* _LDBL_EQ_DBL */ - diff --git a/newlib/libc/stdlib/wcstoll.c b/newlib/libc/stdlib/wcstoll.c deleted file mode 100644 index 75eda9f6c..000000000 --- a/newlib/libc/stdlib/wcstoll.c +++ /dev/null @@ -1,138 +0,0 @@ -/* -FUNCTION - <<wcstoll>>---wide string to long long - -INDEX - wcstoll -INDEX - _wcstoll_r - -ANSI_SYNOPSIS - #include <wchar.h> - long long wcstoll(const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>); - - long long _wcstoll_r(void *<[reent]>, - const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - long long wcstoll (<[s]>, <[ptr]>, <[base]>) - const wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - - long long _wcstoll_r (<[reent]>, <[s]>, <[ptr]>, <[base]>) - wchar_t *<[reent]>; - const wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<wcstoll>> converts the wide string <<*<[s]>>> to -a <<long long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of characters resembling an integer in the radix specified by <[base]>; -and a trailing portion consisting of zero or more unparseable characters, -and always including the terminating null character. Then, it attempts -to convert the subject string into a <<long long>> and returns the -result. - -If the value of <[base]> is 0, the subject string is expected to look -like a normal C integer constant: an optional sign, a possible `<<0x>>' -indicating a hexadecimal base, and a number. If <[base]> is between -2 and 36, the expected form of the subject is a sequence of letters -and digits representing an integer in the radix specified by <[base]>, -with an optional plus or minus sign. The letters <<a>>--<<z>> (or, -equivalently, <<A>>--<<Z>>) are used to signify values from 10 to 35; -only letters whose ascribed values are less than <[base]> are -permitted. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible letter or digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<wcstoll>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading 0 and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. If the subject string begins with -a minus sign, the value is negated. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (or not in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_wcstoll_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<wcstoll>> returns the converted value, if any. If no conversion was -made, 0 is returned. - -<<wcstoll>> returns <<LONG_LONG_MAX>> or <<LONG_LONG_MIN>> if the magnitude of -the converted value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<wcstoll>> is ANSI. - -No supporting OS subroutines are required. -*/ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -#include <_ansi.h> -#include <limits.h> -#include <wctype.h> -#include <errno.h> -#include <wchar.h> -#include <reent.h> - -#ifndef _REENT_ONLY - -long long -_DEFUN (wcstoll, (s, ptr, base), - _CONST wchar_t *s _AND - wchar_t **ptr _AND - int base) -{ - return _wcstoll_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/wcstoll_r.c b/newlib/libc/stdlib/wcstoll_r.c deleted file mode 100644 index d6baacaf5..000000000 --- a/newlib/libc/stdlib/wcstoll_r.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - This code is based on strtoul.c which has the following copyright. - It is used to convert a wide string into a signed long long. - - long long _wcstoll_r (struct _reent *rptr, const wchar_t *s, - wchar_t **ptr, int base); -*/ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef __GNUC__ - -#define _GNU_SOURCE -#include <_ansi.h> -#include <limits.h> -#include <wctype.h> -#include <errno.h> -#include <wchar.h> -#include <reent.h> - -/* - * Convert a wide string to a long long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -long long -_DEFUN (_wcstoll_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST wchar_t *nptr _AND - wchar_t **endptr _AND - int base) -{ - register const wchar_t *s = nptr; - register unsigned long long acc; - register int c; - register unsigned long long cutoff; - register int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (iswspace(c)); - if (c == L'-') { - neg = 1; - c = *s++; - } else if (c == L'+') - c = *s++; - if ((base == 0 || base == 16) && - c == L'0' && (*s == L'x' || *s == L'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == L'0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long long)LONG_LONG_MIN : LONG_LONG_MAX; - cutlim = cutoff % (unsigned long long)base; - cutoff /= (unsigned long long)base; - for (acc = 0, any = 0;; c = *s++) { - if (iswdigit(c)) - c -= L'0'; - else if (iswalpha(c)) - c -= iswupper(c) ? L'A' - 10 : L'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = neg ? LONG_LONG_MIN : LONG_LONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (wchar_t *) (any ? s - 1 : nptr); - return (acc); -} - -#endif /* __GNUC__ */ diff --git a/newlib/libc/stdlib/wcstombs.c b/newlib/libc/stdlib/wcstombs.c deleted file mode 100644 index d0ef26e53..000000000 --- a/newlib/libc/stdlib/wcstombs.c +++ /dev/null @@ -1,83 +0,0 @@ -/* -FUNCTION -<<wcstombs>>---minimal wide char string to multibyte string converter - -INDEX - wcstombs - -ANSI_SYNOPSIS - #include <stdlib.h> - size_t wcstombs(char *<[s]>, const wchar_t *<[pwc]>, size_t <[n]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - size_t wcstombs(<[s]>, <[pwc]>, <[n]>) - char *<[s]>; - const wchar_t *<[pwc]>; - size_t <[n]>; - -DESCRIPTION -When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming -implementation of <<wcstombs>>. In this case, -all wide-characters are expected to represent single bytes and so -are converted simply by casting to char. - -When _MB_CAPABLE is defined, this routine calls <<_wcstombs_r>> to perform -the conversion, passing a state variable to allow state dependent -decoding. The result is based on the locale setting which may -be restricted to a defined set of locales. - -RETURNS -This implementation of <<wcstombs>> returns <<0>> if -<[s]> is <<NULL>> or is the empty string; -it returns <<-1>> if _MB_CAPABLE and one of the -wide-char characters does not represent a valid multi-byte character; -otherwise it returns the minimum of: <<n>> or the -number of bytes that are transferred to <<s>>, not including the -nul terminator. - -If the return value is -1, the state of the <<pwc>> string is -indeterminate. If the input has a length of 0, the output -string will be modified to contain a wchar_t nul terminator if -<<n>> > 0. - -PORTABILITY -<<wcstombs>> is required in the ANSI C standard. However, the precise -effects vary with the locale. - -<<wcstombs>> requires no supporting OS subroutines. -*/ - -#ifndef _REENT_ONLY - -#include <newlib.h> -#include <stdlib.h> -#include <wchar.h> - -size_t -_DEFUN (wcstombs, (s, pwcs, n), - char *s _AND - const wchar_t *pwcs _AND - size_t n) -{ -#ifdef _MB_CAPABLE - mbstate_t state; - state.__count = 0; - - return _wcstombs_r (_REENT, s, pwcs, n, &state); -#else /* not _MB_CAPABLE */ - int count = 0; - - if (n != 0) { - do { - if ((*s++ = (char) *pwcs++) == 0) - break; - count++; - } while (--n != 0); - } - - return count; -#endif /* not _MB_CAPABLE */ -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/wcstombs_r.c b/newlib/libc/stdlib/wcstombs_r.c deleted file mode 100644 index dd82bd383..000000000 --- a/newlib/libc/stdlib/wcstombs_r.c +++ /dev/null @@ -1,42 +0,0 @@ -#include <stdlib.h> -#include <wchar.h> - -size_t -_DEFUN (_wcstombs_r, (reent, s, pwcs, n, state), - struct _reent *r _AND - char *s _AND - const wchar_t *pwcs _AND - size_t n _AND - mbstate_t *state) -{ - char *ptr = s; - size_t max = n; - char buff[8]; - int i, num_to_copy; - - if (s == NULL) - { - size_t num_bytes = 0; - while (*pwcs != 0) - num_bytes += _wctomb_r (r, buff, *pwcs++, state); - return num_bytes; - } - else - { - while (n > 0) - { - int bytes = _wctomb_r (r, buff, *pwcs, state); - if (bytes == -1) - return -1; - num_to_copy = (n > bytes ? bytes : (int)n); - for (i = 0; i < num_to_copy; ++i) - *ptr++ = buff[i]; - - if (*pwcs == 0x00) - return ptr - s - (n >= bytes); - ++pwcs; - n -= num_to_copy; - } - return max; - } -} diff --git a/newlib/libc/stdlib/wcstoul.c b/newlib/libc/stdlib/wcstoul.c deleted file mode 100644 index 44dfca399..000000000 --- a/newlib/libc/stdlib/wcstoul.c +++ /dev/null @@ -1,207 +0,0 @@ -/* -FUNCTION - <<wcstoul>>---wide string to unsigned long - -INDEX - wcstoul -INDEX - _wcstoul_r - -ANSI_SYNOPSIS - #include <wchar.h> - unsigned long wcstoul(const wchar_t *<[s]>, wchar_t **<[ptr]>, - int <[base]>); - - unsigned long _wcstoul_r(void *<[reent]>, const wchar_t *<[s]>, - wchar_t **<[ptr]>, int <[base]>); - -TRAD_SYNOPSIS - #include <wchar.h> - unsigned long wcstoul(<[s]>, <[ptr]>, <[base]>) - wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - - unsigned long _wcstoul_r(<[reent]>, <[s]>, <[ptr]>, <[base]>) - wchar_t *<[reent]>; - wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<wcstoul>> converts the wide string <<*<[s]>>> to -an <<unsigned long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of the digits meaningful in the radix specified by <[base]> -(for example, <<0>> through <<7>> if the value of <[base]> is 8); -and a trailing portion consisting of one or more unparseable characters, -which always includes the terminating null character. Then, it attempts -to convert the subject string into an unsigned long integer, and returns the -result. - -If the value of <[base]> is zero, the subject string is expected to look -like a normal C integer constant (save that no optional sign is permitted): -a possible <<0x>> indicating hexadecimal radix, and a number. -If <[base]> is between 2 and 36, the expected form of the subject is a -sequence of digits (which may include letters, depending on the -base) representing an integer in the radix specified by <[base]>. -The letters <<a>>--<<z>> (or <<A>>--<<Z>>) are used as digits valued from -10 to 35. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<wcstoul>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading <<0>> and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (that is, if <<*>><[s]> does not start -with a substring in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_wcstoul_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - - -RETURNS -<<wcstoul>> returns the converted value, if any. If no conversion was -made, <<0>> is returned. - -<<wcstoul>> returns <<ULONG_MAX>> if the magnitude of the converted -value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<wcstoul>> is ANSI. - -<<wcstoul>> requires no supporting OS subroutines. -*/ - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <limits.h> -#include <wctype.h> -#include <wchar.h> -#include <errno.h> -#include <stdlib.h> -#include <reent.h> - -/* - * Convert a wide string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -unsigned long -_DEFUN (_wcstoul_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST wchar_t *nptr _AND - wchar_t **endptr _AND - int base) -{ - register const wchar_t *s = nptr; - register unsigned long acc; - register int c; - register unsigned long cutoff; - register int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (iswspace(c)); - if (c == L'-') { - neg = 1; - c = *s++; - } else if (c == L'+') - c = *s++; - if ((base == 0 || base == 16) && - c == L'0' && (*s == L'x' || *s == L'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == L'0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; - cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) { - if (iswdigit(c)) - c -= L'0'; - else if (iswalpha(c)) - c -= iswupper(c) ? L'A' - 10 : L'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = ULONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (wchar_t *) (any ? s - 1 : nptr); - return (acc); -} - -#ifndef _REENT_ONLY - -unsigned long -_DEFUN (wcstoul, (s, ptr, base), - _CONST wchar_t *s _AND - wchar_t **ptr _AND - int base) -{ - return _wcstoul_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/wcstoull.c b/newlib/libc/stdlib/wcstoull.c deleted file mode 100644 index 76caadf23..000000000 --- a/newlib/libc/stdlib/wcstoull.c +++ /dev/null @@ -1,140 +0,0 @@ -/* -FUNCTION - <<wcstoull>>---wide string to unsigned long long - -INDEX - wcstoull -INDEX - _wcstoull_r - -ANSI_SYNOPSIS - #include <wchar.h> - unsigned long long wcstoull(const wchar_t *<[s]>, wchar_t **<[ptr]>, - int <[base]>); - - unsigned long long _wcstoull_r(void *<[reent]>, const wchar_t *<[s]>, - wchar_t **<[ptr]>, int <[base]>); - -TRAD_SYNOPSIS - #include <wchar.h> - unsigned long long wcstoull(<[s]>, <[ptr]>, <[base]>) - wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - - unsigned long long _wcstoull_r(<[reent]>, <[s]>, <[ptr]>, <[base]>) - wchar_t *<[reent]>; - wchar_t *<[s]>; - wchar_t **<[ptr]>; - int <[base]>; - -DESCRIPTION -The function <<wcstoull>> converts the wide string <<*<[s]>>> to -an <<unsigned long long>>. First, it breaks down the string into three parts: -leading whitespace, which is ignored; a subject string consisting -of the digits meaningful in the radix specified by <[base]> -(for example, <<0>> through <<7>> if the value of <[base]> is 8); -and a trailing portion consisting of one or more unparseable characters, -which always includes the terminating null character. Then, it attempts -to convert the subject string into an unsigned long long integer, and returns the -result. - -If the value of <[base]> is zero, the subject string is expected to look -like a normal C integer constant: an optional sign (<<+>> or <<->>), -a possible <<0x>> indicating hexadecimal radix or a possible <0> indicating -octal radix, and a number. -If <[base]> is between 2 and 36, the expected form of the subject is a -sequence of digits (which may include letters, depending on the -base) representing an integer in the radix specified by <[base]>. -The letters <<a>>--<<z>> (or <<A>>--<<Z>>) are used as digits valued from -10 to 35. If <[base]> is 16, a leading <<0x>> is permitted. - -The subject sequence is the longest initial sequence of the input -string that has the expected form, starting with the first -non-whitespace character. If the string is empty or consists entirely -of whitespace, or if the first non-whitespace character is not a -permissible digit, the subject string is empty. - -If the subject string is acceptable, and the value of <[base]> is zero, -<<wcstoull>> attempts to determine the radix from the input string. A -string with a leading <<0x>> is treated as a hexadecimal value; a string with -a leading <<0>> and no <<x>> is treated as octal; all other strings are -treated as decimal. If <[base]> is between 2 and 36, it is used as the -conversion radix, as described above. Finally, a pointer to the first -character past the converted subject string is stored in <[ptr]>, if -<[ptr]> is not <<NULL>>. - -If the subject string is empty (that is, if <<*>><[s]> does not start -with a substring in acceptable form), no conversion -is performed and the value of <[s]> is stored in <[ptr]> (if <[ptr]> is -not <<NULL>>). - -The alternate function <<_wcstoull_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - - -RETURNS -<<wcstoull>> returns <<0>> and sets <<errno>> to <<EINVAL>> if the value of -<[base]> is not supported. - -<<wcstoull>> returns the converted value, if any. If no conversion was -made, <<0>> is returned. - -<<wcstoull>> returns <<ULLONG_MAX>> if the magnitude of the converted -value is too large, and sets <<errno>> to <<ERANGE>>. - -PORTABILITY -<<wcstoull>> is ANSI. - -<<wcstoull>> requires no supporting OS subroutines. -*/ - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <wchar.h> -#include <reent.h> - -#ifndef _REENT_ONLY - -unsigned long long -_DEFUN (wcstoull, (s, ptr, base), - _CONST wchar_t *s _AND - wchar_t **ptr _AND - int base) -{ - return _wcstoull_r (_REENT, s, ptr, base); -} - -#endif diff --git a/newlib/libc/stdlib/wcstoull_r.c b/newlib/libc/stdlib/wcstoull_r.c deleted file mode 100644 index abad681a3..000000000 --- a/newlib/libc/stdlib/wcstoull_r.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - This code is based on wcstoul.c which has the following copyright. - It is used to convert a wide string into an unsigned long long. - - unsigned long long _wcstoull_r (struct _reent *rptr, const wchar_t *s, - wchar_t **ptr, int base); - -*/ - -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef __GNUC__ - -#define _GNU_SOURCE -#include <_ansi.h> -#include <limits.h> -#include <wchar.h> -#include <wctype.h> -#include <errno.h> -#include <reent.h> - -/* Make up for older non-compliant limits.h. (This is a C99/POSIX function, - * and both require ULLONG_MAX in limits.h.) */ -#if !defined(ULLONG_MAX) -# define ULLONG_MAX ULONG_LONG_MAX -#endif - -/* - * Convert a wide string to an unsigned long long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -unsigned long long -_DEFUN (_wcstoull_r, (rptr, nptr, endptr, base), - struct _reent *rptr _AND - _CONST wchar_t *nptr _AND - wchar_t **endptr _AND - int base) -{ - register const wchar_t *s = nptr; - register unsigned long long acc; - register int c; - register unsigned long long cutoff; - register int neg = 0, any, cutlim; - - if(base < 0 || base == 1 || base > 36) { - rptr->_errno = EINVAL; - return(0ULL); - } - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (iswspace(c)); - if (c == L'-') { - neg = 1; - c = *s++; - } else if (c == L'+') - c = *s++; - if ((base == 0 || base == 16) && - c == L'0' && (*s == L'x' || *s == L'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == L'0' ? 8 : 10; - cutoff = (unsigned long long)ULLONG_MAX / (unsigned long long)base; - cutlim = (unsigned long long)ULLONG_MAX % (unsigned long long)base; - for (acc = 0, any = 0;; c = *s++) { - if (iswdigit(c)) - c -= L'0'; - else if (iswalpha(c)) - c -= iswupper(c) ? L'A' - 10 : L'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = ULLONG_MAX; - rptr->_errno = ERANGE; - } else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = (wchar_t *) (any ? s - 1 : nptr); - return (acc); -} - -#endif /* __GNUC__ */ diff --git a/newlib/libc/stdlib/wctob.c b/newlib/libc/stdlib/wctob.c deleted file mode 100644 index 37f7f953f..000000000 --- a/newlib/libc/stdlib/wctob.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <reent.h> -#include <wchar.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -int -wctob (wint_t c) -{ - mbstate_t mbs; - int retval = 0; - unsigned char pwc; - - /* Put mbs in initial state. */ - memset (&mbs, '\0', sizeof (mbs)); - - _REENT_CHECK_MISC(_REENT); - - retval = _wctomb_r (_REENT, &pwc, c, &mbs); - - if (c == EOF || retval != 1) - return WEOF; - else - return (int)pwc; -} diff --git a/newlib/libc/stdlib/wctomb.c b/newlib/libc/stdlib/wctomb.c deleted file mode 100644 index 2ab7b0339..000000000 --- a/newlib/libc/stdlib/wctomb.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -FUNCTION -<<wctomb>>---minimal wide char to multibyte converter - -INDEX - wctomb - -ANSI_SYNOPSIS - #include <stdlib.h> - int wctomb(char *<[s]>, wchar_t <[wchar]>); - -TRAD_SYNOPSIS - #include <stdlib.h> - int wctomb(<[s]>, <[wchar]>) - char *<[s]>; - wchar_t <[wchar]>; - -DESCRIPTION -When _MB_CAPABLE is not defined, this is a minimal ANSI-conforming -implementation of <<wctomb>>. The -only ``wide characters'' recognized are single bytes, -and they are ``converted'' to themselves. - -When _MB_CAPABLE is defined, this routine calls <<_wctomb_r>> to perform -the conversion, passing a state variable to allow state dependent -decoding. The result is based on the locale setting which may -be restricted to a defined set of locales. - -Each call to <<wctomb>> modifies <<*<[s]>>> unless <[s]> is a null -pointer or _MB_CAPABLE is defined and <[wchar]> is invalid. - -RETURNS -This implementation of <<wctomb>> returns <<0>> if -<[s]> is <<NULL>>; it returns <<-1>> if _MB_CAPABLE is enabled -and the wchar is not a valid multi-byte character, it returns <<1>> -if _MB_CAPABLE is not defined or the wchar is in reality a single -byte character, otherwise it returns the number of bytes in the -multi-byte character. - -PORTABILITY -<<wctomb>> is required in the ANSI C standard. However, the precise -effects vary with the locale. - -<<wctomb>> requires no supporting OS subroutines. -*/ - -#ifndef _REENT_ONLY - -#include <newlib.h> -#include <stdlib.h> -#include <errno.h> - -int -_DEFUN (wctomb, (s, wchar), - char *s _AND - wchar_t wchar) -{ -#ifdef _MB_CAPABLE - _REENT_CHECK_MISC(_REENT); - - return _wctomb_r (_REENT, s, wchar, &(_REENT_WCTOMB_STATE(_REENT))); -#else /* not _MB_CAPABLE */ - if (s == NULL) - return 0; - - /* Verify that wchar is a valid single-byte character. */ - if ((size_t)wchar >= 0x100) { - errno = EILSEQ; - return -1; - } - - *s = (char) wchar; - return 1; -#endif /* not _MB_CAPABLE */ -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c deleted file mode 100644 index 95a04069c..000000000 --- a/newlib/libc/stdlib/wctomb_r.c +++ /dev/null @@ -1,364 +0,0 @@ -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include <wchar.h> -#include <locale.h> -#include "mbctype.h" -#include "local.h" - -int (*__wctomb) (struct _reent *, char *, wchar_t, const char *charset, - mbstate_t *) - = __ascii_wctomb; - -int -_DEFUN (_wctomb_r, (r, s, wchar, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - mbstate_t *state) -{ - return __wctomb (r, s, _wchar, __locale_charset (), state); -} - -int -_DEFUN (__ascii_wctomb, (r, s, wchar, charset, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - const char *charset _AND - mbstate_t *state) -{ - /* Avoids compiler warnings about comparisons that are always false - due to limited range when sizeof(wchar_t) is 2 but sizeof(wint_t) - is 4, as is the case on cygwin. */ - wint_t wchar = _wchar; - - if (s == NULL) - return 0; - - if ((size_t)wchar >= 0x100) - { - r->_errno = EILSEQ; - return -1; - } - - *s = (char) wchar; - return 1; -} - -#ifdef _MB_CAPABLE -/* for some conversions, we use the __count field as a place to store a state value */ -#define __state __count - -int -_DEFUN (__utf8_wctomb, (r, s, wchar, charset, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - const char *charset _AND - mbstate_t *state) -{ - wint_t wchar = _wchar; - - if (s == NULL) - return 0; /* UTF-8 encoding is not state-dependent */ - - if (state->__count == -4 && (wchar < 0xdc00 || wchar >= 0xdfff)) - { - /* At this point only the second half of a surrogate pair is valid. */ - r->_errno = EILSEQ; - return -1; - } - if (wchar <= 0x7f) - { - *s = wchar; - return 1; - } - if (wchar >= 0x80 && wchar <= 0x7ff) - { - *s++ = 0xc0 | ((wchar & 0x7c0) >> 6); - *s = 0x80 | (wchar & 0x3f); - return 2; - } - if (wchar >= 0x800 && wchar <= 0xffff) - { - if (wchar >= 0xd800 && wchar <= 0xdfff) - { - wint_t tmp; - /* UTF-16 surrogates -- must not occur in normal UCS-4 data */ - if (sizeof (wchar_t) != 2) - { - r->_errno = EILSEQ; - return -1; - } - if (wchar >= 0xdc00) - { - /* Second half of a surrogate pair. It's not valid if - we don't have already read a first half of a surrogate - before. */ - if (state->__count != -4) - { - r->_errno = EILSEQ; - return -1; - } - /* If it's valid, reconstruct the full Unicode value and - return the trailing three bytes of the UTF-8 char. */ - tmp = (state->__value.__wchb[0] << 16) - | (state->__value.__wchb[1] << 8) - | (wchar & 0x3ff); - state->__count = 0; - *s++ = 0x80 | ((tmp & 0x3f000) >> 12); - *s++ = 0x80 | ((tmp & 0xfc0) >> 6); - *s = 0x80 | (tmp & 0x3f); - return 3; - } - /* First half of a surrogate pair. Store the state and return - the first byte of the UTF-8 char. */ - tmp = ((wchar & 0x3ff) << 10) + 0x10000; - state->__value.__wchb[0] = (tmp >> 16) & 0xff; - state->__value.__wchb[1] = (tmp >> 8) & 0xff; - state->__count = -4; - *s = (0xf0 | ((tmp & 0x1c0000) >> 18)); - return 1; - } - *s++ = 0xe0 | ((wchar & 0xf000) >> 12); - *s++ = 0x80 | ((wchar & 0xfc0) >> 6); - *s = 0x80 | (wchar & 0x3f); - return 3; - } - if (wchar >= 0x10000 && wchar <= 0x10ffff) - { - *s++ = 0xf0 | ((wchar & 0x1c0000) >> 18); - *s++ = 0x80 | ((wchar & 0x3f000) >> 12); - *s++ = 0x80 | ((wchar & 0xfc0) >> 6); - *s = 0x80 | (wchar & 0x3f); - return 4; - } - - r->_errno = EILSEQ; - return -1; -} - -/* Cygwin defines its own doublebyte charset conversion functions - because the underlying OS requires wchar_t == UTF-16. */ -#ifndef __CYGWIN__ -int -_DEFUN (__sjis_wctomb, (r, s, wchar, charset, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - const char *charset _AND - mbstate_t *state) -{ - wint_t wchar = _wchar; - - unsigned char char2 = (unsigned char)wchar; - unsigned char char1 = (unsigned char)(wchar >> 8); - - if (s == NULL) - return 0; /* not state-dependent */ - - if (char1 != 0x00) - { - /* first byte is non-zero..validate multi-byte char */ - if (_issjis1(char1) && _issjis2(char2)) - { - *s++ = (char)char1; - *s = (char)char2; - return 2; - } - else - { - r->_errno = EILSEQ; - return -1; - } - } - *s = (char) wchar; - return 1; -} - -int -_DEFUN (__eucjp_wctomb, (r, s, wchar, charset, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - const char *charset _AND - mbstate_t *state) -{ - wint_t wchar = _wchar; - unsigned char char2 = (unsigned char)wchar; - unsigned char char1 = (unsigned char)(wchar >> 8); - - if (s == NULL) - return 0; /* not state-dependent */ - - if (char1 != 0x00) - { - /* first byte is non-zero..validate multi-byte char */ - if (_iseucjp1 (char1) && _iseucjp2 (char2)) - { - *s++ = (char)char1; - *s = (char)char2; - return 2; - } - else if (_iseucjp2 (char1) && _iseucjp2 (char2 | 0x80)) - { - *s++ = (char)0x8f; - *s++ = (char)char1; - *s = (char)(char2 | 0x80); - return 3; - } - else - { - r->_errno = EILSEQ; - return -1; - } - } - *s = (char) wchar; - return 1; -} - -int -_DEFUN (__jis_wctomb, (r, s, wchar, charset, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - const char *charset _AND - mbstate_t *state) -{ - wint_t wchar = _wchar; - int cnt = 0; - unsigned char char2 = (unsigned char)wchar; - unsigned char char1 = (unsigned char)(wchar >> 8); - - if (s == NULL) - return 1; /* state-dependent */ - - if (char1 != 0x00) - { - /* first byte is non-zero..validate multi-byte char */ - if (_isjis (char1) && _isjis (char2)) - { - if (state->__state == 0) - { - /* must switch from ASCII to JIS state */ - state->__state = 1; - *s++ = ESC_CHAR; - *s++ = '$'; - *s++ = 'B'; - cnt = 3; - } - *s++ = (char)char1; - *s = (char)char2; - return cnt + 2; - } - r->_errno = EILSEQ; - return -1; - } - if (state->__state != 0) - { - /* must switch from JIS to ASCII state */ - state->__state = 0; - *s++ = ESC_CHAR; - *s++ = '('; - *s++ = 'B'; - cnt = 3; - } - *s = (char)char2; - return cnt + 1; -} -#endif /* !__CYGWIN__ */ - -#ifdef _MB_EXTENDED_CHARSETS_ISO -int -_DEFUN (__iso_wctomb, (r, s, wchar, charset, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - const char *charset _AND - mbstate_t *state) -{ - wint_t wchar = _wchar; - - if (s == NULL) - return 0; - - /* wchars <= 0x9f translate to all ISO charsets directly. */ - if (wchar >= 0xa0) - { - int iso_idx = __iso_8859_index (charset + 9); - if (iso_idx >= 0) - { - unsigned char mb; - - if (s == NULL) - return 0; - - for (mb = 0; mb < 0x60; ++mb) - if (__iso_8859_conv[iso_idx][mb] == wchar) - { - *s = (char) (mb + 0xa0); - return 1; - } - r->_errno = EILSEQ; - return -1; - } - } - - if ((size_t)wchar >= 0x100) - { - r->_errno = EILSEQ; - return -1; - } - - *s = (char) wchar; - return 1; -} -#endif /* _MB_EXTENDED_CHARSETS_ISO */ - -#ifdef _MB_EXTENDED_CHARSETS_WINDOWS -int -_DEFUN (__cp_wctomb, (r, s, wchar, charset, state), - struct _reent *r _AND - char *s _AND - wchar_t _wchar _AND - const char *charset _AND - mbstate_t *state) -{ - wint_t wchar = _wchar; - - if (s == NULL) - return 0; - - if (wchar >= 0x80) - { - int cp_idx = __cp_index (charset + 2); - if (cp_idx >= 0) - { - unsigned char mb; - - if (s == NULL) - return 0; - - for (mb = 0; mb < 0x80; ++mb) - if (__cp_conv[cp_idx][mb] == wchar) - { - *s = (char) (mb + 0x80); - return 1; - } - r->_errno = EILSEQ; - return -1; - } - } - - if ((size_t)wchar >= 0x100) - { - r->_errno = EILSEQ; - return -1; - } - - *s = (char) wchar; - return 1; -} -#endif /* _MB_EXTENDED_CHARSETS_WINDOWS */ -#endif /* _MB_CAPABLE */ |